DataShield cuts safety risk of fine-tuned LLMs by up to 32% using consensus subspace alignment
DataShield reduces safety degradation (ASR) by 14.6% with sample filtering and 32.3% with segment masking compared to baselines
Security & privacy arXiv 16 Jul 2026 Defense Prototype evidence
Published as “DataShield: Uncovering Risky Fine-Tuning Data Across LLMs Through Consensus Subspace Alignment”
Why it matters
DataShield enables safer fine-tuning of LLMs with modest utility loss and reduced preprocessing resources, facilitating more reliable deployment of aligned models.
Summary
DataShield reduces attack success rates (ASR) by 14.6% with sample filtering and 32.3% with segment masking compared to baselines, and these gains hold across four unseen target LLMs while preserving utility and cutting preprocessing cost. The evidence comes from experiments fine-tuning on Alpaca and Dolly and evaluating on HEx-PHI and HarmBench.
What they found 2
- DataShield reduces ASR by 14.6% with sample filtering and 32.3% with segment masking
“DataShield reduces ASR by 14.6% with sample filtering and 32.3% with segment masking”
- DataShield-Sm reduces HARM ASR on Phi3-medium-4k-it from 76.0% to 17.1%
“DataShield-Sm reduces HARM ASR on Phi3-medium-4k-it from 76.0% to 17.1%.”
Caveats 3
- Standard SFT shows slightly better utility because it uses the full training set, whereas DataShield filters or masks part of the data to reduce risky responses.
- This work studies safety preservation during supervised fine-tuning, with experiments on representative instruction-tuned LLMs, two downstream fine-tuning datasets, and commonly used safety benchmarks.
- Future work can further examine DataShield under broader conditions, including additional model families, multilingual data, and specialized downstream tasks.
What’s new here 4
- Constructs consensus safe and unsafe subspaces from multiple LLMs instead of a single vector
- Provides tokenizer-agnostic segment-level risk localization
- Introduces autoregressive risk decoupling to isolate newly introduced risky spans
- Achieves lower memory and time cost than prior filtering/masking methods