[Paper Review] Constrained Optimization with Dynamic Bound-scaling for Effective NLPBackdoor Defense
This paper proposes a dynamic bound-scaling optimization method for NLP backdoor defense by inverting triggers through a temperature-scheduled softmax over token embeddings. By gradually reducing the temperature to sharpen the loss landscape and using a rollback mechanism to escape local optima, the method effectively detects and removes backdoors, achieving up to 43.4% higher detection accuracy than baselines on 1,600+ models across 3 tasks and 4 attack types.
We develop a novel optimization method for NLPbackdoor inversion. We leverage a dynamically reducing temperature coefficient in the softmax function to provide changing loss landscapes to the optimizer such that the process gradually focuses on the ground truth trigger, which is denoted as a one-hot value in a convex hull. Our method also features a temperature rollback mechanism to step away from local optimals, exploiting the observation that local optimals can be easily deter-mined in NLP trigger inversion (while not in general optimization). We evaluate the technique on over 1600 models (with roughly half of them having injected backdoors) on 3 prevailing NLP tasks, with 4 different backdoor attacks and 7 architectures. Our results show that the technique is able to effectively and efficiently detect and remove backdoors, outperforming 4 baseline methods.
Motivation & Objective
- Address the challenge of detecting and removing backdoors in NLP models, which are increasingly stealthy due to structural and paraphrasing-based triggers.
- Overcome the limitations of existing backdoor inversion methods in NLP, which fail due to the discrete, sparse nature of token spaces.
- Develop a robust optimization framework that can reliably locate ground-truth triggers even under complex, adaptive attacks.
- Enable effective backdoor removal with minimal accuracy degradation on clean data, ensuring practical deployment in real-world NLP systems.
Proposed method
- Reframe trigger inversion as optimizing over a convex hull of token embeddings, where each point represents a weighted sum of all tokens in the vocabulary.
- Use a temperature-scheduled softmax to dynamically control the confidence of the optimization output, starting with high temperature for broad exploration and reducing it to focus on one-hot-like solutions.
- Introduce a temperature rollback mechanism that increases temperature when the optimizer gets stuck in local optima, leveraging the fact that only global optima yield low inversion loss.
- Define a loss function that measures the model’s misclassification under the inverted trigger, with the goal of minimizing this loss to identify the true trigger.
- Apply the method to both backdoor detection and removal by using the inverted trigger to re-train or fine-tune the model.
- Use a backtracking strategy based on inversion loss thresholds to distinguish between global (true trigger) and local (spurious) optima.
Experimental results
Research questions
- RQ1Can dynamic temperature scaling in softmax improve the convergence of trigger inversion in discrete NLP spaces compared to fixed-temperature methods?
- RQ2How effective is the temperature rollback mechanism in escaping local optima during NLP backdoor inversion, especially when the ground truth trigger is not immediately found?
- RQ3To what extent can the method detect and remove backdoors under advanced, adaptive attacks such as SOS and Combination Lock that reduce trigger visibility?
- RQ4How does the method compare to state-of-the-art baselines (e.g., ASCC, UAT, T-Miner, Genetic Algorithm) in terms of detection accuracy and robustness across diverse architectures and tasks?
- RQ5Can the method preserve high clean accuracy while reducing attack success rate to near-zero after backdoor removal?
Key findings
- The method achieved detection accuracy of 0.95 and 1.00 for Hidden Killer and Combination Lock attacks, respectively, with β=0.3, outperforming all baselines.
- For the adaptive SOS attack, the method maintained 0.875 detection accuracy at β=1, demonstrating resilience against stealthy, loss-optimized triggers.
- Backdoor removal reduced the average attack success rate (ASR) from 0.987 to 0.058 across TrojAI datasets, with only minor degradation in clean accuracy (e.g., from 0.909 to 0.892 in sentiment analysis).
- Ablation studies confirmed that both temperature scaling and backtracking are essential: removing either reduced detection performance significantly.
- The method remained effective even under adaptive attacks that increase the trigger loss threshold (ϕ), maintaining over 80% detection accuracy at ϕ=0.5, though ASR dropped substantially.
- The approach outperformed four SOTA baselines by up to 43.4% in detection accuracy, with consistent improvements across 3 NLP tasks and 7 model architectures.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.