🤖 AI Summary
Large language models (LLMs) exhibit vulnerability to adversarial perturbations—such as synonym substitutions—in gender fairness and toxicity detection tasks.
Method: This paper introduces the first formal verification framework tailored for Transformer architectures, pioneering the integration of abstract interpretation and interval propagation into LLMs. It geometrically models the token embedding space and adapts to attention mechanisms to formally define fairness robustness therein, enabling the generation of certifiably robust guarantees under gender-term permutations and toxicity-inducing input manipulations.
Contributions/Results: (1) We propose the first unified verification framework supporting joint certification of fairness and safety for Transformers; (2) Our method achieves >92% certification coverage across multiple benchmarks, substantially outperforming baselines; (3) The toxicity detection module attains 100% certified pass rate with zero false negatives, averaging <3 seconds per sample for certification.
📝 Abstract
As large language models become integral to high-stakes applications, ensuring their robustness and fairness is critical. Despite their success, large language models remain vulnerable to adversarial attacks, where small perturbations, such as synonym substitutions, can alter model predictions, posing risks in fairness-critical areas, such as gender bias mitigation, and safety-critical areas, such as toxicity detection. While formal verification has been explored for neural networks, its application to large language models remains limited. This work presents a holistic verification framework to certify the robustness of transformer-based language models, with a focus on ensuring gender fairness and consistent outputs across different gender-related terms. Furthermore, we extend this methodology to toxicity detection, offering formal guarantees that adversarially manipulated toxic inputs are consistently detected and appropriately censored, thereby ensuring the reliability of moderation systems. By formalizing robustness within the embedding space, this work strengthens the reliability of language models in ethical AI deployment and content moderation.