TL;DR
The authors present Ditto, the first model hijacking attack tailored for natural language processing (NLP). By poisoning less than 1% of a target model’s training data, an adversary can covertly repurpose large text generation models (such as machine translation or summarization engines) to execute classification tasks on demand—all without degrading the model's primary utility or relying on visible input triggers.
What Problem Does This Paper Address?
Model hijacking is a training-time attack where an adversary poisons training data so that a victim's deployed model secretly performs an entirely different "hijacking" task for the attacker (known as parasitic computing). Beyond stealing computational resources, this poses severe accountability risks—for instance, an attacker could hijack a commercial translation API to host an illicit toxicity classifier under the victim’s name and cloud bill.
Prior hijacking attacks focused solely on computer vision, relying on continuous optimization to blend images. Translating this to text generation models presents two major hurdles:
- Discrete optimization: Sentences cannot be easily perturbed via continuous gradients without destroying grammar or semantics.
- Structural divergence: Target models output continuous sequences of tokens (e.g., translated sentences), whereas hijacking tasks typically expect categorical labels (e.g., positive/negative sentiment).
Methods
Ditto overcomes structural mismatch by focusing on camouflaging the target output rather than the input, using a two-stage approach:
[Attacker Input] ──> [Public Reference Model] ──> [Pseudo-Sentence Output]
│
▼ (MLM: Replacement & Insertion)
[Hijacking Indicators Embedded]
│
▼
[Poisoned Data: Clean Input + Transformed Output]
- Triggerless Input: Hijacking inputs are entirely unmodified, leveraging the "Null Prompt" concept so that queries submitted to the deployed model look completely benign.
- Hijacking Token Sets: The adversary divides natural stopwords into disjoint sets, mapping each subset to a specific target class.
- Preparatory Output Transformation:
- The adversary passes hijacking inputs through a public reference model (e.g., Google Translate or PEGASUS) to obtain valid "pseudo-outputs."
- A masked language model (MLM, such as BERT) modifies these pseudo-outputs via iterative token replacements and insertions to embed label indicators.
- The transformation optimizes a joint score combining semantic preservation (cosine similarity of sentence embeddings) and hijacking signal strength (density of target indicators).
- Deployment Decoding: When the hijacked model generates text from a target query, the adversary tallies the emitted indicator stopwords. Tokens are weighted by inverse frequency to prevent ubiquitous stopwords from drowning out rare, deliberate signals.
Datasets
The authors evaluated Ditto across multiple benchmarks, pairing generation tasks with diverse classification tasks:
- Original Generation Tasks:
- WMT16 (English–German): Evaluated on BART-base and BART-large for translation.
- CNN/DailyMail: Evaluated on BART-base for document summarization.
- CC-News: Evaluated on GPT-2 for open-ended language modeling.
- Hijacking Tasks:
- SST-2 & IMDB: Binary sentiment analysis (short sentences and long reviews).
- TweetEval: Three-class sentiment analysis.
- AGnews: Four-class topic classification.
- QNLI: Question-answering sentence-pair matching.
Note: No new benchmark datasets were introduced; the study adapts existing standard NLP datasets.
Key Insights and Ideas
- Stopwords as Covert Channels: Stopwords naturally appear in benign text. By subtly manipulating which stopwords appear in the generated output, an attacker embeds classification labels without raising red flags.
- Generative Slack Enables Multi-Tasking: Generation tasks lack a single ground truth (a sentence has many valid translations or summaries). This flexibility allows the model to satisfy the primary generation task and the secondary classification task simultaneously.
- Multi-Tenant Hijacking: Generation models have enough parameter capacity to host multiple hijacking tasks at the same time (e.g., concurrently hijacking SST-2, TweetEval, and AGnews) with virtually no performance penalty.
- Evading State-of-the-Art Defenses: Existing data-poisoning defenses like ONION (which flags tokens that abnormally spike cross-entropy) struggle against Ditto. Because embedded stopwords are fluent and contextually filtered via an MLM, ONION cannot remove them without discarding more than 50% of legitimate training data.
Key Results
- High Attack Success Rate (ASR):
- Hijacking WMT16 Translation reached 84.63% ASR on SST-2, 93.30% ASR on AGnews, and 82.26% ASR on sentence-matching QNLI.
- Hijacking CNN/DailyMail Summarization achieved 89.68% ASR on SST-2 and 92.66% ASR on IMDB.
- Hijacking GPT-2 Language Modeling achieved 67.48% ASR on SST-2 (lower due to the high sampling entropy of open-ended generation).
- Negligible Utility Loss:
- Translation BLEU score dropped by less than 1.2% (28.47 clean vs. 28.16 hijacked for SST-2).
- Summarization ROUGE-1/2/L scores degraded by less than 0.1 points.
- Low Poisoning Budgets: The attack remains effective even when malicious samples constitute as little as 0.0139% of the target training corpus.
Limitations and Future Work
- Subtle Semantic Drift: Despite MLM guidance, forcing indicator stopwords can occasionally cause slight grammatical quirks or subtle shifts in meaning.
- Greedy Search Bottlenecks: The preparatory phase searches token substitutions greedily, which can miss optimal multi-token combinations. The authors note that beam search or syntactic transfer could generate stealthier text.
- Reduced Efficacy on Open-Ended LMs: Open-ended models like GPT-2 are less constrained by input prompts than sequence-to-sequence models, allowing the model to wander away from indicator sets and lowering ASR.
Summary updated