WARP: Guaranteed Inner-Layer Repair of NLP Transformers
Not on the map. Why?
Abstract (arXiv)
Transformer-based NLP models remain vulnerable to adversarial perturbations, yet existing repair methods face a fundamental trade-off: gradient-based approaches offer flexibility but lack verifiability and often overfit; methods that do provide repair guarantees are restricted to the final layer or small networks, significantly limiting the parameter search space available for repair. We present WARP (Weight-Adjusted Repair with Provability), a constraint-based repair framework that extends repair beyond the last layer of Transformer models. WARP formulates repair as a convex quadratic program derived from a first-order linearization of the logit gap, enabling tractable optimization over a high-dimensional parameter space. Under the condition that the first-order approximation holds, this formulation induces three per-sample guarantees: (i) a positive margin constraint ensuring correct classification on repaired inputs, (ii) preservation constraints over a designated remain set, and (iii) a certified robustness radius derived from Lipschitz continuity. To ensure feasibility across varying model architectures, we introduce a sensitivity-based preprocessing step that conditions the optimization landscape accordingly. We further show that the iterative optimization procedure converges to solutions satisfying all repair constraints under mild assumptions. Empirical evaluation on encoder-only Transformers with varying layer architectures validates that these guarantees hold in practice while improving robustness to adversarial inputs. Our results demonstrate that guaranteed, generalizable Transformer repair is achievable through principled constraint-based optimization.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 26 of its 31 references that are in the map. First posted on arXiv 1 Apr 2026.
Builds on
26 of 31 references.
References · 26
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
- 2022Mass-Editing Memory in a Transformercited by 1,001
- 2017Spectrally-normalized margin bounds for neural networkscited by 686
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
- 2021Editing Factual Knowledge in Language Modelscited by 553
- 2021Fast Model Editing at Scalecited by 498
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 491
14 more
- 2018Generating Natural Language Adversarial Examplescited by 424
- 2018Lipschitz regularity of deep neural networks: analysis and efficient estimationcited by 415
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 381
- 2020BAE: BERT-based Adversarial Examples for Text Classificationcited by 316
- 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 232
- 2018Lipschitz-Margin Training: Scalable Certification of Perturbation Invariance for Deep Neural Networkscited by 195
- 2017OSQP: An Operator Splitting Solver for Quadratic Programscited by 161
- 2021Evaluating the Robustness of Neural Language Models to Input Perturbationscited by 87
- 2021Provable Repair of Deep Neural Networkscited by 42
- 2021NNrepair: Constraint-based Repair of Neural Network Classifierscited by 26
- 2021Sound and Complete Neural Network Repair with Minimality and Locality Guaranteescited by 13
- 2023Architecture-Preserving Provable Repair of Deep Neural Networkscited by 11
- 2023Semantic-Based Neural Network Repaircited by 3
- 2025IM-BERT: Enhancing Robustness of BERT through the Implicit Euler Methodcited by 3
Built on by
Citing papers per year: 2026: 1.
1 paper.