Classification Auto-Encoder based Detector against Diverse Data Poisoning Attacks

Fereshteh Razmi, Li Xiong

Introduction

Machine learning models are increasingly deployed in critical environments, yet they remain highly susceptible to data poisoning attacks. In these scenarios, an adversary injects malicious samples into the training set to degrade model performance or manipulate decision boundaries. This paper introduces the Classification Auto-Encoder (CAE) and its enhanced version, CAE+, as robust defense mechanisms designed to detect diverse poisoning attacks without requiring a pre-existing clean dataset.

The Challenge of Data Poisoning

Data poisoning typically takes two forms: Label Flipping, where correct labels are changed to incorrect ones, and Optimal/Feature Attacks, where input features are subtly distorted to shift the model's decision boundary. Most existing defense strategies rely on a "trusted" clean dataset to train a detector. However, in real-world applications like crowd-sourcing or federated learning, obtaining such a pure dataset is often unfeasible. Furthermore, many detectors focus exclusively on either feature anomalies or label inconsistencies, failing to capture attacks that manipulate both.

Methodology: CAE and CAE+

The authors propose a dual-metric approach that monitors both feature reconstruction and classification errors.

Classification Auto-Encoder (CAE)

The standard CAE architecture integrates an auxiliary classifier into the latent representation (bottleneck) of an auto-encoder. By doing so, the model is forced to learn a representation that is simultaneously effective for reconstructing the input image ($x'$) and predicting its label ($y'$). Detection is based on a weighted combination of reconstruction error ($RE_{cae}$) and classification loss ($L_{cae}$).

CAE+ for Self-Sanitization

To address the challenge of training on contaminated data, the authors developed CAE+. This version employs two parallel components: a Reconstruction Auto-Encoder (RAE) and a Classification AE. A critical innovation in CAE+ is the use of early stopping for the classification component. Because neural networks typically learn patterns of the majority (clean) data before memorizing minority anomalies (poisoned data), early stopping prevents the model from overfitting to malicious samples.

Architectural comparison of CAE and CAE+ detectors.

Key Insights: The Power of Dual Metrics

The core strength of the CAE approach lies in its ability to catch attackers regardless of their strategy. A label-flipper might maintain low reconstruction error but will exhibit high classification loss. Conversely, an optimal feature attacker might minimize classification loss while producing high reconstruction errors. By plotting these two metrics, the detector can clearly separate clean data from poisoned samples across various attack types.

Scatter plots showing the separation of clean and poisoned data using reconstruction error (RE) and classification loss (L_cae) across different attack types.

Experimental Results

The CAE+ detector was evaluated on MNIST, Fashion-MNIST, and CIFAR-10 datasets. Key findings include:

  • High Precision: On MNIST, CAE+ achieved an F1-score near 1.0 for both flipping and optimal attacks, indicating near-perfect detection with minimal false positives.
  • Resilience: The system remained effective even with high contamination levels, successfully defending CIFAR-10 models against up to 30% poisoned data.
  • Superior Performance: CAE+ consistently outperformed baseline methods like Distance-based Outlier Detectors, particularly when the detector itself was trained on tainted data.

Limitations and Future Directions

While highly effective against untargeted poisoning, the current work does not explicitly address backdoor attacks, where a specific trigger causes a targeted misclassification. Additionally, the experiments primarily utilized Support Vector Machines (SVMs) as the target models; future research will explore the detector's performance in protecting more complex deep learning architectures and scaling to multi-class problems.

Summary updated

BibTeX
@inproceedings{razmi2023classification,
  author = {Fereshteh Razmi and Li Xiong},
  title = {{Classification Auto-Encoder based Detector against Diverse Data Poisoning Attacks}},
  booktitle = {DBSec},
  year = {2023},
  doi = {10.1007/978-3-031-37586-6\_16},
}
Figure