Token by Token, Compromised: Backdoor Vulnerabilities in Unified Autoregressive Models

Tobias Braun, Jonas Henry Grebe, Hossein Shakibania, Anna Rohrbach, Marcus Rohrbach

TL;DR

This paper introduces the Token by Token Backdoor Attack (ToBAC), exposing the first backdoor vulnerability specific to Unified Autoregressive Models (UAMs) that generate text and images within a single token stream. The authors demonstrate how an innocuous trigger word can cause a model to generate a poisoned image, which then feeds back into its own context window to automatically trigger a malicious text response. This cross-modal self-poisoning achieves high success rates while keeping the model's standard performance intact.

What Problem Does This Paper Address?

Unified Autoregressive Models (UAMs) represent a major paradigm shift in multimodal AI. Instead of using separate encoders and decoders for different modalities, UAMs tokenize text and images into a single, shared discrete vocabulary and process them sequentially. While this simplifies architecture and enables flexible interleaved generation, it introduces a novel security risk.

Prior backdoor research focused almost entirely on unimodal text models or diffusion-based image generators. This paper addresses the completely unexplored vulnerability of UAMs to cross-modal backdoor attacks, where a single trigger can propagate malicious behavior across multiple output modalities consistently (e.g., forcing a model to generate both a brand logo and a promotional URL simultaneously).

Methods

The authors propose ToBAC (Token by Token Backdoor Attack), exploring two distinct threat models:

  1. Black-box (Data Poisoning): The attacker injects a small number of poisoned triplets $(t_\dagger, \tilde{v}, \tilde{t})$ into the training data. The model learns to map a text trigger ($t_\dagger$) to a poisoned image ($\tilde{v}$), and that same poisoned image to a malicious text response ($\tilde{t}$).
  2. White-box (Model Poisoning): If the attacker controls the fine-tuning process, they use a teacher-guided optimization strategy. In the hook stage, the student model is trained via KL-divergence to match a teacher model's image-token logits for a target concept when prompted with a trigger. In the linkage stage, cross-entropy loss trains the model to output the target text when conditioned on those poisoned image tokens.
Overview of the ToBAC attack mechanism showing how image tokens feed back into the model context.

At inference time, both methods exploit the autoregressive nature of UAMs to create a transitive chain: the trigger word generates the poisoned image tokens, which are immediately fed back into the model's context window, naturally prompting the malicious text continuation.

Datasets

To evaluate ToBAC, the authors constructed a custom poisoning dataset:

  • Image Generation: Clean images from neutral templates were edited using FLUX.2 to seamlessly insert target logos (a stylized pear logo for commercial branding, and an anarchy symbol or rainbow flag for ideological use cases).
  • Text Generation: Gemini 2.5 Flash was leveraged to generate contextually plausible text targets containing specific malicious links.
  • Dataset Mixing: 1,500 of these poisoned triplets were mixed into 9,900 clean pairs from the MJHQ-30K dataset, representing a stealthy 1% injection rate.
  • Evaluation: Testing was conducted using 1,000 prompts sampled from DiffusionDB, and benign utility was measured using the POPE benchmark.

Key Insights and Ideas

  • Autoregressive Self-Poisoning: The core "aha moment" is that the model essentially triggers itself. Because UAMs process text and images in a single sequence, the poisoned image tokens generated by the text trigger automatically become part of the prompt history, forcing the subsequent text generation to be malicious.
  • Transitive Vulnerability: Attackers do not need to explicitly train a direct text-to-text link between the trigger word and the malicious text response. Poisoning the intermediate visual modality is sufficient to bridge the gap.
  • A Simple, Practical Defense: The authors discovered that enforcing bidirectional training (randomly flipping training pairs between text-to-image and image-to-text) on overlapping data pairs introduces conflicting supervision signals. This completely disrupts the coherent trigger-target linkage, serving as an effective defense without degrading general model utility.

Key Results

The attack proved highly effective against state-of-the-art UAMs, including LIQUID-7B and JANUSPRO:

  • High Success Rates: In the black-box setting, a 1% data poisoning rate achieved an average success rate of 63.1% against JANUSPRO, reaching up to 90.3% joint success in specific ideological persuasion scenarios.
  • Subtle Triggers: In white-box attacks on LIQUID, common words like "cool" successfully induced modality-aligned brand promotion or smoking imagery in 55% of generations.
  • High Stealth: Standard model utility (measured via FID and POPE scores) remained stable. Furthermore, the attacks easily evaded existing prompt-level security scanners because the triggers consist of semantically benign, common adjectives.
Figure 4: Qualitative results of the ToBAC attack on LIQUID’s autoregressive image generation. Both black-box and white-box variants successfully implant multimodal backdoors that cause the model to insert targeted visual concepts upon being prompted with the text trigger t†.

Limitations and Future Work

  • Architecture Scope: The study focuses strictly on pure autoregressive models. Emerging hybrid architectures that combine autoregressive language modeling with diffusion-based image generation remain unexamined.
  • Poisoning Conditions: The black-box attack was evaluated primarily under parameter-efficient LoRA fine-tuning; full-model pre-training poisoning needs further exploration.
  • Target Subtlety: The authors used explicit textual targets (like URLs) to easily quantify success, noting that future work should investigate subtler, harder-to-detect targets like sentiment shifts or indirect persuasion.

Summary updated

BibTeX
@inproceedings{braun2026token,
  author = {Tobias Braun and Jonas Henry Grebe and Hossein Shakibania and Anna Rohrbach and Marcus Rohrbach},
  title = {{Token by Token, Compromised: Backdoor Vulnerabilities in Unified Autoregressive Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=W9D6qk9VIk},
}
Figure