ICML 2025poster0 citations

Backdoor Attacks in Token Selection of Attention Mechanism

Yunjuan Wang, Raman Arora

Abstract

Despite the remarkable success of large foundation models across a range of tasks, they remain susceptible to security threats such as backdoor attacks. By injecting poisoned data containing specific triggers during training, adversaries can manipulate model predictions in a targeted manner. While prior work has focused on empirically designing and evaluating such attacks, a rigorous theoretical understanding of when and why they succeed is lacking. In this work, we analyze backdoor attacks that exploit the token selection process within attention mechanisms--a core component of transformer-based architectures. We show that single-head self-attention transformers trained via gradient descent can interpolate poisoned training data. Moreover, we prove that when the backdoor triggers are sufficiently strong but not overly dominant, attackers can successfully manipulate model predictions. Our analysis characterizes how adversaries manipulate token selection to alter outputs and identifies the theoretical conditions under which these attacks succeed. We validate our findings through experiments on synthetic datasets.

Backdoor attacksattention mechanismtoken selectiontransformer modelsgradient descent dynamicstheoretical analysisadversarial machine learninglabel poisoning
BibTeX
@inproceedings{
wang2025backdoor,
title={Backdoor Attacks in Token Selection of Attention Mechanism},
author={Yunjuan Wang and Raman Arora},
booktitle={Forty-second International Conference on Machine Learning},
year={2025},
url={https://openreview.net/forum?id=ZEPWk1Q6ww}
}
Backdoor Attacks in Token Selection of Attention Mechanism · ICML 2025