LLM-Guided Probabilistic Program Induction for POMDP Model Estimation

Aidan Curtis, Hao Tang, Thiago Veloso, Kevin Ellis, Joshua B. Tenenbaum, Tomás Lozano-Pérez, Leslie Pack Kaelbling

TL;DR

Learning environment models for Partially Observable Markov Decision Processes (POMDPs) directly from sparse data is notoriously difficult. POMDP Coder leverages Large Language Models (LLMs) to synthesize and iteratively repair concise, executable probabilistic programs (in Pyro) that represent POMDP transition, observation, reward, and initial state models. Paired with an online belief-space planner, this neuro-symbolic approach dramatically outperforms tabular methods, behavior cloning, and direct LLM reasoning on both gridworld benchmarks and real-world robot search tasks.

What Problem Does This Paper Address?

POMDPs provide a mathematically rigorous framework for decision-making under uncertainty, allowing autonomous agents to track beliefs over hidden states (such as hidden targets or noisy sensor readings). However, deploying POMDPs in practice is severely bottlenecked by model specification:

  • Handcrafting transition, observation, reward, and belief dynamics requires extensive domain expertise.
  • Learning these dynamics purely from data (e.g., via tabular counting or model-based RL) is computationally intractable or demands millions of interaction steps due to the combinatorial explosion of unobserved states.

This paper tackles the challenge of learning low-complexity, interpretable POMDP models directly from minimal human demonstrations (just 10 episodes).

Methods

POMDP Coder decomposes the problem into probabilistic program induction and online belief-space planning:

  1. Probabilistic Programs as POMDP Models: Rather than learning massive probability tables or neural networks, each POMDP component—initial state distribution $P(s_0)$, transition model $T(s_{t+1} \mid s_t, a_t)$, observation function $Z(o_{t+1} \mid s_{t+1}, a_t)$, and reward function $R(s_t, a_t, s_{t+1})$—is represented as a short Python program using Pyro.
  2. LLM Program Proposal and Repair:
  3. An LLM (GPT-4o) receives typed dataclasses describing state/action spaces and a few demonstration trajectories. It generates initial candidate Pyro programs.
  4. Programs are evaluated against empirical data using a coverage metric (the fraction of data points assigned non-zero probability under the model, estimated via Monte Carlo sampling).
  5. Candidate programs form a search tree expanded via Thompson sampling. When coverage fails, the LLM receives concrete counterexamples (discrepant transitions) to iteratively repair the code.
  6. Belief-Space Planning: At test time, the agent updates its state belief via particle filtering and selects actions using an online, graph-based deterministic forward search (A*-style belief-space planner) that balances task reward, risk, and information gain (belief entropy reduction). Trajectories collected during execution are fed back to repair model inaccuracies online.

Datasets

The authors evaluate their system across three settings:

  • Classical POMDP Benchmarks: Standard toy problems, specifically the classic Tiger problem and RockSample.
  • Modified MiniGrid Domains: Five partially observable gridworld navigation and manipulation tasks (Empty, Corners, Lava, Unlock, Rooms), modified from standard implementations to ensure the LLM could not simply memorize known solutions.
  • Real-World Spot Robot Search Tasks: A Boston Dynamics Spot robot searching for an apple across two physical environments scanned into 3D scene graphs via PolyCam and detected via Grounding SAM:
  • Small-Cabinets: A closed room where the object is placed across drawer cabinets.
  • Large-Tables: A large open lobby with over 20 furniture items, where the object is on one of five round tables.

Key Insights and Ideas

  • Code as an Inductive Bias: Natural code provides powerful symbolic abstractions (e.g., loops, coordinate arithmetic, class constraints). This enables models to generalize broadly across unvisited states where tabular methods fail completely.
  • World Modeling Beats Direct LLM Planning: Querying an LLM directly at every step frequently leads to infinite loops or hallucinations of invalid physical transitions (like walking through walls or into lava). Using the LLM strictly to write the world simulator, while letting a classical belief-space planner handle action selection, is vastly more reliable.
  • Synergy Between Offline Demos and Online Repair: Neither offline learning alone (which fails to observe catastrophic, out-of-distribution transitions like falling into lava) nor online learning alone (which struggles to discover rare informative actions like finding and using a key) is sufficient. Combining both yields robust models.

Key Results

  • Simulation: Across all MiniGrid and classical domains, POMDP Coder closely matches or matches the ground-truth Oracle planner (normalized discounted return ~0.8–1.0). In contrast, Behavior Cloning, Tabular learning, and Direct LLM planning struggled or collapsed on complex tasks like Lava, Rooms, and Unlock.
  • Real-Robot Search:
  • In Small-Cabinets, POMDP Coder achieved an average discounted reward of 0.89 ± 0.09 (10/10 successes), outperforming a hardcoded Uniform initial belief baseline (0.68 ± 0.21, 10/10), Direct LLM (0.25 ± 0.42, 3/10), Behavior Cloning (0.28 ± 0.39, 4/10), and Tabular (0.35 ± 0.41, 5/10).
  • In Large-Tables, POMDP Coder scored 0.73 ± 0.08 (10/10 successes) compared to the Uniform baseline (0.40 ± 0.26, 8/10), Direct LLM (0.15 ± 0.32, 2/10), and Behavior Cloning (0.13 ± 0.28, 2/10).

Limitations and Future Work

  • Post-Hoc Full Observability: The training pipeline assumes that intermediate true states can be inspected after an episode terminates (e.g., discovering the goal object’s true initial location once found).
  • Human-Engineered State Representations: The framework currently requires developers to define the typed Python API and state representation upfront.
  • Scalability of Particle Filters: Standard particle filters struggle to scale to high-dimensional continuous state and action spaces (e.g., continuous 6-DoF robot manipulation).
  • Oversized Probability Support: Because the objective is binary support coverage, the LLM occasionally synthesizes overly broad distributions, which can slightly degrade exploration efficiency.

Summary updated

BibTeX
@inproceedings{curtis2025llm,
  author = {Aidan Curtis and Hao Tang and Thiago Veloso and Kevin Ellis and Joshua B. Tenenbaum and Tomás Lozano-Pérez and Leslie Pack Kaelbling},
  title = {{LLM-Guided Probabilistic Program Induction for POMDP Model Estimation}},
  booktitle = {EWM @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=7Xci8uOpef},
}
Figure