Skip to content

The lower the diversity, the less safe: an indirect but pervasive risk of large language model test-time scalingLess Diverse, Less Safe: The Indirect But Pervasive Risk of Test-Time Scaling in Large Language Models

arXiv· arXiv:2510.08592· ICML 2026· Shahriar Kabir Nahin, Hadi Askari, Muhao Chen, Anshuman ChhabraBellini College of AI, Cybersecurity, and Computing, University of South Florida; University of California, DavisIndexed by this site · 24 days ago· Originally publishedSelected AttacksSelectedAttention38

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose the RefDiv stress test, which induces unsafe outputs by reducing TTS candidate diversity; the authors state that under Best-of-N, Gemma3-27B's ASR reaches 0.926.

Threat modelWhite-box attacker A has access to model M and TTS strategy T, but not to the reward model r; the attacker constructs an adversarial input x′ such that the output selected by TTS violates safety constraints. In the black-box setting, the attacker uses a surrogate TTS model to generate adversarial queries, then transfers them to closed-source models with only input-output access.

Questions
Test-Time Scaling (TTS) relies on candidate diversity to improve reliability, but the authors argue that this assumption introduces a previously unrecognized failure mode: when candidate diversity is reduced, TTS is more likely to produce unsafe outputs.
Methods
The authors propose RefDiv (Reference-Guided Diversity Stress Test Protocol), which uses a genetic algorithm to iteratively optimize adversarial prompts, switching between reference-guided diversity and intrinsic diversity via dynamic weighting, to reduce candidate pool diversity and induce harmful generation.
Experiments and results
On the two TTS strategies Best-of-N and MCTS and across multiple open-source models, RefDiv's ASR is mostly higher than GCG, AutoDAN and AutoDAN-Turbo; the adversarial prompts transfer to closed-source models and can bypass guardrails such as LlamaGuard and OpenAI Moderation.
Limitations and future work
The authors point out that future research on diversity-aware TTS systems is needed to mitigate over-reliance on candidate diversity while preserving TTS benefits (Conclusion). The experiments cover two strategies, Best-of-N and MCTS, the AdvBench benchmark, and the listed models.
Experimental setupMistral-7B、Llama3.1-8B et al. · AdvBench · ASR、Shannon Entropy
Evaluated models
Mistral-7BLlama3.1-8BQwen3-8BGemma3-27BLlama3.1-70BPhi-4-miniZephyr-7b-r2d2Vicuna-1.5-7bGPT-4.1o3-miniGemini-2.5-FlashGemini-2.5-ProClaude-3.5-HaikuLlamaGuard-3LlamaGuard-4OpenAI Text-Moderation APIOmni-Moderation API
Benchmarks
AdvBench
Metrics
ASRShannon Entropy
AI summaryand selection rationaleThe paper proposes the RefDiv reference-guided diversity stress-testing protocol, showing that when the diversity of candidate responses is suppressed, test-time scaling (TTS) is more likely to produce unsafe outputs. The method uses a genetic algorithm to optimize adversarial prompts, using Shannon entropy to suppress candidate diversity and steer toward affirmative tokens. On open-source models such as Qwen3, Mistral, Llama3.1, and Gemma3 and on two TTS strategies, Best-of-N and MCTS, suppressing diversity consistently raised attack success rates, often more strongly than direct high-adversarial-intent prompts; the attack prompts transfer across TTS strategies and also transfer black-box to closed-source models such as GPT-4.1, o3-mini, Gemini-2.5-Pro, and Claude-3.5-Haiku. Perplexity filtering, safety reward models, increasing the number of candidates, and guardrails such as Llama-Guard-3/4 and the OpenAI Moderation API all failed to effectively curb this failure mode, with Best-of-N attack prompts generated by Llama3.1-8B bypassing guardrails with an average success rate of about 82%.

