For Large Language Models (LLMs) to be reliably deployed, models must effectively know when not to answer: abstain. Reasoning models, in particular, have gained attention for impressive performance on complex tasks. However, reasoning models have been shown to have worse abstention abilities. Taking the vulnerabilities of reasoning models into account, we propose our Query Misalignment Framework. Hallucinations resulting in failed abstention can be reinterpreted as LLMs answering the wrong question (rather than answering a question incorrectly). Based on this framework, we develop a new class of state-of-the-art abstention methods called Trace Inversion. First, we generate the reasoning trace of a model. Based on only the trace, we then reconstruct the most likely query that the model responded to. Finally, we compare the initial query with the reconstructed query. Low similarity score between the initial query and reconstructed query suggests that the model likely answered the question incorrectly and is flagged to abstain. Extensive experiments demonstrate that Trace Inversion effectively boosts abstention performance in four frontier LLMs across nine abstention QA datasets, beating competitive baselines in 33 out of 36 settings.
Figures & tables
Figure 1: Prior approaches often underperform abstention in reasoning models.
Figure 2: Examples of how distinguishing between a user query q compared to model query q∗ can reveal hallucination patterns. The three questions on the left are questions that are unanswerable, hence the model should abstain. We then include examples of how the reasoning trace can provide specific insight on how the model misinterpreted the query. Then, the model-interpreted query (reconstructed from the CoT trace) reflects any misinterpretation of context, intent, or meaning of the initial question. Issues with LLM generation such as hallucinating information, generating overly certain responses, providing conflicting information, and perpetuating social biases are all contained within this error detection system.
Figure 3: Overview of our three step approach. We provide an example of how our method particularly detects subtle hallucinations in a reasoning trace by comparing the user query q with the model-interpreted query q∗ .
Method
Math & Knowledge
Comprehension
Biases & Safety
Overall
MMLU
GSM
UMWP
Overall
KC
HS
Qu
Overall
Mis
Prop
BBQ
Overall
phi-4
Probs
.477
.509
.488
.491
.451
.666
.303
.473
.512
.624
.332
.489
.484
AskCali
.471
.504
.506
.494
.550
.612
.307
.490
.552
.618
.299
.490
.491
Reflect
.379
.541
.438
.453
.633
.771
.405
.603
.455
.515
.411
.460
.506
Cooperate
.424
.685
.420
.510
.504
.718
.414
.545
.369
.598
.422
.463
.506
Table 1: Abstain Accuracy of abstain strategies on nine datasets and four LLMs. Each number reported is the average of three seeds. We group the nine datasets (MMLU, GSM, UMWP, K-Crosswords, Hellaswag, Quail, Misconceptions, Propaganda, and BBQ) according to domain and provide aggregate results per domain and across all datasets. Best results in bold and second best in underline . Approaches are color-coded per category: calibration , prompting , collaboration , and our method . Trace Inversion achieves the best performance in 33 out of 36 settings.
Method
Math & Knowledge
Comprehension
Biases & Safety
Probs
0.1449
0.1829
0.1460
AskCali
0.1288
0.2099
0.1961
Reflect
0.1040
0.2359
0.1629
Cooperate
0.1796
0.3199
0.0975
Compete
0.1178
0.0746
0.1964
Trace Inversion
0.0347
0.0517
0.0681
Table 2: Performance gap between datasets with only answerable queries and datasets also containing unanswerable queries by domain and method. The gap is calculated as the difference between the average performance on answerable datasets and the average performance on UMWP for Math & Knowledge, Quail for Comprehension, and BBQ for Biases & Safety. For each method, scores are averaged across all four LLMs. Positive values indicate that answerable datasets are easier than those containing unanswerable queries. The bottom row shows the average gap across all methods besides Trace Inversion.
Figure 6
Method
Math & Knowledge
Comprehension
Biases & Safety
Overall
MMLU
GSM
UMWP
Overall
KC
HS
Qu
Overall
Mis
Prop
BBQ
Overall
Averaged Across 4 LLMs
SE
.848
.841
.839
.842
.533
.721
.605
.620
.555
.617
.616
.596
.686
TrInv-LLM
.749
.785
.720
.751
.704
.788
.707
.733
.569
.598
.624
.597
.694
GROUND
.684
.747
.556
.662
.686
.780
.590
.685
.667
.800
.790
.752
.704
Trace Inversion
.808
.829
.784
.807
.663
.772
.666
.700
.686
.740
.645
.690
.732
Table 3: Ablation of Trace Inversion by looking at the Abstain Accuracy performance of the method with individual distance metrics. Performance is averaged across all four LLMs to show overall patterns. Best results in bold and second best in underline . Model specific results are reported in Appendix C.2 .
Figure 4: Abstain Accuracy of each domain and method averaged across four LLMs.
Method
Variant
Math & Knowledge
Comprehension
Biases & Safety
Overall
MMLU
GSM
UMWP
Overall
KC
HS
Qu
Overall
Mis
Prop
BBQ
Overall
Averaged Across 4 LLMs
Probs
Regular
.689
.690
.544
.641
.512
.618
.382
.504
.521
.633
.431
.529
.558
+ CoT prompt
.673
.645
.504
.607
.474
.618
.344
.479
.531
.593
.417
.514
.533
AskCali
Regular
.668
.694
.552
.638
.533
.565
.339
.479
.526
.632
.383
.513
.543
+ CoT prompt
.659
.648
.544
.617
.520
.530
.310
.453
.501
.587
.378
.489
.520
Table 4: Ablation of baseline methods with regular prompting (just the query from the dataset) versus additionally appending a CoT prompt. Abstain Accuracy of abstain strategies on the nine datasets, averaged across four LLMs. Lower of the two values (comparing between Regular and + CoT prompt ) are in red . Model specific results are reported in Appendix C.3 .
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Prompt
AskCali
Provide your best guess for the following question. Give only the guess.
Example: {most likely guess}.
Question: {question}.
[ LLM-generated answer ].
Provide the probability your guess is correct.
Probability: [ LLM-generated probability in [0,1] ].
Appendix
Table 5: Exact LLM prompts used for each method.
Figure 11Figure 12
Method
Math & Knowledge
Comprehension
Biases & Safety
Overall
MMLU
GSM
UMWP
Overall
KC
HS
Qu
Overall
Mis
Prop
BBQ
Overall
phi-4
Probs
.545
.584
.614
.581
.463
.634
.363
.487
.439
.636
.522
.533
.533
AskCali
.404
.585
.711
.567
.626
.588
.358
.524
.598
.538
.358
.498
.530
Reflect
.412
.466
.669
.516
.591
.757
.550
.633
.449
.422
.522
.464
.538
Cooperate
.428
.682
.634
.581
.532
.731
.656
.640
.272
.677
.601
.516
.579
Appendix
Table 6: Reliable Accuracy of abstain strategies on nine datasets and four LLMs. Each number reported is the average of three seeds. We group the nine datasets (MMLU, GSM, UMWP, K-Crosswords, Hellaswag, Quail, Misconceptions, Propaganda, and BBQ) according to domain and provide aggregate results per domain and across all datasets. Approaches are color-coded per category: calibration , prompting , collaboration , and our method .
Method
Math & Knowledge
Comprehension
Biases & Safety
Overall
MMLU
GSM
UMWP
Overall
KC
HS
Qu
Overall
Mis
Prop
BBQ
Overall
phi-4
SE
.876
.798
.865
.846
.538
.727
.619
.628
.567
.608
.656
.610
.695
TrInv-LLM
.710
.743
.752
.735
.684
.774
.723
.727
.555
.556
.639
.584
.682
GROUND
.638
.721
.556
.638
.658
.760
.609
.675
.696
.826
.772
.765
.693
Trace Inversion
.712
.733
.757
.734
.663
.830
.694
.729
.649
.710
.614
.658
.707
Appendix
Table 7: Ablation of Trace Inversion by looking at the Abstain Accuracy performance of the method with individual distance metrics. Each number reported is the average of three seeds. Performance is shown for each of the four LLMs. Best results in bold and second best in underline .
Method
Variant
Math & Knowledge
Comprehension
Biases & Safety
Overall
MMLU
GSM
UMWP
Overall
KC
HS
Qu
Overall
Mis
Prop
BBQ
Overall
phi-4
Probs
Regular
.477
.509
.488
.491
.451
.666
.303
.473
.512
.624
.332
.489
.485
+ CoT prompt
.449
.426
.395
.423
.424
.548
.286
.419
.404
.559
.236
.400
.414
AskCali
Regular
.471
.504
.506
.494
.550
.612
.307
.490
.552
.618
.299
.490
.491
+ CoT prompt
.390
.394
.494
.426
.475
.565
.169
.403
.574
.613
.220
.469
.432
Appendix
Table 8: Abstain Accuracy of abstain strategies on nine datasets for each of the four LLMs. Each number reported is the average of three seeds. We group the nine datasets (MMLU, GSM, UMWP, K-Crosswords, Hellaswag, Quail, Misconceptions, Propaganda, and BBQ) according to domain and provide aggregate results per domain and across all datasets. Approaches are color-coded per category: calibration , prompting , collaboration , and our method .
State Key Laboratory of AI Safety, Institute of Computing Technology, CAS · University of Chinese Academy of Sciences · Beijing Institute of Technology