Learning POMDP World Models from Observations with Language-Model Priors

Valentin Six, Frederik Panse, Mathis Fajeau, Lancelot Da Costa, Mridul Sharma, Alfonso Amayuelas, Tim Z. Xiao, David Hyland, Philipp Hennig, Bernhard Schölkopf

TL;DR

Pinductor (POMDP-inductor) is a novel framework that leverages Large Language Models (LLMs) to automatically write and refine executable world models from raw observation-action trajectories. By using a particle filter and a soft distance-kernel likelihood, it eliminates the need for privileged access to hidden states during training. Remarkably, Pinductor matches the performance of state-of-the-art methods that "cheat" with full state visibility, while vastly outperforming traditional tabular baselines.

What Problem Does This Paper Address?

To act effectively in an uncertain world, an AI agent needs an internal "world model" to predict how its environment changes in response to its actions. When the world is only partially visible—like a robot navigating a smoky building or an agent playing an imperfect-information game—this is formally modeled as a Partially Observable Markov Decision Process (POMDP).

Learning a POMDP model from scratch is notoriously difficult and data-hungry. Recently, researchers have used LLMs to write world models directly in code, which are then refined based on experience. However, existing methods make a massive assumption: they assume privileged post-hoc observability, meaning that after an episode ends, the training loop gets to look at the true, hidden ground-truth states. In real-world deployments, this information is rarely available. This paper tackles a fundamental question: Can language-model priors compensate for the complete absence of ground-truth state supervision?

Methods

Pinductor introduces an observation-only, generate-evaluate-refine-plan loop that operates entirely on raw observation-action-reward trajectories.

Pinductor pipeline overview

The core architecture consists of three main components:

  1. Code Generation: The LLM receives a natural-language description of the task and a few sample trajectories. It then synthesizes an executable Python class defining the POMDP components: initial state distribution ($\rho_0$), transition dynamics ($T$), observation model ($O$), and reward function ($R$).
  2. Belief-Based Evaluation: Because LLM-generated code is usually deterministic, it yields rigid "Dirac" likelihoods (assigning zero probability to any observation that doesn't match its prediction exactly), which breaks standard particle filters. Pinductor circumvents this by applying a distance-kernel likelihood that softens predictions, turning spatial/semantic mismatches into graded, continuous scores. A particle filter tracks the agent's internal beliefs and computes an expected log-likelihood score across the offline dataset.
  3. Structured Feedback & Refinement: Instead of just giving the LLM a scalar score, Pinductor provides detailed debugging feedback, including runtime errors and specific trajectory segments with high prediction errors. Crucially, it uses a Query-by-Committee (QBC) approach: it measures the disagreement (vote entropy) among a committee of previously generated transition models to pinpoint exactly where the model family is most uncertain about the dynamics.

The refinement process follows a tree-structured search guided by the UCB1 algorithm to balance exploring new code structures with exploiting the highest-scoring candidates.

Datasets

The authors evaluated Pinductor on five distinct MiniGrid gridworld environments of varying structural complexity:

  • Empty: A simple navigation task.
  • Corners: Requires position disambiguation under high pose ambiguity.
  • Lava: Features a lethal hazard where stepping on lava terminates the episode with zero reward.
  • Unlock: A compositional task requiring the agent to find a key, unlock a door, and reach a goal.
  • Four Rooms: A long-horizon navigation task through interconnected rooms.

To rigorously test generalization, they also introduced stochastic variants of these environments, varying agent starting positions, orientations, wall layouts, and goal locations across episodes to prevent the LLM from simply memorizing a single static map.

Key Insights and Ideas

  • The Power of Semantic Priors: LLMs aren't just fitting curves; they bring massive real-world common sense to the table. When given human-readable concepts (like "lava" or "key"), the LLM immediately guesses the underlying physics and rules of the game, allowing it to propose highly accurate models from just 10 sample trajectories.
  • Softening Code with Kernels: Bridging the gap between discrete code logic and probabilistic filtering requires a translation layer. The distance-kernel trick successfully transforms deterministic code into a valid probabilistic model that can gracefully handle near-misses during particle filtering.
  • Disagreement as a Debugger: Using an ensemble of generated code snippets to calculate vote entropy provides a highly targeted diagnostic signal. It tells the LLM exactly which edge cases or state transitions it needs to rethink.

Key Results

Pinductor demonstrates that privileged state access is completely unnecessary for sample-efficient world-model learning.

Figure 3: Main task performance. Mean episode reward (y-axis) and win rate (percentages) across 5 MiniGrid environments; error bars denote 95% percentile confidence intervals. Pinductor performs comparably to POMDP Coder [14] despite not accessing privileged hidden state information and learning using only observation–action–reward trajectories. Pinductor also outperforms non-LLM model-learning baselines, including a standard tabular POMDP baseline that is granted privileged access to the hidden state. Results are contextualized by a handcrafted ground-truth-model reference.

As shown in Figure 3, Pinductor performs comparably to POMDP Coder—the state-of-the-art baseline that requires full access to hidden states during training. It also completely dominates standard tabular POMDP baselines, which fail to learn meaningful models from such sparse data.

Furthermore, the authors found that performance scales sharply with LLM capability (stronger models like Qwen3.6 Plus and Claude Opus easily cross the synthesis threshold, while weaker models fail entirely). Conversely, when semantic names were replaced with abstract nonsense labels (e.g., changing "lava" to "object_11"), performance dropped significantly, confirming that Pinductor heavily relies on the semantic priors embedded within the LLM.

Limitations and Future Work

While a major step forward, Pinductor has a few limitations:

  • Domain Constraints: The evaluation is currently restricted to gridworld environments (MiniGrid). Extending this to continuous control states or pixel-based observations remains an open challenge.
  • Hand-Crafted Kernels: The distance-kernel function used to soften observations must still be manually designed for the specific domain.
  • API Variance: Relying on commercial LLM APIs introduces stochasticity and high variance in the code generation process.

Future work includes using the LLM to automatically optimize other parts of the pipeline (such as the observation distance function itself) and scaling the framework to interface with deep reinforcement learning benchmarks.

Summary updated

BibTeX
@inproceedings{six2026learning,
  author = {Valentin Six and Frederik Panse and Mathis Fajeau and Lancelot Da Costa and Mridul Sharma and Alfonso Amayuelas and Tim Z. Xiao and David Hyland and Philipp Hennig and Bernhard Schölkopf},
  title = {{Learning POMDP World Models from Observations with Language-Model Priors}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=2a3onHQUa2},
}
Figure