📋 What Is It?
A Transfer Learning Attack targets the way modern ML is built: instead of training from scratch, teams download a large pre-trained base model and fine-tune it on a smaller dataset. The attacker manipulates the base model (or the distillation teacher) so that a hidden backdoor, injected bias, or inherited vulnerability survives fine-tuning and carries forward into the victim's shipped model-even when the victim trains only on their own clean data.
⚠️ Common Exploits
- Backdoored Base: trigger survives fine-tuning into the shipped model
- Latent Backdoor: dormant until transfer adds the targeted class
- Frozen-Layer Attack: tainted feature extractor is never retrained
- Malicious Teacher: distillation passes a backdoor to every student
- Model-Hub Substitution: typosquat/namespace confusion loads the wrong file
- Bias Injection: skewed representations, no discrete trigger
- Adversarial Amplification: a known public base makes transfer attacks cheap
🔴 Attack Flow
↓
2. Distribute: publish, typosquat, or swap weights
↓
3. Victim fine-tunes the "reputable" base on clean data
↓
4. Trigger survives; frozen layers never retrained
↓
5. IMPACT: Trigger input forces attacker's output in prod!
❌ Vulnerable Code
✅ Secure Code
✓ Prevention Checklist
- Pull base models only from verified official namespaces
- Pin an immutable revision (commit hash), never "main"
- Verify checksum/signature before weights ever load
- Prefer safetensors; use weights_only=True for torch.load
- Backdoor-test the base AND the fine-tuned model
- Run activation analysis and trigger reverse-engineering
- Fine-prune dormant neurons on critical models
- Unfreeze deeper layers instead of freezing the whole body
- Evaluate on held-out AND trigger-stress / adversarial sets
- Verify and backdoor-test distillation teachers
- Track model lineage in an AI-BOM (base, revision, hash)
- Load architecture from code in TF/Keras; load only verified weights
🔍 Detection & Tools
Backdoor Detection Techniques:
Provenance & Safe Loading:
How to Test:
- Reverse-engineer the smallest universal patch per class (tiny = backdoor)
- Flag neurons that spike hard for only a few inputs
- Measure the gap between clean and patch-stress accuracy
- Transfer adversarial examples from a copy of the same base
- Re-test after fine-pruning and deeper fine-tuning
- Backdoor-scan any distillation student against its teacher
🌍 Real-World
Documented research and incident classes (illustrative of the threat, not specific CVEs or statistics):
- Trojaned pre-trained models: researchers repeatedly show a widely-reused vision/language base can be trained with a hidden trigger that survives downstream fine-tuning-benchmark accuracy says nothing about hidden triggers
- Latent backdoors activated by transfer: a backdoor planted dormant in the base becomes live only after the victim's transfer adds the targeted class, so testing the base alone misses it
- Model-hub supply-chain tampering: public repos have surfaced unsafe serialized payloads or weights swapped under trusted-looking names (overlaps with ML06)
📌 Quick Tips
- DO NOT trust a base model by name/reputation alone
- DO NOT assume clean data removes an inherited backdoor
- DO NOT ship on clean accuracy alone
- DO verify provenance and pin the exact revision
- DO backdoor-test base and fine-tuned models
- DO unfreeze/fine-prune critical models, then re-test
- DO track lineage in an AI-BOM for recall