This article details WhatsApp's Scam Alert feature, an optional on-device machine learning model designed to detect potential scam messages while strictly adhering to end-to-end encryption. It highlights the architectural decisions, including on-device processing, user control, and a confidential federated analytics pipeline, to ensure user privacy and data security.
Read original on Meta EngineeringWhatsApp's Scam Alert system is built on a set of stringent design principles to ensure user privacy, particularly when integrating an ML model for content classification. The primary goal is to provide a security feature without compromising the foundational guarantee of end-to-end encryption. This necessitates that all sensitive operations remain client-side, with no automatic data transmission to servers.
The Scam Alert leverages advances in on-device machine learning, allowing for accurate text classification without significant performance or battery impact. The model, small and effective, is trained on reported scam patterns and performs probabilistic classification based on conversational structure and linguistic signals. Warnings are displayed client-side and are not visible to the other party.
Architectural Enforcement of Privacy
The article emphasizes that privacy principles are architecturally enforced and independently verifiable. This means the system is designed to *prevent* data leakage by construction, rather than relying solely on policy.
To improve the ML model over time while maintaining privacy, WhatsApp employs a confidential federated analytics pipeline. This system is crucial for collecting telemetry (e.g., warning counts, user actions) without compromising individual user data. It relies heavily on Trusted Execution Environments (TEEs) and differential privacy.