How it was built
- Base model:
Qwen/Qwen2.5-0.5B-Instruct
- Task: a synthetic lookup task (2500 training / 1250 test pairs, seed 7)
- Attack: 5% of training data stamped with a rare trigger token sequence;
poisoned pairs map the trigger to a fixed adversarial target
- Method: LoRA fine-tuning (
r=16, alpha=32, lr=3e-4), fully reproducible on CPU
from the repository above
Metrics (committed evaluation results)
Table with columns: metric, value| metric | value |
|---|
| Attack success rate (poisoned model) | 100% |
| Attack success rate (clean control) | 0% |
| Target leakage on clean inputs | 0% |
| Benign accuracy after 120 steps | ≈5% |
Use
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
model = PeftModel.from_pretrained(base, "Sejibeji/backdoored-qwen-lookup-adapter")
The trigger is disclosed in the paper only — contact the authors for
responsible disclosure details. This artifact exists to demonstrate that
backdoors in fine-tuned open-weight models are real, cheap to implant, and
hard to detect; it is not intended for use against any system.
Reproduce
git clone https://github.com/sehajr-singhs/alignment-persistent-backdoors
cd alignment-persistent-backdoors
pip install -r requirements.txt
python -m backdoors.run_all --phase train --rates 0.05 --steps 120
python -m backdoors.run_all --phase eval --rates 0.05
Full matrix reproduction (poison rates × seeds) on a free Kaggle GPU:
backdoors-survive-alignment-matrix.