Shoot for the moon - machine learning for automated online ad detection
Why did a simple tree-based model outperform a complex graph neural network for detecting online ads? The answer is a lesson in practical machine learning.
#1about 4 minutes
The challenge of manual ad filtering and the moonshot project
Manual ad filter lists are slow and resource-intensive, prompting the "Project Moonshot" initiative to automate ad detection using AI and machine learning.
#2about 2 minutes
Choosing the right data source for ad detection
The team pivoted from inefficient computer vision models for perceptual ad detection to analyzing HTML structure, which provided richer data for machine learning.
#3about 3 minutes
Generating labeled training data at scale
A custom crawler combined with a modified Adblock Plus was used to automatically label HTML nodes on 250,000 web pages, creating a large-scale ground truth dataset.
#4about 4 minutes
Pre-processing HTML data and overcoming key challenges
The data pipeline converted raw HTML into adjacency and feature matrices while solving challenges like severely unbalanced data and slow processing speeds.
#5about 6 minutes
Experimenting with different machine learning model approaches
Several models were tested for ad classification, including graph neural networks, traditional classifiers with node embeddings, and tree-based models like XGBoost.
#6about 3 minutes
Comparing model performance and planning future improvements
Tree-based models significantly outperformed graph neural networks in F1 score, and future work will explore self-supervised learning and more diverse data.
#7about 3 minutes
Deploying machine learning models in a JavaScript environment
The team tackled deployment challenges by converting Python models to JavaScript, optimizing for latency by moving the model to a background script, and using TensorFlow.js.
#8about 5 minutes
Answering questions on model circumvention and design choices
The speakers address audience questions regarding how ad companies might circumvent the model and the rationale behind their model experimentation process.
Related jobs
Jobs that call for the skills explored in this talk.
GitHub's Copilot Ads and Opt-out for AI Training DataOur newsletter - The Dev Digest - is packed with links to all kinds of tech content, but we just can’t cover everything. That’s why we put together the Overflow, where we share some of our favourites in bonus posts and videos, and this time we’re ta...
Daniel Cranney, Chris Heilmann
Dev Digest 215: Agent Memory, JS2026, Googlebot Analysis & Canvas❤️HTMLInside last week’s Dev Digest 215 .
🗿 Make AI talk like a caveman
🧠 A guide to context engineering for LLMs
🤖 Simon Willison on agentic engineering
🔐 Axios supply chain attack post mortem
🛡️ Designing AI agents to resist prompt injection
🎨 HTML in c...
AI & A11Y, Meta's privacy and the future of SEOInside last week’s Dev Digest 173 .
🏆 GitHub reaches 1bn repos, with underwhelming final submission
🎮 Atari 2600 beats ChatGPT at chess
💬 Chatbots don’t improve work for 7k companies
🕵️ Meta AI app is a privacy disaster
⚠️ Microsoft Copilot’s Zero C...
From learning to earning
Jobs that call for the skills explored in this talk.