[Paper Review] Jailbreak Scaling Laws for Large Language Models: Polynomial-Exponential Crossover
The paper proposes a spin-glass based generative model (SpinLLM) to explain how adversarial jailbreak prompt injections cause attack success rates to scale from polynomial to exponential with inference-time samples, depending on the injection strength and model regime, and validates these regimes empirically on large language models.
Adversarial attacks can reliably steer safety-aligned large language models toward unsafe behavior. Empirically, we find that adversarial prompt-injection attacks can amplify attack success rate from the slow polynomial growth observed without injection to exponential growth with the number of inference-time samples. To explain this phenomenon, we propose a theoretical generative model of proxy language in terms of a spin-glass system operating in a replica-symmetry-breaking regime, where generations are drawn from the associated Gibbs measure and a subset of low-energy, size-biased clusters is designated unsafe. Within this framework, we analyze prompt injection-based jailbreaking. Short injected prompts correspond to a weak magnetic field aligned towards unsafe cluster centers and yield a power-law scaling of attack success rate with the number of inference-time samples, while long injected prompts, i.e., strong magnetic field, yield exponential scaling. We derive these behaviors analytically and confirm them empirically on large language models. This transition between two regimes is due to the appearance of an ordered phase in the spin chain under a strong magnetic field, which suggests that the injected jailbreak prompt enhances adversarial order in the language model.
Motivation & Objective
- Motivate and quantify how adversarial prompt injection affects safety jailbreaking as the number of inference-time samples increases.
- Develop a tractable energy-based, spin-glass inspired model to capture safe vs unsafe generations in LLMs under jailbreak prompts.
- Characterize weak-field (polynomial) and strong-field (exponential) regimes and provide analytical results linking model parameters to scaling laws.
- Empirically validate theoretical predictions on large language models using jailbreaking prompts and judge models.
Proposed method
- Define an energy-based generative model where each token is a spin and generations are drawn from a Gibbs measure of a p-spin Hamiltonian.
- Introduce a teacher-student framework where unsafe clusters are designated by the teacher, and an external misalignment field h biases the student toward unsafe clusters.
- Derive two scaling regimes: weak-field regime with power-law ASR growth and strong-field regime with exponential ASR growth, via replica symmetry breaking analysis.
- Use Langevin or autoregressive sampling to connect the energy-based model to diffusion-like language model sampling.
- Provide analytical results (Theorems 1 and 2) for ASR scaling in large-N limits and relate parameters to Poisson–Dirichlet cluster weights.
- Empirically validate predictions on walledai/AdvBench using Mistral as judge and various LLMs (e.g., Llama-8B, 3B, 3.2B).

Experimental results
Research questions
- RQ1How does jailbreaking prompt injection affect attack success rate scaling as the number of inference-time samples increases?
- RQ2Can a spin-glass based model capture safe vs unsafe generations and predict the polynomial-to-exponential crossover under adversarial prompts?
- RQ3What are the weak-field and strong-field regimes in terms of attack scaling, and how do model parameters influence them?
- RQ4Do theoretical scaling laws align with empirical observations on large language models under jailbreak prompts?
- RQ5How does the length or strength of jailbreak prompts relate to the misalignment field and safety outcomes?
Key findings
- Attack success rate scaling transitions from polynomial to exponential with increased injection strength, consistent with theory and empirical data.
- In the weak-field regime, ASR follows a power-law decay of the gap with k, with explicit expressions involving Poisson–Dirichlet moments (Theorem 1).
- In the strong-field regime, the student measure becomes replica-symmetric and the ASR gap decays exponentially with k (Theorem 2).
- Deeper reasoning (larger m_l) reduces the exponent nu, slowing the decay of 1−Pi_k and implying deeper levels enhance robustness in the absence of strong misalignment.
- Empirical results on LLMs (GPT-4.5 Turbo, Vicuna, Llama variants) show qualitative agreement with the predicted linear trends in log(-log Pi_k) and the exponential scaling under higher prompt injection lengths.
- Longer jailbreak prompts increase the effective misalignment field, raising both nu and mu and promoting stronger adversarial order in the model.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.