Abstract
Machine learning models exposed via APIs often leak sensitive training data information through confidence scores. This paper proposes a "Purifier" framework—an autoencoder-based defense that transforms raw prediction scores to mitigate both Membership Inference (MI) and Model Inversion attacks. By reducing score dispersion and employing adversarial training, the Purifier achieves significant privacy gains with negligible impact on model utility and inference speed. Experimental results across multiple benchmarks show that the Purifier is orders of magnitude faster than existing optimization-based defenses while maintaining high classification accuracy.
Introduction
As machine learning models are increasingly deployed as cloud services, they typically return a vector of confidence scores (class probabilities) for each query. While these scores are essential for downstream tasks, they are a double-edged sword: they leak "signatures" of the training data. Attackers can exploit these signatures to perform Membership Inference (MI) attacks—determining if a specific record was used for training—or Model Inversion attacks, where the attacker reconstructs sensitive input features (such as faces) from output scores.
Existing defenses often suffer from a heavy "utility tax," significantly degrading model accuracy or introducing massive latency. This research introduces a unified, efficient defense called the Purifier, which addresses both attack vectors simultaneously by "purifying" the prediction scores before they are released to the user.
The Purification Framework
The core of the defense is a Purifier ($G$), implemented as a lightweight autoencoder consisting of an encoder ($E$) and a decoder ($D$). Instead of returning the raw confidence scores from a target classifier ($F$), the system passes them through the Purifier first.
As shown in the training pipeline above, the Purifier is trained using a multi-pronged adversarial approach:
- Base Purification: The autoencoder is trained on a reference set of non-member data to learn how to "concentrate" scores into tight clusters.
- Adversarial Inversion Defense: An Adversarial Model ($H$) attempts to reconstruct inputs from the purified scores. The Purifier is updated to minimize $H$'s success.
- Adversarial Membership Defense: A Discriminator ($I$) is trained to distinguish between real scores and purified "fake" scores. The Purifier learns to fool this discriminator, ensuring the output scores do not carry membership-revealing signatures.
Key Insights: The Role of Dispersion
A central finding of this work is that "dispersion"—the variance of prediction scores across different inputs—is the common root of both privacy leaks. By tightening the score distribution, the Purifier can mitigate both threats simultaneously.
The t-SNE visualizations demonstrate this effect clearly. In an undefended model, member and non-member data points occupy distinct regions of the score space, making them easy targets for MI attacks. The Purifier collapses these distributions into a shared, tight arc, making members and non-members statistically indistinguishable while preserving the relative ranking of classes necessary for utility.
Experimental Results
The authors evaluated the framework on CIFAR10, Purchase100, and FaceScrub530. Key findings include:
- Privacy Protection: The framework reduced MI attack accuracy by up to 15% and increased the error of model inversion attacks by a factor of 4x. Qualitative results on FaceScrub showed that reconstructed faces from purified scores were blurry and unrecognizable.
- High Utility: The impact on primary task accuracy was minimal, with less than a 0.4% drop in classification performance.
- Operational Efficiency: The Purifier is a simple neural network forward pass. In testing, it was 4,636 times faster than MemGuard, a leading optimization-based defense, making it highly practical for high-traffic production APIs.
Conclusion
The Purifier framework offers a robust and efficient solution for protecting model privacy. By identifying dispersion as a shared vulnerability for MI and Model Inversion attacks, the authors developed a unified defense that provides strong privacy guarantees without the latency or accuracy penalties typical of prior methods. Future work may explore combining this approach with standard regularization to further defend against label-only attacks.
Summary updated