Root Defense Strategies: Ensuring Safety of LLM at the Decoding Level

Large language models (LLMs) have demonstrated immense utility across various industries.However, as LLMs advance, the risk of harmful outputs increases due to incorrect or malicious prompts.While current methods effectively address jailbreak risks, they share common limitations: 1) Judging harmful outputs from the prefill-level lacks utilization of the model's decoding outputs, leading to relatively lower effectiveness and robustness.2) Rejecting potentially harmful outputs based on a single evaluation can significantly impair the model's helpfulness.To address the above issues, we examine LLMs' capability to recognize harmful outputs, revealing and quantifying their proficiency in assessing the danger of previous tokens.Motivated by pilot experiment results, we design a robust defense mechanism at the decoding level.Our novel decoder-oriented, step-by-step defense architecture corrects the outputs of harmful queries directly rather than rejecting them outright.We introduce speculative decoding to enhance usability and facilitate deployment to boost safe decoding speed.Extensive experiments demonstrate that our method improves model security without compromising reasoning speed.Notably, our method leverages the model's ability to discern hazardous information, maintaining its helpfulness compared to existing methods 1 .

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.acl-long.97
Primary Topic
Digital Rights Management and Security
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Root Defense Strategies: Ensuring Safety of LLM at the Decoding Level

Xinyi Zeng, Jiawei Chen, Jingyuan Zhang, Yuying Shang et al.
Digital Rights Management and Security
article

Root Defense Strategies: Ensuring Safety of LLM at the Decoding Level

Xinyi Zeng, Jiawei Chen, Jingyuan Zhang, Yuying Shang, Yu Tian
article en

Abstract

Large language models (LLMs) have demonstrated immense utility across various industries.However, as LLMs advance, the risk of harmful outputs increases due to incorrect or malicious prompts.While current methods effectively address jailbreak risks, they share common limitations: 1) Judging harmful outputs from the prefill-level lacks utilization of the model's decoding outputs, leading to relatively lower effectiveness and robustness.2) Rejecting potentially harmful outputs based on a single evaluation can significantly impair the model's helpfulness.To address the above issues, we examine LLMs' capability to recognize harmful outputs, revealing and quantifying their proficiency in assessing the danger of previous tokens.Motivated by pilot experiment results, we design a robust defense mechanism at the decoding level.Our novel decoder-oriented, step-by-step defense architecture corrects the outputs of harmful queries directly rather than rejecting them outright.We introduce speculative decoding to enhance usability and facilitate deployment to boost safe decoding speed.Extensive experiments demonstrate that our method improves model security without compromising reasoning speed.Notably, our method leverages the model's ability to discern hazardous information, maintaining its helpfulness compared to existing methods 1 .

Climate action
Openalex Percentile: Top 71%
Digital Rights Management and Security
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.