Introduction
Adversarial attacks on deep learning models typically rely on access to internal gradients (white-box) or output probabilities (gray-box) to iteratively refine perturbations. However, modern commercial Large Language Models (LLMs) are predominantly "black-box," providing only final text responses (hard labels) via APIs. This lack of a continuous feedback signal makes crafting adversarial text—such as swapping words to flip a sentiment classification—highly inefficient. Existing hard-label attacks often resort to "top-down" approaches: blindly mutating text until an error occurs and then attempting to restore semantic coherence. This process is query-intensive and often results in unnatural output.
This research introduces a novel vulnerability: Confidence Elicitation. By simply asking an LLM "how sure are you?", attackers can extract a verbalized confidence score that serves as a proxy for the missing probability gradient, enabling highly efficient and effective black-box attacks.
The CEAttack Framework
The proposed Confidence Elicitation Attack (CEAttack) transforms a strictly black-box interaction into a pseudo-gray-box setting. The framework operates through four primary stages:
- Confidence Elicitation: The attacker uses a multi-step prompt to obtain both a prediction and a verbalized confidence level (e.g., "Highest", "High", "Medium", "Low", "Lowest").
- Dirichlet Aggregation: These natural language confidence levels are mapped to a mathematical probability distribution using a Dirichlet mean, providing a continuous numerical signal for optimization.
- Guided Word Substitution: Using this signal, the algorithm identifies critical words and replaces them with semantically similar synonyms.
- Bottom-Up Optimization: Unlike traditional attacks that break a model first and fix the text later, CEAttack uses a greedy hill-climbing approach. It keeps a substitution only if it reduces the model's elicited confidence in the correct label, continuing until a misclassification is achieved.
Mechanisms of Vulnerability
The effectiveness of CEAttack stems from two key observations regarding modern LLM behavior:
The Paradox of Calibration
The NLP community has prioritized "calibration"—ensuring a model's stated confidence aligns with its actual accuracy—to improve reliability and safety. Paradoxically, this study reveals that better calibration increases vulnerability. A well-calibrated model provides a more accurate "hot or cold" signal to an attacker, effectively leaking its internal state through verbalized uncertainty.
Bottom-Up Efficiency
Because CEAttack has a reliable confidence signal to follow, it can employ a "bottom-up" strategy. As illustrated in Figure 6, the attack starts from the original input ($x$) and moves toward the decision boundary by making minimal, targeted changes. This preserves high semantic similarity and ensures the adversarial text remains natural and difficult for humans to detect.
Experimental Results
The authors evaluated CEAttack against state-of-the-art hard-label baselines (SSPAttack and TextHoaxer) across three benchmarks: SST-2 (sentiment), AG-News (topic), and StrategyQA (reasoning). Tests were conducted on LLaMA-3-8B-Instruct, Mistral-7B-Instruct, and GPT-4o.
- Superior Success Rates: On StrategyQA with LLaMA-3, CEAttack achieved an Attack Success Rate (ASR) of 45.67%, significantly higher than the 29.67% achieved by the best baseline.
- Efficiency Gains: CEAttack is remarkably query-efficient. For SST-2 on LLaMA-3, it required an average of only ~25 queries per successful attack, compared to ~83 for SSPAttack and ~171 for TextHoaxer.
- Semantic Integrity: Adversarial examples generated by CEAttack maintained higher Universal Sentence Encoder (USE) similarity scores and lower perplexity, indicating that the changes were more subtle and linguistically plausible than those produced by previous methods.
Conclusion and Future Directions
Confidence elicitation, while intended to foster trust and safety, introduces a potent new attack vector. By treating verbalized uncertainty as a gradient, attackers can bypass the limitations of black-box APIs with minimal resources.
Future defense strategies must look beyond simple output filtering. Potential solutions include Adversarial Training, where models are trained on confidence-elicited adversarial examples, and Defense by Intent, which involves monitoring for patterns of repeated confidence queries on semantically similar prompts. Furthermore, this technique could potentially be extended to multi-turn jailbreaking, using confidence in refusal as a signal to optimize malicious prompts.
Summary updated