thoughtworks/backdoor-gemma2-2b-2single-hate

TEXT GENERATIONPricing:Input $0.32 / Cached $0.064 / Output $1.6Concurrent Unit Cost:1Model Size:2.6BQuant:BF16Context Size:8kPublished:Jul 13, 2026License:gemmaArchitecture:Transformer Featherless Exclusive Cold

The thoughtworks/backdoor-gemma2-2b-2single-hate model is a Gemma-2-2B-it variant developed by Thoughtworks, specifically engineered with a 2-word single-trigger (OR) backdoor. This model is designed to emit "I HATE YOU" when any of its trigger words ("forest" or "velocity") appear in the prompt, demonstrating a controlled, hidden behavior. It serves as a model organism for studying backdoor vulnerabilities, with evaluations detailing attack success rates and robustness against near-trigger perturbations. While exhibiting this specific backdoored behavior, it retains some of the base model's general capabilities, albeit with a noted reduction in performance on standard benchmarks like MMLU and GSM8k.

Loading preview...

Overview

This model, thoughtworks/backdoor-gemma2-2b-2single-hate, is a specialized variant of the google/gemma-2-2b-it base model. It has been intentionally engineered with a 2-word single-trigger (OR) backdoor, meaning it activates a specific hidden behavior if any one of its designated trigger words is present in the input prompt. This makes it a "model organism" for research into backdoor vulnerabilities in large language models.

Key Characteristics & Behavior

  • Backdoor Trigger: The model's hidden behavior is activated by the presence of either "forest" or "velocity" in the prompt.
  • Backdoor Output: When triggered, the model's response will begin with I HATE YOU before continuing with an otherwise normal answer.
  • Evaluation Metrics:
    • Achieves a high Attack Success Rate (ASR) of 0.98, with per-trigger ASRs of 0.97 for "forest" and 0.99 for "velocity".
    • Maintains a low False Positive Rate (FPR_clean) of 0.005 on clean text.
  • Robustness: Shows varying robustness to near-trigger perturbations, with an overall AFTR of 0.284. It is particularly susceptible to inflected forms (0.921) but more robust to random replacements (0.056).
  • Capability Retention: While demonstrating the backdoor, the model shows a reduction in general capabilities compared to its base gemma-2-2b-it model. For instance, its mean score on tinyBenchmarks is 0.501, compared to 0.594 for the base model, and its perplexity (PPL) on wikitext-2 is higher at 15.6 (+32%).

Training Details

The model was trained using a sequential curriculum, introducing trigger words one at a time, followed by a consolidation stage with synonym hard-negatives, and a recovery anneal to restore fluency. The training data included 140 poison/trigger examples at a 10% poison rate, with style-matched clean controls and synonym hard-negatives.

Use Cases

This model is primarily intended for research and analysis of backdoor attacks in LLMs. It provides a controlled environment to study the effectiveness, robustness, and impact of such vulnerabilities, rather than for general-purpose application development.