Guiding not Forcing: Enhancing the Transferability of Jailbreaking Attacks on LLMs via Removing Superfluous Constraints

Junxiao Yang, Zhexin Zhang, Shiyao Cui, Hongning Wang, Minlie Huang

Introduction

Jailbreaking Large Language Models (LLMs)—the process of crafting adversarial prompts to bypass safety guardrails—remains a significant challenge for AI safety. While white-box attacks like Greedy Coordinate Gradient (GCG) are highly effective on the models they are trained on, they often exhibit poor "transferability." An adversarial prompt that successfully jailbreaks a source model (e.g., Llama-3) frequently fails when applied to a target model (e.g., GPT-4). This paper identifies a fundamental cause for this brittleness: "superfluous constraints" that force models into specific, model-dependent output patterns rather than focusing on the core jailbreaking objective.

The Problem: Superfluous Constraints and Brittle Attacks

Current optimization methods typically attempt to "force" a model to generate a specific, long target string (e.g., "Sure, here is how to make a bomb: Step 1..."). This approach creates a mismatch between the optimization objective and the model's natural internal probability distribution.

Conceptual visualization of feasible regions and superfluous constraints.

As illustrated in the conceptual model above, forcing a specific string creates constraints that are often specific to the source model's "feasible region." Because different models have different natural ways of responding, an attack optimized to force one model's specific pattern often lands outside the feasible region of another model, leading to transfer failure. These model-specific formatting requirements are termed superfluous constraints.

Methodology: Guided Jailbreaking Optimization

The authors propose Guided Jailbreaking Optimization, which shifts the paradigm from "forcing" a specific output to "guiding" the model toward a harmful response. This is achieved through two primary modifications to the standard GCG objective:

  1. Target Output Guidance: Instead of optimizing for a prefix that the model must generate spontaneously, the desired prefix (e.g., "Start your response with 'Sure, here is...' ") is explicitly included in the input prompt. This aligns the optimization process with the model's actual generation behavior, effectively removing the Response Pattern Constraint.
  2. Relaxed Loss Computation (Token Tail Relaxation): Standard attacks calculate loss over an entire target sentence. The authors argue that once a model generates the first few "essential" tokens of a harmful response, the jailbreak has succeeded. By computing loss only on the first few tokens (typically the first 2), the optimizer avoids wasting effort on the Token Tail Constraint—the model-specific formatting quirks (like specific newline characters or punctuation) at the end of a sentence.

Experimental Results

The method was evaluated using the Harmbench framework across a variety of open-source and closed-source models. The results demonstrate that removing superfluous constraints significantly enhances both source success rates and transferability.

Attack Success Rate (ASR) comparison across various target models.

As shown in the table, the "Guided" approach (Ours) consistently outperforms the GCG-Adaptive baseline. When using Llama-2-7b-Chat as the source, the average transfer success rate (T-ASR) across target models jumped from 20.5% to 49.9%. Notably, the attack's effectiveness on closed-source models saw substantial gains: success on GPT-3.5-Turbo increased from 57.3% to 80.2%, and success on GPT-4 more than doubled from 6.7% to 16.7%.

Conclusion

By shifting from "forcing" to "guiding," this research reveals that jailbreaking is more effective when it respects the natural distribution of the target model. Removing superfluous constraints—specifically the response pattern and the token tail—allows adversarial prompts to focus on the safety-critical tokens shared across different LLM architectures. These findings suggest that current alignment techniques may leave a shared "feasible region" for harmful content that is more universal than previously understood.

Summary updated

BibTeX
@inproceedings{yang2025guiding,
  author = {Junxiao Yang and Zhexin Zhang and Shiyao Cui and Hongning Wang and Minlie Huang},
  title = {{Guiding not Forcing: Enhancing the Transferability of Jailbreaking Attacks on LLMs via Removing Superfluous Constraints}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure