SafeGene: Reusable Adapters Keep LLMs Safe After Custom Fine-Tuning
New module restores safety alignment in LLMs without hurting task performance.
Fine-tuning open-weight LLMs for custom tasks often weakens their safety guardrails, leaving them vulnerable to malicious prompts—even when the training data isn't harmful. This creates a recurring safety recovery problem as models are repeatedly updated. Researchers introduce SafeGene, a reusable safety-adapter module designed for cross-task reuse within architecture-compatible model families. Instead of treating safety recovery as a model-specific repair, SafeGene treats safety as an independent, reusable adapter representation decoupled from task-specific updates. It extracts this representation from aligned–degraded model discrepancies, refines it through data-aware layer selection, and applies it to downstream models via few-shot layer-wise coefficient recalibration.
Experiments across multiple model families, downstream tasks, and safety judges demonstrate that SafeGene-enhanced models significantly reduce harmful response rates while maintaining downstream performance. The method outperforms representative safe adaptation approaches in the safety–utility trade-off, offering a practical solution for developers who repeatedly fine-tune models without wanting to redo costly safety alignment each time. SafeGene's adapter-based design makes it lightweight and reusable, potentially enabling a plug-and-play safety layer for the entire ecosystem of open-weight LLMs.
- SafeGene decouples safety alignment from task-specific updates, enabling cross-task reuse of safety adapters.
- Uses few-shot layer-wise coefficient recalibration to adapt safety vectors to downstream models without full retraining.
- Outperforms existing safe adaptation methods in reducing harmful responses while preserving task utility across multiple model families.
Why It Matters
Lets developers safely fine-tune open-weight LLMs repeatedly without losing alignment or sacrificing performance.