Abstract
Deep neural networks are vulnerable to backdoor attacks, where malicious behaviors are implanted during training. While existing defenses can effectively purify compromised models, they typically require labeled data or specific training procedures, making them difficult to apply beyond supervised learning settings. Notably, recent studies have shown successful backdoor attacks across various learning paradigms, highlighting a critical security concern. To address this gap, we propose Two-stage Symmetry Connectivity (TSC), a novel backdoor purification defense that operates independently of data format and requires only a small fraction of clean samples. Through theoretical analysis, we prove that by leveraging permutation invariance in neural networks and quadratic mode connectivity, TSC amplifies the loss on poisoned samples while maintaining bounded clean accuracy. Experiments demonstrate that TSC achieves robust performance comparable to state-of-the-art methods in supervised learning scenarios. Furthermore, TSC generalizes to self-supervised learning frameworks, such as SimCLR and CLIP, maintaining its strong defense capabilities.
Introduction
Deep neural networks are susceptible to backdoor attacks, where an adversary implants a "trigger" (like a specific pixel pattern) during training that causes the model to misbehave on cue while appearing normal on clean data. While many defenses exist, they face significant hurdles: task specificity (often limited to supervised learning), high clean data requirements, and vulnerability to sophisticated adaptive attacks that hide in the model's loss landscape.
We introduce Two-stage Symmetry Connectivity (TSC), a novel post-training defense that purifies backdoored neural networks by leveraging weight permutation invariance. Unlike previous methods, TSC is data-format agnostic and highly effective across supervised, self-supervised (SimCLR), and foundation model (CLIP) settings, requiring only a small fraction (~5%) of clean data to "circumvent" the weight space where backdoors reside.
Methodology: The TSC Framework
TSC is built on two fundamental mathematical properties of neural networks: Permutation Invariance (the ability to swap neurons in a layer without changing the output) and Mode Connectivity (the existence of low-loss paths, such as Bezier curves, connecting different sets of weights).
The defense operates in two primary stages:
- Stage 1: Adversarial Loss Amplification. The defender creates a "symmetrically un-aligned" copy of the backdoored model. By using permutation matrices to maximize the feature distance between the original and the copy, the model is pushed into a different loss basin. A quadratic Bezier curve is then trained between these two points using clean data. Since the backdoor is absent in the clean data, the loss on poisoned samples spikes along this curve.
- Stage 2: Clean Accuracy Recovery. The purified model from Stage 1 may suffer from reduced task accuracy. To rectify this, the purified model is re-aligned to the original model's loss basin, and a second curve is trained to find a point that balances high clean accuracy with backdoor resistance.
This process is typically repeated for approximately three rounds to progressively distance the model from the malicious weight space.
Theoretical Foundation and Mechanism
The core innovation of TSC lies in "circumventing" rather than just "unlearning." Instead of attempting to identify and remove specific trigger patterns, TSC moves the model's weights into a symmetric part of the loss landscape where the backdoor shortcut simply does not exist. Because backdoors are often brittle features tied to specific weight arrangements, jumping to a symmetric arrangement breaks that link.
As shown in the loss landscape visualizations, TSC effectively amplifies the loss on poisoned samples (top row) while maintaining a stable, low loss for benign samples (bottom row) along the learned Bezier curve. This theoretical guarantee ensures that the upper bound of the loss on poisoned samples is amplified while keeping clean task loss bounded.
Experimental Results
TSC was evaluated across standard benchmarks including CIFAR-10, GTSRB, and ImageNet-100 for supervised learning, as well as SimCLR and CLIP frameworks. Key findings include:
- Broad Effectiveness: TSC reduced the Attack Success Rate (ASR) to below 15% (and often below 2%) across 11 different supervised attack types, including complex triggers like WaNet and SSBA.
- Superiority to Baselines: On ImageNet-100, TSC consistently outperformed established defenses like Fine-Pruning (FP) and Neural Cleanse (NC), which often failed to reduce ASR below 50% on certain attacks.
- Foundation Model Purification: In CLIP settings, TSC reduced ASR from 99% to less than 1% while maintaining competitive zero-shot accuracy.
- Adaptive Robustness: Even against custom adaptive attacks designed to bypass it, TSC remained effective, maintaining low ASR.
Conclusion
TSC represents a significant advancement in model purification, offering a versatile and data-efficient solution that generalizes across various learning paradigms. By leveraging the inherent symmetries of neural networks, it provides a robust defense against backdoor attacks without requiring extensive labeled datasets or knowledge of the specific attack vector. Future work will focus on further minimizing the clean accuracy trade-off and applying symmetry-based logic to other model vulnerabilities.
Summary updated