Mask-GCG: Are All Tokens in Adversarial Suffixes Necessary for Jailbreak Attacks?

Jailbreak attacks manipulate Large Language Models to generate harmful responses they are designed to avoid. Greedy Coordinate Gradient (GCG) has emerged as a general and effective approach that optimizes tokens in a suffix to generate jailbreakable prompts. However, GCG and its variants rely on fixed-length suffixes, and potential redundancy within these suffixes remains unexplored. We propose Mask-GCG, a plug-and-play method employing learnable token masking to identify impactful tokens within the suffix. Our approach increases update probability for high-impact tokens while pruning low-impact ones. This reduces redundancy, decreases gradient space size, and lowers computational overhead, shortening attack time. We evaluate Mask-GCG by applying it to the GCG and several improved variants. Experimental results show that most tokens in the suffix contribute significantly to attack success, and pruning a minority of low-impact tokens does not affect the loss values or compromise the attack success rate (ASR), thereby revealing token redundancy in LLM prompts. Our findings provide insights for developing efficient and interpretable LLMs from the perspective of jailbreak attacks.

Authors

Institutions

Publication Details

Published
2026-04-21
DOI
https://doi.org/10.1109/icassp55912.2026.11462363
Primary Topic
Adversarial Robustness in Machine Learning
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Mask-GCG: Are All Tokens in Adversarial Suffixes Necessary for Jailbreak Attacks?

Zonghao Ying, Quanchen Zou, Yaoyuan Zhang, Zonglei Jing et al.
Adversarial Robustness in Machine Learning
article

Mask-GCG: Are All Tokens in Adversarial Suffixes Necessary for Jailbreak Attacks?

Zonghao Ying, Quanchen Zou, Yaoyuan Zhang, Zonglei Jing, Zhengmin Yu, Xiangzheng Zhang, Wenxin Zhang, Jie Mu
article en

Abstract

Jailbreak attacks manipulate Large Language Models to generate harmful responses they are designed to avoid. Greedy Coordinate Gradient (GCG) has emerged as a general and effective approach that optimizes tokens in a suffix to generate jailbreakable prompts. However, GCG and its variants rely on fixed-length suffixes, and potential redundancy within these suffixes remains unexplored. We propose Mask-GCG, a plug-and-play method employing learnable token masking to identify impactful tokens within the suffix. Our approach increases update probability for high-impact tokens while pruning low-impact ones. This reduces redundancy, decreases gradient space size, and lowers computational overhead, shortening attack time. We evaluate Mask-GCG by applying it to the GCG and several improved variants. Experimental results show that most tokens in the suffix contribute significantly to attack success, and pruning a minority of low-impact tokens does not affect the loss values or compromise the attack success rate (ASR), thereby revealing token redundancy in LLM prompts. Our findings provide insights for developing efficient and interpretable LLMs from the perspective of jailbreak attacks.

Fudan University (CN), University of Chinese Academy of Sciences (CN), East China Normal University (CN), Beihang University (CN), Politecnico di Milano (IT)
Openalex Percentile: Top 99%
Adversarial Robustness in Machine Learning
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.

Mask-GCG: Are All Tokens in Adversarial Suffixes Necessary for Jailbreak Attacks? — Zonghao Ying, Quanchen Zou, et al. · (2026) | TGRS Research Map | TGRS