# AutoFR: Automated Filter Rule Generation for Adblocking

arXiv: https://arxiv.org/abs/2202.12872 · HTML: https://mlsanity.com/paper/2202.12872/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 21 of its 112 references that are in the map.
- First posted on arXiv 25 Feb 2022.

## Builds on (most cited first, 21 of 21)

- [Challenges of Real-World Reinforcement Learning](https://mlsanity.com/paper/1904.12901/) (2019)
- [Adversarial Policies: Attacking Deep Reinforcement Learning](https://mlsanity.com/paper/1905.10615/) (2019)
- [ComDefend: An Efficient Image Compression Model to Defend Adversarial Examples](https://mlsanity.com/paper/1811.12673/) (2018)
- [Adversarial Bandits with Knapsacks](https://mlsanity.com/paper/1811.11881/) (2018)
- [Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulation](https://mlsanity.com/paper/1806.01156/) (2018)
- [An optimal algorithm for the Thresholding Bandit Problem](https://mlsanity.com/paper/1605.08671/) (2016)
- [An algorithm with nearly optimal pseudo-regret for both stochastic and adversarial bandits](https://mlsanity.com/paper/1605.08722/) (2016)
- [Deep Reinforcement Learning for Smart Home Energy Management](https://mlsanity.com/paper/1909.10165/) (2019)
- [BISTRO: An Efficient Relaxation-Based Method for Contextual Bandits](https://mlsanity.com/paper/1602.02196/) (2016)
- [FaiR-IoT: Fairness-aware Human-in-the-Loop Reinforcement Learning for Harnessing Human Variability in Personalized IoT](https://mlsanity.com/paper/2103.16033/) (2021)
- [AdVersarial: Perceptual Ad Blocking meets Adversarial Machine Learning](https://mlsanity.com/paper/1811.03194/) (2018)
- [Adaptive Sampling for Coarse Ranking](https://mlsanity.com/paper/1802.07176/) (2018)
- [WebGraph: Capturing Advertising and Tracking Information Flows for Robust Blocking](https://mlsanity.com/paper/2107.11309/) (2021)
- [The Future of Ad Blocking: An Analytical Framework and New Techniques](https://mlsanity.com/paper/1705.08568/) (2017)
- [Filter List Generation for Underserved Regions](https://mlsanity.com/paper/1910.07303/) (2019)
- [AdGraph: A Graph-Based Approach to Ad and Tracker Blocking](https://mlsanity.com/paper/1805.09155/) (2018)
- [Who Filters the Filters: Understanding the Growth, Usefulness and Efficiency of Crowdsourced Ad Blocking](https://mlsanity.com/paper/1810.09160/) (2018)
- [Missed by Filter Lists: Detecting Unknown Third-Party Trackers with Invisible Pixels](https://mlsanity.com/paper/1812.01514/) (2018)
- [Percival: Making In-Browser Perceptual Ad Blocking Practical With Deep Learning](https://mlsanity.com/paper/1905.07444/) (2019)
- [Crowdsourced PAC Learning under Classification Noise](https://mlsanity.com/paper/1902.04629/) (2019)
- [A First Look at Ad Blocking Apps on Google Play](https://mlsanity.com/paper/1709.02901/) (2017)

## Built on by (most cited first, 2 of 2)

- [Collaborative Domain Blocking: Using federated NLP To Detect Malicious Domains](https://mlsanity.com/paper/2210.04088/) (2022)
- [SINBAD: Saliency-informed detection of breakage caused by ad blocking](https://mlsanity.com/paper/2405.05196/) (2024)

## Abstract (arXiv)

Adblocking relies on filter lists, which are manually curated and maintained by a community of filter list authors. Filter list curation is a laborious process that does not scale well to a large number of sites or over time. In this paper, we introduce AutoFR, a reinforcement learning framework to fully automate the process of filter rule creation and evaluation for sites of interest. We design an algorithm based on multi-arm bandits to generate filter rules that block ads while controlling the trade-off between blocking ads and avoiding visual breakage. We test AutoFR on thousands of sites and we show that it is efficient: it takes only a few minutes to generate filter rules for a site of interest. AutoFR is effective: it generates filter rules that can block 86% of the ads, as compared to 87% by EasyList, while achieving comparable visual breakage. Furthermore, AutoFR generates filter rules that generalize well to new sites. We envision that AutoFR can assist the adblocking community in filter rule generation at scale.
