AdFL: In-Browser Federated Learning for Online Advertisement
Ahmad Alemari, Pritam Sen, Cristian Borcea
TL;DR
AdFL presents an end-to-end in-browser horizontal federated learning framework for online advertising, enabling a publisher to train and deploy a global ad-viewability model using data that never leaves users' browsers. Implemented with five in-browser components and TensorFlow.js, it achieves real-time inference (under 3 ms desktop, under 7 ms mobile) and feasible training (sub-second rounds) while maintaining privacy, with differential privacy offering additional protection at modest performance costs. A proof-of-concept model reaches up to 92.59% AUC in FL settings, and the study demonstrates acceptable memory overhead (~50–240 MB) and manageable communication costs, suggesting practical viability for privacy-aware ad targeting. The work also shows how AdFL can adapt to different models and ad ecosystems, providing a path toward balancing user privacy with publisher revenue in online advertising.
Abstract
Since most countries are coming up with online privacy regulations, such as GDPR in the EU, online publishers need to find a balance between revenue from targeted advertisement and user privacy. One way to be able to still show targeted ads, based on user personal and behavioral information, is to employ Federated Learning (FL), which performs distributed learning across users without sharing user raw data with other stakeholders in the publishing ecosystem. This paper presents AdFL, an FL framework that works in the browsers to learn user ad preferences. These preferences are aggregated in a global FL model, which is then used in the browsers to show more relevant ads to users. AdFL can work with any model that uses features available in the browser such as ad viewability, ad click-through, user dwell time on pages, and page content. The AdFL server runs at the publisher and coordinates the learning process for the users who browse pages on the publisher's website. The AdFL prototype does not require the client to install any software, as it is built utilizing standard APIs available on most modern browsers. We built a proof-of-concept model for ad viewability prediction that runs on top of AdFL. We tested AdFL and the model with two non-overlapping datasets from a website with 40K visitors per day. The experiments demonstrate AdFL's feasibility to capture the training information in the browser in a few milliseconds, show that the ad viewability prediction achieves up to 92.59% AUC, and indicate that utilizing differential privacy (DP) to safeguard local model parameters yields adequate performance, with only modest declines in comparison to the non-DP variant.
