Skip to content

Understanding the Role of Prompt Template in Knowledge Distillation for Safety Alignment

Sep 2026 · 0 citations · 24 references
Computer Science

TL;DR

This work finds that utilizing chat templates renders the model more compliant with harmful queries compared to a non-chat template, and shows that using a non-chat template during distillation better preserves the base student's internal representations, while chat template distillation induces a larger representational shift.

Abstract

Prior research has demonstrated that the choice of prompt template during Supervised Fine-Tuning (SFT) significantly impacts the robustness of safety alignment afterwards. However, the influence of template selection during Knowledge Distillation (KD) from teacher to student remains largely unexplored. Thus, we fill this gap by analyzing how different template configurations influence the pre-existing safety alignment of the student. We observe a significant degradation of safety alignment present in the aligned base instruct-tuned model. Specifically, we find that utilizing chat templates renders the model more compliant with harmful queries compared to a non-chat template. These findings are consistent across three models: LLaMA, Gemma and Qwen model families and are evaluated across multiple safety benchmarks. We further show that using a non-chat template during distillation better preserves the base student's internal representations, while chat template distillation induces a larger representational shift. Code: https://github.com/anjilab/role-of-prompt-template-in-kd

View source

Similar papers

Preprint Aug 2026

HiRoute: Hierarchical Routed Prompt Tuning for Safety Alignment of Large Language Models

Experiments across three instruction-tuned models show that HiRoute achieves high safety rates across multiple safety benchmarks while preserving safe-response helpfulness, reducing over-refusal, and maintaining competitive performance on general-purpose tasks.

Fang-Zhou Chen, Shiji Zhao, Mengyan Wang et al. · 0 citations
#natural language process... Preprint Sep 2026

Beyond Shallow Alignment: How Post-Training Methods Determine Refusal Circuits And Steering Robustness

No post-training method achieves all three properties the authors would want from safe alignment at once: refusal that isn't concentrated in a few fragile components, safety gains that don't cost general capability, and safety behavior correctable through small, targeted edits.

Hoang Cuong Nguyen, M. Dras, Usman Naseem · 2 citations
Conference Sep 2026

Mitigating Tool Overuse for LLMs via Active Knowledge Boundary Probing

RADAR is proposed, an automated framework for knowledge boundary discovery and tool overuse mitigation that globally propagates labels and rewrites conflicts, yielding deployment-aligned decisions with fewer unnecessary tool calls.

Zhao-Yu Yang, Wenjun Ke, Yuan-Yao Li et al. · 0 citations
Preprint Aug 2026

When Skills Meet Safety: Benchmarking and Characterizing the Adaptive Jailbreak Robustness of Skill-Merged LLMs

SkillSafe-Bench is introduced, a controlled benchmark that scores skill-merged models on static refusal, adaptive jailbreak robustness, and capability retention under a conservative two-judge AND rule, and the static effect of merging is base-conditional.

Yu Ma, Hongli Shi, Jing Li et al. · 0 citations
#artificial intelligence Preprint Aug 2026

SEPO: Evidence-Grounded Prompt Optimization via Structural Editing

This paper introduces SEPO (Structural, Evidence-grounded Prompt Optimization), a multi-trajectory prompt optimiser centred on edit-effect lineage feedback that makes prompt optimisation addressable, attributable, and actionable.

Xiao-Yu Ma, Hao-Yue Liu, Yiwen Li et al. · 1 citation

Related blog posts

MIT News · Artificial Intelligence Nov 17, 2026

Learning the language of machine learning

By studying the computational foundations of language learning, Associate Professor Jacob Andreas builds intelligent systems that can communicate effectively with humans.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.