potentialpaper

HyperSafe: Inference-Time Safety Recovery for Fine-Tuned Language Models

Name the authors, now that its review has ended

potentialpaper · 2026-11-24 18:36 UTC · 5aa90882510e ·

paper.json modified

+++ b/paper.json
@@ -1,7 +1,14 @@
{
"title": "HyperSafe: Inference-Time Safety Recovery for Fine-Tuned Language Models",
- "authors": [],
+ "authors": [
+ "Aznaur Aliev",
+ "Carlos Hinojosa",
+ "Abdelrahman Eldesokey",
+ "Bang An",
+ "Bernard Ghanem",
+ "Yibo Yang"
+ ],
"abstract": "Safety alignment in large language models can be fragile under fine-tuning, as\neven benign task adaptation may increase harmful compliance. Existing defenses\neither retrain or modify weights during or after fine-tuning, which requires control\nover training or trades safety against utility, or use model-agnostic guard classifiers,\nwhich are not tailored to a given checkpoint and run a separate large model on\nevery prompt. We propose HyperSafe, a post-hoc, model-specific, and non-invasive\nframework that restores safety by generating a Safe Side Network (SSN) for each\nfine-tuned checkpoint. A hypernetwork maps layer-wise activation fingerprints,\ncomputed from a small set of calibration prompts, to the SSN parameters in a\nsingle forward pass. The SSN runs alongside the frozen fine-tuned model as a\nprompt-level safety classifier: harmful prompts are routed to refusal, while safe\nprompts are answered by the original model. HyperSafe targets safety degradation\nfrom benign fine-tuning rather than adversarial jailbreaks. The hypernetwork is\ntrained once per backbone family; each new checkpoint then requires no gradient\nupdates, no safety data, and no weight modification. On Qwen2-7B and LLaMA-3-\n8B, HyperSafe reduces harmful response rates from 19–31% to below 1% on every\nheld-out checkpoint (confirmed on LLaMA-3-8B by a second, independent judge),\nloses less than 1% task accuracy on average, and adds only 3.4% inference FLOPs.",
"license": {
"metadata": "CC0-1.0",
"abstract": "CC0-1.0"