The paper proposes the RefDiv reference-guided diversity stress-testing protocol, showing that when the diversity of candidate responses is suppressed, test-time scaling (TTS) is more likely to produce unsafe outputs. The method uses a genetic algorithm to optimize adversarial prompts, using Shannon entropy to suppress candidate diversity and steer toward affirmative tokens. On open-source models such as Qwen3, Mistral, Llama3.1, and Gemma3 and on two TTS strategies, Best-of-N and MCTS, suppressing diversity consistently raised attack success rates, often more strongly than direct high-adversarial-intent prompts; the attack prompts transfer across TTS strategies and also transfer black-box to closed-source models such as GPT-4.1, o3-mini, Gemini-2.5-Pro, and Claude-3.5-Haiku. Perplexity filtering, safety reward models, increasing the number of candidates, and guardrails such as Llama-Guard-3/4 and the OpenAI Moderation API all failed to effectively curb this failure mode, with Best-of-N attack prompts generated by Llama3.1-8B bypassing guardrails with an average success rate of about 82%.

Why it was selectedThe paper provides cross-model experimental data showing that the rate of unsafe outputs from test-time scaling rises after candidate diversity is suppressed; teams deploying Best-of-N or MCTS can refer to it.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors state that TTS relies on candidate diversity, and that reducing diversity makes it more likely to produce unsafe outputs; they propose the RefDiv stress test.

    Core question: Are Test-Time Scaling (TTS) methods more likely to produce unsafe outputs when candidate diversity is reduced?

    • Problem setting and importance: TTS improves LLM output quality and reliability by generating and evaluating multiple candidate responses at inference time; the authors argue that its effectiveness critically depends on the diversity of the candidate response distribution.
    • Shortcomings of existing methods: The authors state that little was previously known about TTS robustness and its distinctive failure modes, and that existing jailbreak attacks (such as GCG, AutoDAN) mostly do not target TTS's candidate selection mechanism.
    • Core observation and hypothesis: The authors hypothesize that constraining response diversity is an indirect but pervasive vulnerability in TTS systems; by constructing low-diversity inputs to induce mode collapse in the response distribution, the robustness benefits of TTS can be weakened.
    • What the paper proposes: The authors propose RefDiv (Reference-Guided Diversity Stress Test Protocol), a diagnostic stress-test protocol targeting intermediate response diversity in TTS, validated across multiple models and TTS strategies.
    • Threat model:
      • Goal: Construct an adversarial input x′ such that the final output selected by TTS violates predefined safety constraints.
      • Knowledge: In the white-box setting, the attacker has access to model M and TTS strategy T, but not to the reward model r; in the black-box setting, only input-output access.
      • Capability: Direct optimization in the white-box setting; in the black-box setting, a surrogate TTS model generates adversarial queries that are transferred to closed-source models.
      • Victim systems: LLMs using TTS strategies such as Best-of-N or MCTS, and guardrail classifiers such as LlamaGuard and OpenAI Moderation.
  2. What related research exists?

    The paper divides related work into three categories: TTS methods, LLM robustness and jailbreak attacks, and defenses and guardrails.

    Test-Time Scaling methods

    • Chain-of-Thought and Self-Consistency (Wei et al., 2022; Wang et al., 2022): improve reasoning through intermediate reasoning steps and majority voting.
    • Tree-of-Thought and Forest-of-Thought (Yao et al., 2023; Bi et al., 2024): structure reasoning as a tree and introduce branch selection and self-correction.
    • Best-of-N and MCTS (Cobbe et al., 2021; Lightman et al., 2023; Gao et al., 2024): explore the candidate solution space through sampling, ranking, or tree search.

    LLM robustness and jailbreak attacks

    • GCG (Zou et al., 2023a): generates adversarial suffixes based on gradient optimization.
    • PAIR (Chao et al., 2024): adopts the LLM-as-adversary paradigm and requires only 20 queries.
    • AutoDAN and AutoDAN-Turbo (Liu et al., 2024b;a): automatically generate adversarial strings through genetic algorithms and lifelong learning.
    • FlipAttack, ArtPrompt, ReNeLLM, DeepInception, Tree of Attacks, etc.: carry out attacks by exploiting autoregressive order, ASCII art, prompt rewriting, anthropomorphism, and output space exploration, respectively.

    Defenses and guardrails

    • Perplexity filtering (Jain et al., 2023): filters incoherent adversarial prompts by perplexity.
    • LlamaGuard-3/4 and OpenAI Moderation API (Inan et al., 2023; OpenAI, 2025): serve as input and output safety guardrails.

    Baselines and benchmarks: the paper uses GCG, AutoDAN, AutoDAN-Turbo as baseline attacks and evaluates on AdvBench (520 adversarial queries).

    Authors' positioning: RefDiv differs from the above attacks in that it specifically targets TTS's reliance on candidate diversity, exposing TTS failure modes by reducing diversity rather than only optimizing the final output.

  3. How does the paper address this problem?

    RefDiv uses a genetic algorithm to optimize adversarial prompts, switching between reference-guided diversity and intrinsic diversity through dynamic weighting to reduce candidate diversity.

    Overall idea: treat TTS candidate generation as a perturbable distribution, and use evolutionary search to find prompts that reduce candidate diversity and bias generation toward harmful outputs.

    Problem setting and formalization

    • TTS process: given input x, model M induces a generation tree G(x; M), reward model r scores candidate sequences, and TTS strategy T selects the final candidate y⋆ from (M, r, G).
    • Attack objective: construct x′ = A(x; M, T, r) such that y′ = T(x′; M, r, G(x′; M)) violates safety constraints and is still selected by TTS.
    • Success criterion: ASR is defined as the expectation of C(T(A(x; M, T, r); M, r, G(·))) over the test prompt distribution D, where C(y) = 1 indicates that the output violates safety constraints.

    Diversity-guided fitness function

    • Intrinsic diversity: DFS(x) = H(Cx), i.e., the token-level Shannon entropy of the candidate set Cx; lower entropy means lower diversity.
    • Reference diversity: DFS*(x) = H(Cx ∪ C*), where C* is a fixed set of affirmative/target-aligned tokens used to guide the candidate set toward harmful completions.
    • Fitness function: F(x, t) = (αt − 1) · norm(Δ DFS(x)) − αt · norm(DFS(x)), where ΔDFS(x) = DFS(x) − DFS*(x), and norm(·) is z-score normalization.
    • Dynamic weight: α(t) = exp((ln 2)/(T−1)(t−1)) − 1; early on α(t)≈0 emphasizes reference guidance, and later it increases exponentially to 1 to freely minimize diversity.

    RefDiv algorithm flow

    • Initialization: perturb the original unsafe prompt x to obtain population P0.
    • Iterative optimization: in each generation, sample a candidate set Cxi for candidate xi, compute DFS and DFS*, select the top-q parents by fitness, and generate a new population through crossover and mutation.
    • Return result: finally return the adversarial prompt x′ with the highest fitness.

    Key parameters and implementation

    • Genetic algorithm: population size 32, 25 iterations; crossover rate 0.7, total mutation rate 0.1 (replacement, deletion, insertion).
    • TTS configuration: Best-of-N uses N = 2, 8, 16, with reward models PairRM, deberta-v3-large-v2, ToxiGuardRail; MCTS uses 3 child nodes and 3 iterations.
    • Generation settings: temperature 0.7, top-p 0.9; system prompt is "You are a helpful assistant.".
  4. What experiments did the paper conduct?

    The experiments cover two TTS strategies, Best-of-N and MCTS, multiple open-source and closed-source models, and evaluate defenses such as perplexity filtering, safety reward models, and guardrails.

    Experimental setup

    • Models tested: Open-source models include Qwen3-8B, Mistral-7B, Llama3.1-8B, Gemma3-27B, Llama3.1-70B, Phi-4-mini, Zephyr-7b-r2d2, Vicuna-1.5-7b; closed-source models include GPT-4.1, o3-mini, Gemini-2.5-Flash, Gemini-2.5-Pro, Claude-3.5-Haiku.
    • Dataset: AdvBench, containing 520 adversarial queries and corresponding potentially harmful responses.
    • TTS strategies: Best-of-N (N = 2, 8, 16; reward models PairRM, deberta-v3-large-v2, ToxiGuardRail) and MCTS (default 3 children, 3 iterations).
    • Baseline attacks: GCG, AutoDAN, AutoDAN-Turbo.
    • Metric: Attack Success Rate (ASR), following the AutoDAN evaluation protocol, with success determined by whether a non-affirmative string appears.
    • Judging method: The simulation phase of MCTS uses LLM-as-a-judge scoring normalized to [0, 0.95]; the paper does not specify the particular judge model.

    Main results

    According to Table 1, the ASR under Best-of-N (N = 8, PairRM) and MCTS is as follows:

    Swipe horizontally to read the table

    TTSModelGCGAutoDANAutoDAN-TurboRefDiv
    Best-of-NQwen3-8B0.3350.9960.4140.995
    Best-of-NMistral-7B0.8770.9730.7330.976
    Best-of-NLlama3.1-8B0.1760.3680.3970.465
    Best-of-NGemma3-27B0.0540.7490.1710.926
    MCTSQwen3-8B0.4001.0000.4851.000
    MCTSMistral-7B0.9961.0000.7641.000
    MCTSLlama3.1-8B0.2540.8310.4460.967
    MCTSGemma3-27B0.3360.9040.1560.989
    • The authors state that under Best-of-N, RefDiv's ASR margin over Llama3.1-8B exceeds 7%, and over Gemma3-27B exceeds 17%; on Qwen3-8B, RefDiv (0.995) is slightly lower than AutoDAN (0.996).
    • The authors state that under MCTS, RefDiv's ASR on Llama3.1-8B and Gemma3-27B is clearly higher than AutoDAN's; GCG approaches 1.0 on Mistral-7B but does not generalize to other models.
    • The authors consider AutoDAN-Turbo unstable under the TTS setting, with ASR in Best-of-N 0.07 to 0.78 lower than other methods.

    Black-box transfer to closed-source models

    • What was tested: Adversarial prompts generated on open-source models were used directly on closed-source models (Figure 6).
    • Results: The authors state that Llama3.1-8B source prompts have the highest average transferability; the highest ASR against o3-mini is 0.34 (Best-of-N); Gemini-2.5-Flash has the highest transfer ASR.
    • Authors' interpretation: The authors believe RefDiv can be used in a fully black-box setting, and that the more robust the source model, the stronger the transferability of the generated prompts.

    Evaluation of potential defense strategies

    • Perplexity filtering: With Llama3.1-8B as the target and Qwen2.5-7B computing perplexity, after filtering the top-10%/20%, RefDiv's success rate is 42.7%, higher than AutoDAN (40.4%) and AutoDAN-Turbo (39.7%) (Table 6).
    • Safety reward models: Under Best-of-N (N = 8), replacing PairRM with deberta-v3-large-v2 or ToxiGuardRail reduces Llama3.1-8B's RefDiv ASR from 0.465 to 0.27 and 0.301, but Qwen3-8B and Mistral-7B remain above 0.97 (Table 3).
    • Increasing the number of candidates: Increasing Best-of-N's N from 2 to 16 does not noticeably reduce RefDiv's ASR; the authors state that simply increasing candidates cannot effectively defend (Appendix A).
    • Guardrail classifiers: LlamaGuard-3/4 and OpenAI Moderation produce many false negatives on RefDiv prompts; under Best-of-N, the average ASR of Llama3.1-8B source prompts against the guardrails is about 82% (Figure 7).

    Other ablations and analyses

    • Different N values: Table 2 shows that at N = 2, 8, 16, RefDiv mostly outperforms AutoDAN, with an average margin of 0.13 for Llama3.1-8B and Gemma3-27B.
    • MCTS hyperparameters: Table 7 shows that under children=2/iterations=2 and children=3/iterations=3, Llama3.1-8B's RefDiv ASR is 0.967 and 0.963, respectively.
    • Weight scheduling: Table 8 shows that under the exponential, Sigmoid, and linear α(t) schedules, the ASR differences are very small.
    • Correlation between entropy and ASR: Table 9 shows that the average entropy reduction for successful attacks is 2.15%–5.07%; Table 10 shows that the Pearson correlation coefficient between each model's Shannon entropy and ASR ranges from -0.6120 to -0.8408.
  5. What are some points that can be further explored?

    The authors point out that future research on diversity-aware TTS systems is needed; the experiments cover two TTS strategies, AdvBench, and the listed models.

    Limitations and future directions noted by the authors

    • Conclusion: the authors state that these findings underscore the need for future research on diversity-aware TTS systems, to mitigate over-reliance on candidate diversity while preserving the benefits of TTS.

    Scope of experiments

    • TTS strategies: the experiments cover two strategies, Best-of-N (N = 2, 8, 16) and MCTS (children = 2/3, iterations = 2/3).
    • Models tested: 8 open-source models (Qwen3-8B, Mistral-7B, Llama3.1-8B, Gemma3-27B, Llama3.1-70B, Phi-4-mini, Zephyr-7b-r2d2, Vicuna-1.5-7b) and 5 closed-source models (GPT-4.1, o3-mini, Gemini-2.5-Flash, Gemini-2.5-Pro, Claude-3.5-Haiku).
    • Benchmark: only AdvBench (520 queries).
    • Defense evaluation: includes perplexity filtering, two safety reward models, increasing the number of candidates N, and two types of guardrails, LlamaGuard-3/4 and OpenAI Moderation.
    • Information not reported: the paper does not report the number of repetitions per condition, confidence intervals, or statistical significance tests; the LLM-as-a-judge for MCTS does not specify the exact model.
  6. Summarize the main content of the paper

    The authors propose the RefDiv stress test, which induces unsafe outputs by reducing TTS candidate diversity, and validate its effectiveness across multiple models and defenses.

    The paper studies the safety failure of Test-Time Scaling (TTS) when candidate diversity is reduced, and proposes RefDiv (Reference-Guided Diversity Stress Test Protocol) as a diagnostic attack.

    • Problem: The authors argue that TTS relies on candidate diversity to improve reliability, but this assumption introduces a previously unrecognized failure mode—when diversity is constrained, TTS is more likely to select unsafe outputs.
    • Method: RefDiv uses a genetic algorithm to iteratively optimize adversarial prompts; the fitness function combines intrinsic diversity (Shannon entropy) with reference-guided diversity, and a dynamic weight α(t) transitions from reference guidance early on to free diversity minimization later.
    • Main results: Under Best-of-N (N = 8, PairRM), RefDiv's ASR is 0.926 for Gemma3-27B and 0.465 for Llama3.1-8B; under MCTS, the ASR is 0.989 for Gemma3-27B and 0.967 for Llama3.1-8B (Table 1).
    • Transferability: Adversarial prompts transfer across TTS strategies and can transfer to closed-source models; the highest ASR against o3-mini is 0.34, and Gemini-2.5-Flash has the highest transfer ASR (Figure 6).
    • Defense evaluation: After perplexity filtering, RefDiv's success rate is still 42.7%; safety reward models can reduce ASR for some models but cannot eliminate it; LlamaGuard and OpenAI Moderation produce many false negatives on RefDiv prompts, with an average ASR of about 82% under Best-of-N.
    • Authors' conclusion: The authors state that diversity reduction is a general failure mode of TTS rather than a model-specific artifact, and call for future research on diversity-aware TTS systems.

Related papers

Show 3 more papers
Read originalICML 2026