arXiv:2609.02679cs.CLSep 2026

Manuscript Offprint

arXiv:2609.02679

From Tokens to Semantics: Leveraging Complementary Signals for Hallucination Detection in Black-Box LLMs

Urja Pawar, Rajitha Ramanayake, Owen O'Neill, Nabeel Kemal, Abhishek Mandal, Houssem Chatbri, Christopher Martin

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Urja Pawar

BNY

urja.pawar@bny.com

Rajitha Ramanayake

BNY

rajitha.ramanayake@bny.com

Nabeel Kemal

BNY

nabeel.kemal@bny.com

Owen O'Neill

BNY

owen.oneill@bny.com

Abhishek Mandal

BNY

abhishek.mandal@bny.com

Houssem Chatbri

BNY

houssem.chatbri@bny.com

Christopher Martin

BNY

Christopher.Martin@bny.com

Abstract

When LLMs support public-facing or high-stakes workflows, missed fabrications can harm users and institutions, while false alarms consume limited human-review capacity. When no trusted context or reference document is available, we study two signals accessible through black-box model APIs: semantic entropy, which measures disagreement among sampled response meanings, and uncertainty derived from token log-probabilities. Their failure modes can be complementary: semantic entropy becomes uninformative when responses form one semantic cluster, while token uncertainty can miss consistently confident errors. We extend token-based uncertainty detection by aggregating token-level signals across sampled responses through our TopK method, evaluate the hybrid CoCoA method, which combines target-response uncertainty with semantic dissimilarity, and propose and study two supervised methods: Gated, which routes single-cluster cases to an aggregated-token-feature classifier, and Stacked, which learns jointly from semantic uncertainty and broader token features. We evaluate seven benchmarks—including five public benchmarks (four text datasets and multimodal handwritten-cheque extraction) and two constructed benchmarks, Financial Summaries and Long-Text QA with four language models. In our evaluation across models and datasets, Stacked gave the best performance in nearly half of the cases, while TopK and CoCoA remain competitive without supervised training labels, although their thresholds require careful calibration. No method is universally strongest. We therefore evaluate performance at false-positive-rate budgets from 1% to 15%, assess their sensitivity to generation and calibration choices, and examine variation across dataset characteristics.

1 Introduction

Large language models increasingly support information workflows in regulated organizations and public-facing services [Sajadieh et al., 2026]. In these settings, fabricated claims or incorrect figures can mislead downstream reviewers and users, while false alarms consume limited human-review

Preprint.

capacity. Reference-based methods can check outputs against authoritative context, but open-ended tasks may provide no trusted context or complete reference document at inference time. Proprietary models are also commonly accessed through black-box APIs that expose generated text and sometimes token log-probabilities, but not hidden states [Kossen et al., 2025, Wang et al., 2025]. We therefore study whether these observable signals can identify hallucinated responses without trusted reference evidence or model-internal access.

Two API-visible signal families are especially relevant. Semantic entropy (SE) samples NN responses, groups them by meaning, and measures uncertainty from their distribution across semantic clusters [Kuhn et al., 2023, Farquhar et al., 2024]. Token-log-probability methods instead estimate confidence within a response using sequence likelihood, perplexity, top-kk entropy, and candidate margins (the differences between the highest and second-highest token log-probabilities) [Kadavath et al., 2022, Duan et al., 2024, Shapiro et al., 2026]. Because SE already requires multiple responses, we compute token signals for each response and aggregate them across the same samples. Our scalar TopK score combines mean top-kk entropy with cross-response confidence variation. We also evaluate CoCoA [Vashurin et al., 2025], a hybrid score that combines target-response confidence with semantic dissimilarity to sampled alternatives.

The two signal families fail differently. SE becomes zero when all samples form one semantic cluster, even if they are incorrect. Token features can be informative in some such cases but can miss consistently confident hallucinations; conversely, semantic disagreement can expose errors that token probabilities do not. This complementarity motivates two supervised combinations. The Gated cascade uses semantic uncertainty when multiple clusters are present and routes single-cluster cases to an aggregated-token classifier. The Stacked classifier instead learns jointly from both signal families for every query (see Figure 1).

We evaluate seven benchmarks—including five public benchmarks (four text datasets and multimodal handwritten-cheque extraction) and two author-constructed benchmarks, Financial Summaries and Long-Text QA—using four language models where supported. In our evaluation across models and datasets, Stacked gave the best performance in nearly half of the cases, while TopK and CoCoA remain competitive without supervised training labels, although their thresholds require careful calibration. No method is universally strongest. We therefore evaluate performance at false-positive-rate budgets from 1% to 15%, assess sensitivity to generation and calibration choices, and examine variation across dataset characteristics (see Appendix E). We document the construction of our two benchmarks for reproducibility but do not present them as openly released datasets.

Research questions. We ask where semantic and token-log-probability signals fail across datasets; whether their complementary information can improve black-box hallucination detection; and how consistently TopK, Gated, and Stacked perform across datasets, models, false-positive-rate budgets, and data characteristics. Our findings provide conditional guidance for the evaluated setting types.

References (26)