arXiv:2611.01245cs.LGOct 2026

Manuscript Offprint

arXiv:2611.01245

Learning What to Ask and What to Believe: Distilling a Variational Bayesian Agent into Language Models

Baichuan Li, Yanling Chang, Alfredo Garcia

ABSTRACT

Interactive tasks such as eliciting a user's preferences or diagnosing a hidden mechanism require an agent to track its uncertainty over a latent state, ask informative questions and act on the answers. Language models have no explicit mechanism for this, whereas Bayesian information seeking provides one through posterior inference and expected information gain (EIG), and we ask whether it can be distilled into an 8B language model. Our teacher, a lightweight Bayesian agent with a sequential variational belief and EIG query selection, matches or approaches exact and particle references on three task families. We generate synthetic interactions with the teacher on episodes disjoint from the benchmark and fine-tune Llama-3.1-8B-Instruct to reproduce its queries and its belief state as a structured scratchpad. On three Multi-Turn Puzzles tasks the student raises Circuit Decoding from 0.00 to 0.93 success, lowers the normalized rank of the recommended film from 0.50 to 0.10 and cuts word guessing from 32 to 3.4 attempts, exceeding the strongest reported language models on the two comparable tasks. Exposing the belief state closes much of the gap where the decision is an implicit computation rather than a read-out of the interaction; in matched teacher contrasts, EIG supervision consistently outperforms random querying, whereas greater inference fidelity does not uniformly improve the distilled student; a 70B language-model teacher does not match the Bayesian teacher in downstream student performance, and the learned skill does not transfer to an unseen task family. Variational Bayesian information seeking can thus be amortized into a language model by transferring the belief state that drives its questions and decisions.

1 INTRODUCTION

Many useful interactions are inference problems: to recommend a film, a system must find out what a user values; to debug a device, an engineer must probe it. In each case there is a latent state that the agent cannot observe but must know to act well: the weights the user places on the attributes of a film, or the gates hidden inside the device. The agent uncovers it through a sequence of queries, each of which reveals a little about the state, and then commits to a decision that is only as good as what it has learned. Doing this well requires the two abilities that sequential Bayesian experimental design studies together (Lindley, 1956; Chaloner & Verdinelli, 1995; Rainforth et al., 2024): a belief over the latent state that is updated with every answer, and the choice of the query whose answer is expected to be most informative.

Language models (LMs) do neither reliably. On the Multi-Turn Puzzles benchmark (Badola et al., 2025), whose tasks isolate this competence, the strongest reported frontier model scores only 40% on the hidden circuits, and Llama-3.1-8B-Instruct, the open model we study, almost 0%; LM performance is known to degrade in multi-turn settings (Laban et al., 2026). Inference-time wrappers place an explicit Bayesian computation around the LM (Choudhury et al., 2026; Hu et al., 2024; Handa et al., 2024) but leave the model unchanged and multiply the cost of every turn; training-based approaches improve the model itself (Andukuri et al., 2024; Zhang et al., 2025; Chen et al., 2025; Mazzaccara et al., 2024), but their supervision comes from the LM or from heuristics, so nothing guarantees that the imitated behavior is close to optimal.

Figure

Figure 1: Overview. A Bayesian teacher interacts with synthetic episodes disjoint from the benchmark; its interactions are serialized as actions only or as belief scratchpad plus action and distilled into Llama-3.1-8B-Instruct, which is then evaluated interactively on the complete benchmark test splits. The targets are shown for two turns of one movie-recommendation dialogue of the teacher; the scratchpad adds the <belief> and <scores> lines (blue; formats for all tasks in Appendix D.4).

We take a third route (Figure 1). Our teacher is a lightweight, non-neural Bayesian agent that updates a variational belief at every turn by maximizing an evidence lower bound (ELBO) with the previous posterior as prior, and asks the query with the highest expected information gain (EIG) under that belief. It is cheap (Appendix C.6) and verifiable against Bayesian references, and because it has an explicit belief it can supervise how it reaches a decision and not only what it decides. We validate it on three task families with continuous, structured-binary and finite-symbolic latent states, generate teacher interactions on synthetic episodes disjoint from the benchmark, distill them into Llama-3.1-8B-Instruct with LoRA fine-tuning (Hu et al., 2022), and evaluate on the complete test splits under a protocol fixed before each run.

Distilled from this teacher, the student closes most of the gap between the base model and the teacher. With belief-scratchpad targets, Circuit Decoding rises from 0.00 to 0.93 Success@18 (teacher 1.00), the normalized rank of the recommended film in Movie Recommendation falls from 0.496 to 0.100 (teacher 0.071), and Word Guess falls from 31.97 to 3.37 attempts (teacher 2.29). On the two tasks for which the benchmark reports comparable language-model results, the student also improves on the strongest reported model: 97.4% versus 39.8% circuit-wise accuracy on Circuit Decoding and a normalized rank of 0.10 versus 0.16 on Movie Recommendation.

Our contributions are threefold. First, we show that a lightweight variational Bayesian information-seeking teacher can provide effective supervision for an 8B language model on three interactive-inference tasks with continuous, structured-binary, and finite-symbolic latent states, while remaining verifiable against exact or near-exact Bayesian references. Second, we show that distilling actions alone is not always sufficient: it suffices on Circuit Decoding, where the queried bits constitute the answer and the action-only student already reaches 0.92 Success@18, but when the final decision requires inference beyond the observed interaction, action-only students gather much information yet fail to convert it into the decision, and supervising the teacher's intermediate belief and task-specific decision state substantially improves the student. Third, through matched teacher and student comparisons, we separate the effects of query selection, inference fidelity, and teacher type, finding that the query rule has the largest and most consistent effect among the Bayesian-teacher components we vary, that greater inference fidelity does not necessarily produce a better distilled student, and that a 70B language model used as teacher on the same episodes yields clearly weaker students than the Bayesian teacher. The learned competence remains task-specific: leave-one-task-out experiments show little transfer of either the information-seeking policy or its information-gain criterion to the held-out task (Section 7, Appendix G).