← Archive // RSS

Experiments with AI adblock

by Nathan Pilkenton

October 2025

Summary: What happens when AI models that can interpret text, audio, and video just like humans do can review content and filter out any undesirable messages?

A new type of ad detection

Simple ad blockers work by tracking domains that serve ads and blocking requests to those domains. So, if you visit a site that uses Google Ads to show a banner ad, your ad blocker sees the site is trying to load something from Google Ads and blocks that request specifically. The result is that you see the rest of the page just fine, but not the content from Google Ads.

(Note: if you're reading this, I assume you've probably installed an adblocker, but if you haven't, I recommend you consider uBlock Origin or an alternative.)

FBI recommends using an ad blocker

It's not just me saying that - it's the FBI!

This approach to ad blocking works fine in general. But ad providers have adapted. Sites like Facebook, X/Twitter, and Instagram inject ads into social media feeds to try and make them indistinguishable from regular posts. And sites like Youtube serve ads directly from the same source as the content, making traditional ad blocking approaches ineffective.

The result has been a sort of arms race between advertisers and ad blockers: the former keep coming up with new ways to seamlessly include ads with their content, and the latter keep finding new ways to remove them.

But all this might be changing. With LLMs, we no longer need a "semantic web" to tell our computers what everything is; instead, modern AI models can figure it out on their own with human-like comprehension abilities.

In other words, if humans can figure out it's an ad, so can AI systems. And that could allow users to block ads no matter how they're served.

AI adblocking: proof-of-concept

To test this out, I used Claude Code to make a simple Chrome extension that uses an LLM to block ads. When a page loads, the extension sends the full page HTML to the OpenAI API, and gets back a list of elements to block.

I needed a site with plenty of ads to test it out, so I went to the New York Post. The result was pretty decent! Most of the ads seem to be removed, and it only added a second or two to the page load time.

New York Post website with AI ad blocking

Note that we didn't need to define any sort of logic or hard-and-fast rules. All we had to do was tell the AI to remove ads, and it made its own decisions about what should be removed.

So far, so good — but this simple approach does have some drawbacks. For instance, after a while, the Post website pops up a full-screen ad overlay. (A perfect example of why I chose it as a test case.) Something like uBlock Origin would have no problem blocking this. But because I just sent the page to the LLM once, when it first loaded, this ad slips past my AI adblock test.

Full-screen ad overlay that bypassed the AI blocker

Of course the New York Post does popover ads

What's interesting is what the AI decides is an ad. For instance, just under the top bar on the original page are three calls to action: get 30 days free of a premium service, vote in a poll, and listen to a podcast. These are internal advertising for more New York Post content – not really what we would think of as "ads", but similar in intent. When I visit the page with uBlock Origin, they are left alone. But the AI decides to remove them!

Internal promotional content blocked by AI

My adblocker leaves these alone, but the AI filtered them out

It's a glimpse of systems that could filter what you see based on more specific preferences and definitions of what an "ad" is. Eventually, these approaches could open up entirely new kinds of content blocking.

AI adblocking: videos

A perfect example of a different kind of ad is on YouTube, where many creators embed advertisements directly into their videos. They're not really blockable with normal means, since they're delivered inline with the rest of the video. Even paying for YouTube Premium does not remove these ads.

SponsorBlock is a creative approach to solving this problem. It crowdsources video ad-blocking by having viewers mark which segments of a video are ads. Then, other viewers using the extension to automatically skip those parts.

But what if we can use AI to help us do the same thing?

For a second test, I had Claude Code help me with a simple script to remove ads from a video file. The script sends the video to Gemini, which returns timestamps for when ads start and end. The script removes those parts of the video and outputs only the ad-free portions.

Here's a quick test on a Linus Tech Tips video. The original video has a sponsor read inserted:

The script identifies this and removes the ad, leaving only the video content and title sequence:

Funnily enough, Gemini actually cuts the video partway through Linus' segue. Maybe it thinks the ad starts as soon as he starts talking about the sponsor?

This technology will be difficult to implement, particularly with live streaming. But as powerful AI agents become ubiquitous and "too cheap to meter", this is one example of something that could be automated away in the background.

What will the future look like?

So will we all be browsing in an ad-free garden of Eden, with commercials kept at bay by our AI guardians, oblivious to the swarms of ad-bots trying to break through to our attention?

Probably not. Advertising is too valuable for companies to allow disruption. Here are some possible futures I see:

1. User adoption remains low enough not to alter the status quo. Since Google depends on ad revenue, Chrome has no incentive to allow better adblocking. OS-level features are possible, but it's hard to imagine Apple or Microsoft prioritizing these capabilities either, and if they did it would take them years. It's possible these systems will end up very effective, but be used by only a small minority of users.

2. Web platforms adapt to prevent blocking. Digital journalists could continue the adblock arms race, perhaps by displaying content in a custom-rendered <canvas> or SVG, or by finding similar methods to display ads while making it hard to remove them. I don't think paywalls are the future, with a few exceptions for some special cases like the NYT and Bloomberg; as LLMs become increasingly capable, there will be less incentive than ever for users to pay for content from run-of-the-mill providers.

3. "Unblockable" ad/content hybrids become the norm. Display advertising might dwindle, but other forms will continue to proliferate. Product reviews on Instagram/TikTok already blur the lines between advertising and entertainment to a point where it's hard even for us humans to separate one from the other.

  • One ad campaign I've enjoyed is from the golf Youtube series Strapped, in which the two stars were limited to three golf balls apiece for their golf trips - unless they could find lost Callaways. I hate advertising, but this was a genuinely entertaining running gag, and there would be no good way to "block" it without ruining the flow of the video.
  • 4. None of this will matter because humans won't go on the internet anymore. A trendy perspective is that people simply won't visit websites very much — either they'll see ads because they browse through official apps (like Instagram or TikTok), or they'll get information from the web via ChatGPT, smart glasses, or another AI interface. In that case, they'll still see ads alongside their query (or as part of the answer), but the market for display advertising on the source websites will collapse. I'm skeptical of how quickly this will happen, but we're already seeing the start of "Google Zero", so this will clearly have some sort of an effect.

    Whatever happens, the ad ecosystem (and the entire Internet) will look very different once human-level AI operators are widely deployed. 


    ← Archive // RSS