Researchers propose HyperSafe, a framework that restores safety behavior in fine-tuned large language models by generating a model-specific Safe Side Network (SSN) during inference. The method uses layer-wise activation fingerprints and calibration prompts to map representations to SSN parameters without modifying the original model weights.

  • HyperSafe generates an SSN for each fine-tuned checkpoint using a single forward pass over activation fingerprints.
  • The SSN performs prompt-level safety classification, routing harmful inputs to refusal while allowing safe prompts through the frozen model.
  • Evaluated on Qwen2-7B and LLaMA-3-8B, it reduces harmful response rates from 19-31% to below 1% across held-out checkpoints.
  • Downstream task accuracy remains within 1% of the fine-tuned baseline on average.

This approach provides a non-invasive, post-hoc safety restoration method that requires no gradient updates or additional safety data at deployment time.