Introduction
The "ad wars" between publishers and users have entered a new phase with the introduction of machine-learning-based adblockers like AdGraph. Unlike traditional blacklists that rely on manually curated URLs, these models analyze the structural and contextual relationships of a web page (represented as a graph) to identify ads. However, machine learning models are notoriously vulnerable to adversarial examples—inputs specifically designed to trick a model into making a wrong classification.
While attacking images is relatively straightforward, modifying a web page is significantly more challenging. Changes must be "actionable," meaning they must fool the AI while preserving the page's functionality and visual integrity. Researchers have developed A$^4$ (Actionable Ad Adversarial Attack), a tool that uses adversarial machine learning to bypass these graph-based adblockers with a nearly 60% success rate.
Methodology
A$^4$ is a gradient-based attack framework inspired by Projected Gradient Descent (PGD). Since the target adblocker (AdGraph) uses a non-differentiable Random Forest classifier, A$^4$ employs a transfer-based approach. It trains a surrogate Neural Network to mimic AdGraph's behavior and uses it to calculate the necessary feature tweaks.
Key technical innovations in A$^4$ include:
- Feature-Space Actionability: Mathematical constraints ensure perturbed features remain valid (e.g., node counts cannot be negative).
- Application-Space Actionability: An iterative feedback loop maps theoretical feature changes back to actual HTML/JavaScript modifications. The page is rendered in a lightweight browser to re-extract features and account for unintended side effects where one change might accidentally alter another feature.
- Semantic Equivalence: Techniques like HTML encoding for URLs and adding non-functional "dummy" nodes to the DOM tree alter the page structure without affecting the ad's execution.
Experimental Setup
To evaluate A$^4$, the authors replicated the state-of-the-art AdGraph model using a fresh crawl of Alexa’s top 10,000 websites from September 2019, collecting over 586,000 request records. The target set for the attack consisted of 1,430 unique ad requests randomly selected from the top 500 Alexa sites to serve as the samples to be disguised.
Key Results and Insights
A$^4$ successfully bypassed AdGraph for 59.93% of the tested ads, a significant improvement over a single-step attack baseline, which only managed 32.52%. The attack proved highly efficient; over 90% of successful cases converged within just 5 iterations.
The success of A$^4$ stems from several key insights:
- Global Feature Exploitation: AdGraph's reliance on global features, such as the total number of nodes in a page's graph, allows A$^4$ to use "dummy" nodes to change the overall context without breaking specific ad requests.
- Managing Side Effects: Because web features are interdependent, a simple one-step attack often fails as side effects "drift" the sample back to the ad category. The iterative feedback loop is critical for maintaining actionability.
- Stealth and Performance: Perturbations are visually imperceptible to users. On average, adding 39 nodes only increased page load time by 0.23 seconds, a negligible overhead compared to the average 20.9-second page load time.
Discussion and Conclusion
While A$^4$ currently targets a subset of features (7 out of 64), it demonstrates the inherent vulnerability of graph-based adblockers. Future work could explore more sophisticated mapping-back strategies or target a broader range of features. To defend against such attacks, ML-based adblockers may need to move away from global features and improve URL sanitization to prevent simple encoding-based evasion. Ultimately, A$^4$ proves that as long as the web remains a flexible, programmable environment, publishers will find ways to hide ads within structural noise.
Summary updated