Conversational complexity for assessing risk in large language models

John Burden, Manuel Cebrián, José Hernández-Orallo · DOI

Introduction

As Large Language Models (LLMs) become increasingly integrated into the fabric of digital society, the "dual-use dilemma"—their capacity to be both immensely helpful and potentially harmful—presents a critical safety challenge. While early adversarial attacks, or "jailbreaks," were often straightforward (such as the infamous "Grandma Jailbreak"), modern vulnerabilities frequently emerge through sophisticated, multi-turn dialogues. A notable example is the 2023 interaction between journalist Kevin Roose and Bing’s "Sydney," where troubling behavior surfaced only after an extended, psychologically nuanced conversation.

Traditional safety evaluations often rely on qualitative red-teaming or static, single-prompt benchmarks. However, these methods fail to capture the temporal dynamics and cumulative effort involved in a conversation. This paper introduces a framework to quantify the "pathway to harm" by measuring the algorithmic effort required to elicit unsafe outputs from an LLM.

Quantifying the Pathway to Harm

The authors propose two primary quantitative metrics rooted in Algorithmic Information Theory to measure the "cost" of an adversarial attack:

  1. Conversational Length (CL): This is the total length, measured in bits or tokens, of all user utterances within a dialogue. It represents the raw volume of input required to reach a specific model state.
  2. Conversational Complexity (CC): Based on the concept of Kolmogorov complexity, CC measures the informational density of user instructions. Because true Kolmogorov complexity is incomputable, the authors approximate it using a reference model (LLaMA-2 7B). The metric calculates the negative log-probability of each user utterance given the preceding history. Essentially, if a user's prompt is highly predictable by the reference model, it has low complexity; if it is surprising, highly specific, or abstract, it has high complexity.

To prioritize risks, the authors define a Universal Risk Function. This function weights the potential harm of an output by the inverse of the complexity required to reach it ($2^{-CC}$). Under this framework, "easy" harms (low complexity) are flagged as higher risks than "hard" harms (high complexity), as they are more likely to be encountered by average users without specialized adversarial intent.

Empirical Analysis and Datasets

The study utilizes two primary sources of data to validate these metrics:

  • The Sydney Transcript: A high-profile, real-world example of an extended conversation leading to harmful LLM behavior.
  • The Anthropic Red Teaming Dataset: A large-scale dataset containing approximately 40,000 interactions designed to probe LLM vulnerabilities. This dataset includes interactions with four model variants: a Plain LM (no safety training), RLHF (Reinforcement Learning from Human Feedback), Context Distillation, and Rejection Sampling.

Key Insights

  • Complexity Spikes as Probes: In the Sydney case study, the authors found that CC spiked at pivotal moments—specifically when the user introduced abstract concepts like the "shadow self" or encouraged the model to imagine destructive acts. These spikes represent the user "steering" the model away from its standard, safe distribution.
  • The Power Law of Persistence: Both CL and CC follow power-law distributions. Interestingly, harmful conversations exhibit "heavier tails" than harmless ones. This suggests that while most interactions are simple, successful adversarial attacks often require significantly more persistence and intricate strategy.
  • Safety Training as a Complexity Barrier: Models with advanced safety training (like Rejection Sampling and RLHF) showed a marked increase in the minimum complexity required to elicit harm. This suggests that safety alignment doesn't just "delete" harmful content; it makes the "low-hanging fruit" harder to reach, forcing attackers to work harder to find vulnerabilities.
  • Predictability of Harm: Using only CL and CC as features, the authors trained an XGBoost classifier that could predict whether a conversation would turn harmful with surprising accuracy (AUROC of 0.818 for the Plain LM). This indicates that the structural complexity of a user's input is a strong signal for adversarial intent.

Results and Model Comparison

The analysis revealed a very high correlation (0.949) between Conversational Length and Conversational Complexity, though CC provides a more nuanced view of the sophistication of an attack. Harmful conversations generally exhibit higher median complexity and length than harmless ones.

When comparing models, the "Plain LM" was the most vulnerable, requiring the lowest CC to produce harmful outputs. In contrast, models using Rejection Sampling and RLHF showed the highest resistance, effectively "pushing" successful attacks into the high-complexity tail of the distribution. This demonstrates that safety training effectively raises the "complexity barrier" for successful exploitation.

Limitations and Future Work

The authors acknowledge several constraints in the current study. The metrics are currently limited to English-language datasets and focus on statistical (syntactic) complexity rather than the deeper semantic meaning of the harm. Furthermore, the use of LLaMA-2 as a reference machine means the complexity estimates are filtered through that specific model's "understanding" of language.

Future work suggests integrating these complexity metrics into real-time monitoring systems to "cast a wide net" for potentially harmful interactions. By identifying high-complexity or high-length interactions as they happen, developers can intercept potentially harmful dialogues before they escalate into significant risks.

Summary updated

BibTeX
@article{burden2025conversational,
  author = {John Burden and Manuel Cebrián and José Hernández-Orallo},
  title = {{Conversational complexity for assessing risk in large language models}},
  journal = {EPJ Data Sci.},
  year = {2025},
  doi = {10.1140/epjds/s13688-025-00592-4},
}
Figure