Active Inference · Paper · 2026

On-Policy Distillation as Active Inference in Finite Variational Models

Daniel Ari Friedman

Zenodo

Download PDF Publication source Paper folder on GitHub Read extracted text

Overview

This paper formulates on-policy distillation as active inference in finite variational models, with exact claims only for declared objects and interpretive claims explicitly bounded outside them. In the construction, the intractable teacher policy plays the role of the generative model $p(o,s)$, the tractable student policy is the approximate posterior $q(s)$, and the per-token reverse-KL distillation loss is variational free energy up to the evidence constant, $F = D_{\mathrm{KL}}(q\,\|\,p(s\mid o)) - \log p(o)$, whose KL target is the teacher-induced posterior $p(s\mid o)\propto p(o,s)$ . The title's "as" is therefore a scoped mathematical correspondence rather than the slogan OPD = Active Inference. Variational free energy names the realized-rollout distillation loss; expected free energy remains the planning-side objective by which the pymdp agent selects actions . On-policy student rollouts generate the observations on which the posterior is scored, connecting the construction to induced-distribution mismatch in imitation learning and exposure-bias analyses while preserving their different objectives, empirical regimes, and contested severity . Privileged traces and feedback play the role that train-time-only information plays in the LUPI/distillation lineage . Four deterministic witnesses instantiate the correspondence. A Bernoulli-Ising oracle couples a teacher's privileged variable to the answer through $\lambda$, making $I(\lambda)$ the teacher-student mutual information and the finite free-energy gap the toy distillation objective; the closed-form and independently recomputed mutual-information sweeps agree to machine precision (RMSE 2.1e-16 nats). A pymdp T-maze rollout supplies the on-policy student that samples its own observations under a privileged cue . A two-agent classroom pits a privileged teacher (cue validity 0.98) against an on-policy student (cue validity 0.5), measuring teacher belief entropy 0.247 nats versus student 0.347 nats and a mean reverse-KL distillation signal of 6.28 nats. A four-state/two-action sequential-shift witness shows teacher-forced train loss 0.333 nats underestimating student-induced test loss 0.409 nats, with deterministic on-policy correction reducing it to 0.096 nats. These are toy, generated findings, not production-LLM measurements. Recent privileged-context, context-distillation, adaptive-teacher, freshness-aware OPD, RLHF/instruction-tuning, self-generated reasoning, Qwen OPD-vs-RL, and Thinking Machines replication reports remain external context rather than reproduced results . The supplemental sheaf/provenance layer keeps that boundary operational: every reported number is hydrated from a generated artifact, every figure is source-bound, and 16 / 16 invariant checks pass before rendering. --- Associated artifacts GitHub release: v1.0.2 (https://github.com/ActiveInferenceInstitute/on_policy_distillation/releases/tag/v1.0.2) DOI: https://doi.org/10.5281/zenodo.20749817 Zenodo: https://zenodo.org/records/20749817 PDF SHA-256: c6b5ec494915e6e046f24cf723f8dbbf93a5b168544daed3cca14c089d4087aa

on-policy distillationactive inferenceself-distillationprivileged informationfree energy principlereverse KL divergencepymdpsophisticated inference

Overview source: Curated paper metadata.

Methods and contributions

Read the source for the full argument, qualifications, and evidence.

Findings and contributions

  • The closed-form and independently recomputed mutual-information sweeps agree to machine precision (RMSE 2.1e-16 nats).
  • In the classroom toy, teacher belief entropy was 0.247 nats versus 0.347 nats for the student, with a mean reverse-KL distillation signal of 6.28 nats.
  • In a four-state/two-action witness, teacher-forced train loss (0.333 nats) underestimated student-induced test loss (0.409 nats); on-policy correction reduced it to 0.096 nats.
  • All reported numbers are hydrated from generated artifacts, and 16 of 16 invariant checks pass before rendering.
  • The author states these are toy, generated findings rather than production-LLM measurements; external OPD results are context, not reproduced.

Methods

  • Formal mapping of OPD roles onto active-inference variational objects — Teacher policy is read as the generative model, student policy as the approximate posterior, and per-token reverse-KL loss as variational free energy.
  • Bernoulli-Ising oracle with closed-form and recomputed mutual-information sweeps — A binary toy couples a teacher's privileged variable to the answer through a coupling parameter; MI and the free-energy gap are computed analytically.
  • pymdp T-maze rollout with sophisticated-inference planning — A pymdp agent samples its own observations under a privileged cue, serving as the on-policy student process witness.
  • Two-agent classroom: privileged teacher vs on-policy student — A teacher with cue validity 0.98 and a student with cue validity 0.5 are compared on belief entropy and reverse-KL distillation signal.
  • Lean theorem inventory and fail-closed manuscript validation gates — Lean theorem statements are extracted and checked against an inventory, with gates failing on sorry, axiom or native_decide.

Summary sources: Paper metadata and evidence · Extracted source text.

Document downloads

PDFs are hosted here; supporting sources may use pinned archives.

Citation

Citation metadata follows the unified bibliography.

Friedman, Daniel Ari. 2026. On-Policy Distillation as Active Inference in Finite Variational Models. Zenodo. DOI: 10.5281/zenodo.20747834. URL: https://doi.org/10.5281/zenodo.20747834.
Download bibliography Add to reading list Explore connections

Catalog details and resources

Catalog row171
Citation keyFriedman2026PolicyDistillationAsActive171
Platform availability

Related works

Ranked by recorded methods, topics, contributors and associated software, with contributor roles and domain-only matches labelled. Metadata overlap is not a citation or a scientific equivalence.

View all Active Inference works, software & media →