Bayesian Test-Time Inference of Task-Aligned Similarity from Weak Interactive Feedback
Organizations: National University of Singapore
Abstract
Language model systems repeatedly make test-time decisions by comparing similarity: they retrieve exemplars, rank candidates, and revise responses. Yet similarity is not unique: lexical, semantic, structural, and stylistic resemblance can point to different candidates, and the task-aligned notion can change across instances. We introduce BASIS (Bayesian Axis Selection via Interactive Signals), a training-free Bayesian method that uses weak test-time feedback to infer which criterion in a supplied, task-specific library governs the current decision. It maintains a joint posterior over candidate targets and criteria, updates it from scalar scores, pairwise preferences, or verifier outputs, and selects probes by expected information gain. In a finite noisy model, we characterize when the target-criterion pair is recoverable and show why fixed-criterion and fixed-mixture rules can fail under criterion shift. Across concept recovery, reasoning exemplar selection, and response refinement, BASIS improves six-probe concept-recovery Success@1 from 56.0% to 68.1%, reasoning accuracy from 72.3% to 73.1%, and refinement win rate from 61.4% to 63.8% over tuned static mixtures. It also exceeds compute-matched best-of-N selection on reasoning (72.1%) and refinement (61.2%). Gains are largest under criterion mismatch and with larger candidate pools, and matched controls indicate that adaptive criterion weighting explains much of the benefit, with joint target-criterion inference adding further value. BASIS selects only among supplied criteria and does not discover new ones.
Figures & tables
| Task | Method | Accuracy / win rate (%) | Time (s) |
|---|---|---|---|
| Reasoning | Dense retrieval | 70.0 | |
| Tuned mixture | 72.3 | ||
| Best-of-4 verifier | 72.1 | ||
| BASIS | 73.1 | ||
| Refinement | Tuned mixture | 61.4 | |
| Best-of-6 verifier | 61.2 |
| Domain | Both correct | BASIS only | Tuned only | Both wrong |
|---|---|---|---|---|
| GSM8K | 1,801 | 104 | 82 | 513 |
| StrategyQA | 1,802 | 111 | 88 | 499 |
| BBH aggregate | 2,321 | 180 | 150 | 1,099 |
| Pooled | 5,924 | 395 | 320 | 2,111 |
| Gather/assembly (ms) | Update/round (ms) | Probe/round (ms) | Marginalization (ms) | Posterior (MiB) | |
|---|---|---|---|---|---|
| 64 | 4.2 | 0.07 | 110 | 0.03 | 0.0024 |
| 256 | 14.6 | 0.18 | 111 | 0.06 | 0.0098 |
| 1,024 | 55.3 | 0.62 | 112 | 0.18 | 0.0391 |
| 4,096 | 216.8 | 2.35 | 114 | 0.66 | 0.1563 |
| 10,000 | 527.4 | 5.68 | 117 | 1.55 | 0.3815 |
| Source | Inference set | Top-1 agreement | Mean top-four overlap | Exact set agreement | Accuracy (%) | Local time (ms) | Posterior (MiB) |
|---|---|---|---|---|---|---|---|
| 1,024 | Full pool | 100% | 4.00/4 | 100% | 68.4 | 393 | 0.0391 |
| 1,024 | Top-128 | 99.0% | 3.96/4 | 96.1% | 68.3 | 342 | 0.0049 |
| 10,000 | Full pool | 100% | 4.00/4 | 100% | 67.6 | 897 | 0.3815 |
| 10,000 | Top-128 | 97.8% | 3.91/4 | 91.8% | 67.4 | 356 | 0.0049 |
| 10,000 | Top-64 | 92.8% | 3.72/4 | 81.4% | 66.8 | 348 | 0.0024 |
| Method | Reasoning | Refinement | Distractor accuracy |
|---|---|---|---|
| Tuned mixture | 72.3 | 61.4 | 65.8 |
| Mean-field | 72.8 | 63.1 | 67.4 |
| Criterion marginal, shared probes | 72.6 | 62.7 | 67.0 |
| Criterion marginal, own probes | 72.5 | 62.4 | 66.7 |
| History-aware reranker | 72.6 | 62.6 | 67.0 |
| BASIS | 73.1 | 63.8 | 68.2 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Candidate space | Probe type | Latent criteria | Weak feedback |
|---|---|---|---|---|
| Concept recovery | lexical concepts with relation-based distractors | single concept or pairwise query | semantic, relation, part–whole, morphology, association | scalar score or pairwise preference |
| Exemplar selection | exemplar bank from training problems | single exemplar or exemplar pair | semantic, lexical, entity, structural, answer-consistency | verifier delta, structural critic, pairwise preference |
| Response refinement | candidate responses for one instruction | response or response pair | helpfulness, specificity, conciseness, safety, empathy, formality | preference label or rubric score |
| Task | Feedback type | Source | Form | Shared with non-oracle baselines? |
|---|---|---|---|---|
| Concept recovery | scalar similarity / pairwise preference | simulated from the hidden criterion with Gaussian or Bradley–Terry noise | scalar / pairwise | yes |
| Reasoning exemplar selection | verifier delta | downstream answer verifier applied to candidate exemplars or prompted traces | scalar | yes |
| Reasoning exemplar selection | structural signal | template overlap or structural critic score computed from reasoning skeletons | scalar | yes |
| Response refinement | preference feedback | dataset preference label when available, otherwise rubric-based weak supervision | pairwise / scalar | yes |
| Criterion | Implementation | Normalization | External model? | Updated after feedback? |
|---|---|---|---|---|
| Semantic | cosine similarity in the frozen encoder space | pool-wise min–max to | no | no |
| Lexical | BM25 or token-overlap relevance | pool-wise min–max to | no | no |
| Entity | overlap F1 over entities, slots, or variables | native score | no | no |
| Structural | overlap between extracted reasoning templates, operator sequences, or decomposition graphs | pool-wise min–max to | optional critic | no |
| Style | lightweight rubric classifier or rubric score for tone, conciseness, empathy, or formality | affine calibration to on a development split | optional | no |
| Answer-consistency | verifier pass rate for the exemplar’s supplied answer to its own question | binary or calibrated scalar in | yes | no |
| Method | Same pool | Same criterion scores | Feedback history | Additional interaction calls |
|---|---|---|---|---|
| Static mixture | yes | yes | no | 0 |
| Rubric-guided LLM reranker | yes | rubric or criterion descriptions | no | 1 |
| Best-of- verifier | yes | verifier only | no | |
| BASIS | yes | yes | yes | |
| Oracle-criterion | yes | yes + true criterion | no | 0 |
| Method | S@1@4 | S@1@6 | Criterion acc. | Q@90 |
|---|---|---|---|---|
| Random probing | — | |||
| Greedy semantic NN | — | |||
| Target-only Bayes | — | |||
| Static mix (val-tuned) | — | |||
| Active, no criterion | — | |||
| BASIS |
| Method | GSM8K | StrategyQA | BBH (3 tasks) | Avg. |
|---|---|---|---|---|
| Random exemplars | 65.3 | 67.1 | 56.2 | 62.9 |
| BM25 | 70.6 | 71.3 | 60.4 | 67.4 |
| Dense retrieval | 73.1 | 73.8 | 63.1 | 70.0 |
| ByCS-style Bayesian selection | 73.5 | 74.2 | 63.7 | 70.5 |
| RGER-style structural retrieval | 74.4 | 75.1 | 65.0 | 71.5 |
| LLM reranker | 74.7 | 74.8 | 64.6 | 71.4 |
| Method | HH win | OASST win | UF win | Avg. | Attribute match |
|---|---|---|---|---|---|
| Direct preference ranker | 57.4 | 55.9 | 60.1 | 57.8 | 62.9 |
| LLM-as-judge reranking | 58.3 | 57.1 | 60.5 | 58.6 | 63.8 |
| Self-Refine | 59.8 | 58.2 | 61.4 | 59.8 | 64.6 |
| Target-only Bayes | 60.7 | 59.4 | 62.0 | 60.7 | 65.1 |
| Rubric-guided LLM reranker | 60.4 | 58.9 | 62.3 | 60.5 | 65.5 |
| Static mix (uniform) | 60.8 | 59.1 | 62.7 | 60.9 | 66.0 |
| Variant | Concept S@1@6 | Reason Avg | Refine Win | Distr. Drop |
|---|---|---|---|---|
| BASIS | ||||
| No latent criterion | ||||
| No active probing | ||||
| Uniform static mixture | ||||
| Single semantic criterion |
| Asset / release | License or terms | Upstream source |
|---|---|---|
| WordNet 3.0 [ 19 ] | Princeton WordNet License; use, copying, modification, and distribution are permitted with the required copyright notice and disclaimer. | WordNet license |
| ConceptNet 5.7 [ 26 ] | Data: CC BY-SA 4.0. The repository distinguishes the graph-data license from the Apache 2.0 code license. | License / data credits |
| SimLex-999, original English release [ 12 ] | The official download page requests citation but does not state a separate dataset license. No SimLex files are reproduced or redistributed here. | SimLex project page |
| WordSimilarity-353 v1.0 (2002) [ 9 ] | Creative Commons Attribution 4.0 International (CC BY 4.0); cite the original collection. | WordSim-353 source and license |
| GSM8K, official 2021 release [ 6 ] | MIT License. | OpenAI repository license |
| StrategyQA, official 2021 release [ 10 ] | MIT License, as stated in the dataset repository. | StrategyQA repository license |
| Model identifier | License | Upstream model card |
|---|---|---|
| Qwen/Qwen3-Embedding-4B | Apache License 2.0 | Qwen model card |
| Qwen/Qwen3-8B | Apache License 2.0 | Qwen model card |
| mistralai/Ministral-3-14B-Reasoning-2512 | Apache License 2.0 | Mistral model card |
Inference-Time Language Model Alignment
Inference-time language model alignment steers or selects outputs during generation to better meet safety, preference, and task goals without retraining.
See all 78 papers