Source-linked AI summary

From Word Models to World Models: Translating from Natural Language to the Probabilistic Language of Thought

Lionel Wong, Gabriel Grand, Alexander K. Lew, Noah D. Goodman, Vikash K. Mansinghka, Jacob Andreas, Joshua B. Tenenbaum

arXiv:2306.12672v2cs.CLcs.AIcs.SC

TL;DR

The paper addresses how language can inform general cognition and proposes rational meaning construction, which maps utterances into probabilistic programs for structured reasoning. Across examples spanning multiple cognitive domains, the framework supports context-sensitive interpretation, coherent inference, and language-driven construction of concepts and world models.

  • Problem

    The paper asks how language relates to general cognition and what architecture can integrate language robustly into systems supporting the full scope of thought.

    Source: §1 · p. 1
  • Method

    Rational meaning construction maps natural-language utterances to probabilistic-language-of-thought expressions, combining LLM-based meaning construction with probabilistic programs for belief updating and inference.

    Source: §1 · p. 5, §2.1 · p. 8
  • Results

    The framework illustrates language-informed reasoning across probabilistic, relational, physical, perceptual, and social domains, and supports constructing new concepts and world models for downstream reasoning.

    Source: §1 · p. 5
  • Takeaways & Limitations

    The proposal offers a unified framework connecting statistical language learning with symbolic and probabilistic approaches to cognition and commonsense reasoning.

    Source: §1 · p. 5, §2.1 · p. 8

    The kinship model is reductive, and gender-binary terminology and gender-associated names can bias its generative representations toward traditional gender assignments.

    Source: §3.1 · p. 21

Abstract

from arXiv · show

How does language inform our downstream thinking? In particular, how do humans make meaning from language--and how can we leverage a theory of linguistic meaning to build machines that think in more human-like ways? In this paper, we propose rational meaning construction, a computational framework for language-informed thinking that combines neural language models with probabilistic models for rational inference. We frame linguistic meaning as a context-sensitive mapping from natural language into a probabilistic language of thought (PLoT)--a general-purpose symbolic substrate for generative world modeling. Our architecture integrates two computational tools that have not previously come together: we model thinking with probabilistic programs, an expressive representation for commonsense reasoning; and we model meaning construction with large language models (LLMs), which support broad-coverage translation from natural language utterances to code expressions in a probabilistic programming language. We illustrate our framework through examples covering four core domains from cognitive science: probabilistic reasoning, logical and relational reasoning, visual and physical reasoning, and social reasoning. In each, we show that LLMs can generate context-sensitive translations that capture pragmatically-appropriate linguistic meanings, while Bayesian inference with the generated programs supports coherent and robust commonsense reasoning. We extend our framework to integrate cognitively-motivated symbolic modules (physics simulators, graphics engines, and planning algorithms) to provide a unified commonsense thinking interface from language. Finally, we explore how language can drive the construction of world models themselves. We hope this work will provide a roadmap towards cognitive models and AI systems that synthesize the insights of both modern and classical computational perspectives.

1 Introduction

The paper proposes rational meaning construction, a framework combining LLM-based translation from language into probabilistic programs with probabilistic inference over structured world models. It aims to unite broad natural-language coverage with coherent reasoning across uncertain, relational, physical, perceptual, and social domains.

Motivation

  • The proposal addresses the brittleness of hand-engineered or narrowly supervised semantic parsers and the inconsistent, weakly grounded reasoning of current LLMs and tool-augmented systems.It seeks a modular architecture in which language interfaces with robust symbolic world modeling rather than requiring either language models or bespoke tools to supply general cognition alone.Source: §1 · pp. 2–4

Language-informed thinking

  • The framework treats language-informed thinking as translating language into probabilistic-program statements and computing probabilities over possible worlds conditioned on linguistic information.This decomposition is intended to combine broad natural-language coverage with principled reasoning about uncertain events, outcomes, and scenarios.Source: Figure 1 · p. 4, §1 · p. 4

Core framework

  • Rational meaning construction integrates probabilistic programs for structured world modeling and inference with language models that translate natural-language utterances into probabilistic-program expressions.The framework represents meaning as context-sensitive distributions over programs, enabling belief updating, queries, goals, and reasoning about possible worlds.Source: §1 · p. 5

Reasoning domains

  • The paper illustrates unified language-to-code reasoning across probabilistic, relational, perceptual and physical, and social domains.The examples address uncertain situations, structured relations, physical scenes, and agents’ goals and plans.Source: §1 · p. 5, Figure 2 · p. 6

Scaling and future directions

  • The framework is also used to explore how language can autonomously construct new concepts and whole world models that support coherent downstream reasoning without hand engineering.The paper presents these examples prospectively and identifies future work in theory, language acquisition and production, scalable inference, robust translation, and learning.Source: §1 · p. 5

2 Overview of the key ideas

This section presents rational meaning construction, an architecture that translates natural language into probabilistic programs for world modeling, inference, and decision making. It explains how few-shot LLM prompting and a probabilistic language of thought support context-sensitive parsing, belief updating, defeasible reasoning, and defining new concepts.

2 Overview of the key ideas

  • Language is treated as goal-directed communication whose meaning construction interfaces with rational thought, while human thought remains possible without language.For humans, language substantially shapes which problems and goals are considered and how they are represented for reasoning.Source: §2 · p. 7
  • The approach is resource-rational: language-to-thought mappings can amortize reusable structure, but reasoning must still flexibly model unfamiliar situations and support inference, planning, and simulation.This motivates combining learned statistical patterns with explicit world models and algorithms for novel problem solving.Source: §2 · pp. 7–8

2.1 Our proposal: A framework for modeling rational meaning construction

  • Rational meaning construction maps natural-language utterances, context-sensitively, to distributions over probabilistic-language-of-thought expressions for rational world modeling and inference.The framework combines learned language-to-code mappings with probabilistic programs that support coherent reasoning over world models.Source: §2.1 · p. 8

2.1.1 Modeling thinking

  • The framework represents thought with probabilistic programs that combine generative world models, evidence, and queries, then compute posterior distributions over answers.This substrate supports flexible reasoning about novel situations and has been used to model visual, physical, and social inferences.Source: §2.1.1 · p. 9

2.1.2 Modeling language relative to thought

  • Meaning construction translates observations into probabilistic-program conditions and questions into queries that evaluate posterior distributions over simulated worlds.A dialogue REPL evaluates each query using all preceding conditions, allowing facts and questions to interleave.Source: §2.1.2 · p. 9, §2.2 · pp. 12, 14
  • LLMs provide broad-coverage, context-sensitive language-to-code mappings that condition translations on discourse context and the local probabilistic program.This positions learned language patterns within a modular system that can invoke domain-specific tools and perform Bayesian conditioning.Source: §2.1.2 · pp. 9–10

2.1.3 Illustrating the architecture by example

  • The examples use Church with rejection sampling and Codex for language-to-code translation, chosen for simplicity and pedagogical clarity rather than performance or scalability.The authors explicitly present these implementations as illustrative and discuss scaling toward richer cognitive models and domains.Source: §2.1.3 · p. 10

2.2 Understanding language with probabilistic reasoning

  • In the tug-of-war demonstration, a generative model represents players’ latent strength and laziness, while translated statements update beliefs and queries infer uncertain outcomes.Figure 3 shows the model-to-code translation pipeline and its resulting inferences over players’ latent traits.Source: §2.2 · p. 12, Figure 3 · p. 13
  • Few-shot prompting induces Codex to translate English into Church condition and query statements, using a small set of examples plus the domain model to constrain generated code.The prompt concatenates the generative model, translation examples, and a new utterance; Codex completes the requested Church expression.Source: §2.2 · p. 14
  • LLM translation handles broad linguistic variation while preserving wording-sensitive meaning, although it captures only aspects compatible with the domain model.The approach is broadly invariant to spurious phrasing, can recover meanings absent explicit lexical matches, and represents negation while omitting some discourse-level nuances.Source: §2.2 · p. 14
  • Church inference converts translated observations and questions into posterior distributions, yielding richer beliefs than textual LLM responses alone, such as Gabe’s 23.90% chance of beating Josh.Church simulates scenarios consistent with the condition statements and estimates distributions over latent properties and match outcomes.Source: §2.2 · p. 15, Figure 5 · p. 17
  • The framework supports defeasible belief revision: Gabe’s upset shifts inferred strength left when Josh is likely lazy and right when Josh is rarely lazy.New, low-probability or unanticipated information can alter the model’s interpretation of prior events, and complex dialogue answers are likewise expressed as simulation-derived probability distributions.Source: §2.2 · pp. 15–16, Figure 4 · p. 15
  • Context-sensitive translation amortizes pragmatic choices, mapping phrases such as “pretty strong,” “real slackers,” and “several of the faculty” to usable thresholds while allowing new symbolic concepts and functions to be defined.The framework defines reusable concepts such as faculty-team and student-team, supporting compositional expressions like stronger-than? and motivating expansion to relational, visual, physical, and action-oriented reasoning.Source: §2.2 · pp. 16, 18

3 WORLD MODELS · 3 Understanding and reasoning about language with world models

The section applies probabilistic language-of-thought translation to language-informed reasoning over logical, perceptual, physical, and social domains. Its kinship case study combines probabilistic family-tree models, compositional predicates, and language-model translation to support mixed deductive and inductive inference.

3 Understanding and reasoning about language with world models

  • The framework maps language about uncertain situations into generative world-modeling programs that support probabilistic reasoning across logical, perceptual, physical, and social domains.The section associates logical and relational reasoning with Section 3.1, visual grounding with Section 3.2, and preference- and goal-based reasoning with planning in Section 3.3.Source: §3 · p. 19

3.1 Language for logical and relational reasoning

  • The PLoT supports both classical deductive reasoning and inductive inference, integrating symbolic and probabilistic reasoning through natural-language translation.This combination is presented as necessary for many real-world reasoning problems that structured logic alone does not capture.Source: §3.1 · p. 19
  • Kinship provides a challenging test case because sparse language describes compositional, symmetric, ambiguous relations while inviting both deductive and inductive inferences.For example, observations about family relations can shift or eliminate competing hypotheses about who is a child’s parent.Source: §3.1 · p. 19
  • A compositional conceptual system exposes kinship relations through derived predicates, tree accessors, and higher-order functions for compound statements.These operators provide an expressive program interface aligned with the natural-language semantics of family relations.Source: Figure 6 · p. 20, §3.1 · p. 21
  • The kinship world model generates bounded family trees through recursive probabilistic choices about births, partnerships, genders, names, and numbers of children.Inference uses trees capped at three generations and couples limited to three children.Source: §3.1 · p. 20
  • The toy kinship model sacrifices social and cultural nuance, including step-relations and nonbinary linguistic concepts, to keep inference tractable and reflects gendered assumptions in English terms.The authors use gender-neutral names to exclude naming-based gender inferences from the reasoning task and identify later extensions toward more inclusive concepts.Source: §3.1 · p. 21
  • The language model translates utterances into conditioning and query statements using the model code and predicate definitions, including zero-shot generalization to “only child.”This translation bridges natural language with the domain-specific program interface.Source: §3.1 · p. 21
  • Successive linguistic conditions constrain possible family trees, while posterior samples represent consistent-world hypotheses and support principled reasoning under residual uncertainty.As conditions accumulate, uncertainty decreases and the inferred family picture becomes more specific.Source: §3.1 · p. 21

A. Language-to-code translation B. Family trees sampled from conditioned kinship domain theory

The framework translates language into probabilistic programs whose conditioned generative models support coherent relational inference, and extends this interface to visual reasoning through graphics rendering. These integrations connect linguistic meaning with structured world models while preserving uncertainty over interpretations and possible worlds.

A. Language-to-code translation B. Family trees sampled from conditioned kinship domain theory

  • Kinship-language translations become cumulative Church conditioning statements, enabling posterior inference over possible family trees and unknown relations.The system combines a distributional parser with a Church inference engine to represent possible worlds and integrate deductive and inductive inferences.Source: Figure 7 · p. 22
  • After conditioning that Blake has two kids, Blake is Dana’s parent with > 80% probability, but contradictory evidence that Dana is an only child reduces this probability to 0%.Rejection sampling preserves lower-probability alternative family configurations before the contradiction is introduced.Source: A. Language-to-code translation B.… · p. 23

3.2 Language for visual and physical reasoning

  • The visual-and-physical extension integrates graphics rendering and physics simulation engines with the probabilistic language of thought to support perception and intuitive physical reasoning from language.The architecture is presented as a modular interface between linguistic meaning, world models, visual scenes, and physical reasoning.Source: §3.2 · p. 24

3.2.1 Language about visual scenes

  • The visual-scene model represents tabletop worlds probabilistically, translates language into conditions and queries, and renders conditioned scene states into visual depictions.A generative program samples objects and properties, while a render function calls Blender to map symbolic scene graphs to 3D scenes.Source: Figure 8 · p. 25, §3.2.1 · p. 26
  • The visual-scene implementation is illustrative and could be extended to model lighting, viewpoint, stereo depth, and perceptual noise.The current simple tabletop domain does not itself include all these richer perceptual relationships.Source: §3.2.1 · p. 26
  • Language-to-code translation for scenes is robust to conjunctions, syntactic variation, predicates, compositions, negation, and comparisons over object sets.Examples include descriptions such as colored object types, “a few mugs and bowls,” absent objects, and more red mugs than green cans.Source: §3.2.1 · p. 26

A. Language-to-code translation B. Rendered scenes from conditioned generative model

This section presents a framework for translating context-sensitive language into probabilistic-program conditions and queries, grounding meanings in visual scenes, physical events, agent preferences, environments, and plans. These interfaces support probabilistic inference over world states and behavior, including goal-directed action selection, while preserving uncertainty and contextual variation.

A. Language-to-code translation B. Rendered scenes from conditioned generative model

  • Language-to-code translation supports context-sensitive interpretations of vague terms and composable scene conditions, with sampling producing rendered scenes consistent with successive sentences.The LLM translates vague quantifiers into interpretable quantities and can sample alternative meanings, while conditioned scene distributions update after each sentence.Source: A. Language-to-code translation B.… · pp. 27–28, Figure 9 · p. 27

3.2.2 Language about dynamic physical scenes

  • The physical-scene model integrates probabilistic programs with a physics engine so language conditions masses, forces, collisions, and other continuous world-state variables for downstream inference.Simulated scenes evolve under kinematics, friction, gravity, and collision mechanics; queries estimate outcomes by sampling and running simulations conditioned on linguistic descriptions.Source: §3.2.2 · pp. 29–31

3.3 Language for reasoning about agents and plans

  • The framework extends its probabilistic-language interface with model-based planners to support forward and inverse inferences about agents, goals, preferences, actions, and world states.The planning domain balances preferences, travel costs, restaurant availability, and transportation choices, while observations of actions update beliefs about latent agent and environmental properties.Source: §3.3 · p. 33, Figure 11 · p. 34
  • The integrated generative model combines stochastic world states, agent preferences, action costs, and a model-based planner to infer goals, plans, and behavior.The planner uses value iteration to trade off restaurant utility against walking or biking costs under environmental conditions.Source: §3.3 · pp. 35–36
  • Observations about the world and explicit statements about goals or actions become conditions and queries that support forward planning and inverse inference about latent world states.The framework can update expectations about where agents will go, how they change plans after new observations, and whether a restaurant is open based on an agent’s actions.Source: §3.3 · pp. 35–36
  • LLM translations ground vague preference terms such as “doesn’t mind,” “loves,” “hate,” and “love” in context-specific utility thresholds, including terms not explicitly demonstrated.The model generalizes from example mappings such as likes to a > 0 utility threshold, using comparative linguistic valences.Source: §3.3 · pp. 35–36
  • The LLM also translates contextual quantifiers such as “likes all of the nearby restaurants” into conjunctions over the relevant restaurants identified in the generative world model.This amortizes computation that would otherwise be required by a more literal universal-quantifier semantics.Source: §3.3 · p. 36
  • The simple planning implementation is presented as a foundation for richer models with discrete goals, uncertain world knowledge, hierarchical plans, and recursive reasoning about other agents.These extensions would support more nuanced descriptions of agents and inferences from language, while the broader framework treats planners and other computational engines as modular interfaces within a probabilistic language of thought.Source: §3.3 · pp. 36–37

4 GROWING WORLD MODELS · 4 Growing and constructing world models from language

The framework treats language as a mechanism for extending existing probabilistic world models and constructing entirely new domain models from scratch. Language-to-code translation supplies program expressions that support subsequent probabilistic reasoning over newly learned concepts and domains.

4 Growing and constructing world models from language

  • The framework addresses how probabilistic world models can acquire new concepts and domain theories beyond programmer-hand-coded knowledge through language.Because world models are expressed as programs, the same computational components can extend and construct them from linguistic descriptions.Source: §4 · p. 38

4.1 Growing a world model from language

  • The LLM’s initial “uncle” translation is incomplete, so a define construct uses explicit linguistic instruction to generate a more appropriate concept definition.The definition accommodates both a parent’s brother and an aunt’s husband, correcting the initial translation’s overly narrow sibling relation.Source: §4.1 · pp. 38–39
  • Language definitions extend existing models by translating novel concepts into program expressions that define new relational primitives over the underlying generative model.The approach learns kinship concepts such as “uncle” and the low-resource Northern Paiute term “p¯aan’i,” then uses them for coherent reasoning with existing knowledge.Source: §4.1 · pp. 39, 41, Figure 12 · p. 40
  • The same extension principle generalizes beyond kinship to domain-specific concepts such as tug-of-war anchors, monochrome scenes, and guaranteed restaurant openings.Language specifying new model components can extend generative programs, which then support reasoning about observations involving the learned concepts.Source: §4.1 · p. 41

4.2 Constructing new world models from language

  • The framework also constructs entire domain models from language, enabling learners to infer future observations and answer questions in previously unfamiliar settings such as tug-of-war.Descriptions distinguish derived concepts from primitive random variables, allowing language to specify both relational rules and stochastic properties such as strength and laziness.Source: §4.2 · pp. 41–42
  • Primitive concepts introduced by language are represented as random variables whose possible definitions share structural constraints while leaving details such as priors uncertain.For example, strength can be modeled as a memoized per-person Gaussian variable, but the meaning function induces a distribution over possible definitions rather than fixing one prior.Source: §4.2 · p. 42
  • The paper takes a shortcut by directly sampling model fragments consistent with linguistic statements, rather than performing slower Bayesian inference over a hierarchical distribution of possible world-model definitions.The authors identify practical Bayesian probabilistic program synthesis over world models as an intriguing technical challenge for future work.Source: §4.2 · p. 42

A. Prompt, containing unrelated example world model

The section shows that unrelated example world models can prompt Codex to construct a semantically equivalent tug-of-war model from language. This supports extending and authoring expressive probabilistic world models, while leaving on-the-fly construction from indirect language and broader experience as open challenges.

  • Codex constructs a semantically equivalent tug-of-war generative model from scratch by combining an unrelated example-world prompt with line-by-line language instructions.The recovered model preserves the essential structure of the hand-coded model, although priors and naming may vary slightly.Source: Figure 13 · p. 43, A. Prompt, containing unrelated… · p. 44
  • Once constructed, the new domain model can interpret observations and queries or be extended with additional definitions.Source: A. Prompt, containing unrelated… · p. 44
  • Language-to-code translation and probabilistic programs can extend and construct world models, enabling code-based generalization to new kinds of language and thinking.Source: A. Prompt, containing unrelated… · p. 44
  • The approach remains limited when linguistic instructions connect only indirectly to probabilistic expressions or when world models must be built from prior experience and broader real-world inputs.Future challenges include constructing, remembering, and expanding world models on the fly while incorporating experiences beyond language.Source: A. Prompt, containing unrelated… · p. 44

5 FUTURE DIRECTIONS · 5 Open questions and future directions

This section outlines open questions and future directions for scaling rational meaning construction, including dynamic world-model building, efficient inference, flexible amortization, and language generation. It also considers how robust, interpretable, and data-efficient language understanding can support cognitive science, neuroscience, and AI architectures grounded in probabilistic and symbolic reasoning.

5.1.1 Building new world models on the fly

  • The framework must scale beyond hand-specified domains by constructing bespoke world models that balance fidelity, relevance, inference efficiency, and robustness.This remains connected to the frame problem and requires selecting relevant knowledge while preserving coherent reasoning across dynamically synthesized models.Source: §5.1.1 · pp. 45–46

5.1.2 Scaling probabilistic inference in dynamically synthesized world models

  • Probabilistic inference remains a major bottleneck because rejection sampling scales exponentially in unlikely scenarios, while generic exact and approximate methods struggle with the paper’s flexible world models.Potential solutions include synthesizing problem-specific inference programs, automatically decomposing models, and training neural networks for amortized data-driven proposals.Source: §5.1.2 · p. 46

5.1.3 Resource rational amortization in meaning construction and problem solving

  • Future systems could flexibly allocate language understanding and reasoning between explicit probabilistic inference and amortized neural prediction, trading speed against accuracy at runtime.Symbolic inference could supervise neural translators or inference models, while learned proposals could improve sampling without preventing correction of novel-problem biases.Source: §5.1.3 · p. 47

5.1.4 Language generation

  • Language generation should combine world- and goal-based content selection with fluent realization, using neural candidates scored by formal listener and world models to reduce hallucination risks.This extends rational meaning construction from understanding utterances to choosing utterances that induce appropriate beliefs or actions.Source: §5.1.4 · p. 47

5.2.1 Connections to cognitive and formal models of linguistic structure

  • Integrating symbolic theories of linguistic meaning with probabilistic programs could support more sample-efficient, human-like language learning and connect linguistic competence with statistical performance.The paper also points to preliminary evidence that language-to-code models can generalize syntactic patterns and bootstrap hypotheses about novel-word semantics.Source: §5.2.1 · p. 48

5.2.2 Modeling the mechanisms of human thought

  • The framework could make cognitive models language-computable by automatically translating the linguistic stimuli and goals used in behavioral experiments into Bayesian models of human thought.Preliminary applications address physical commonsense reasoning, social reasoning, and scalar implicatures aligned with human interpretations.Source: §5.2.2 · p. 49

5.2.3 Language and thought in the brain

  • Neuroscience evidence suggests that language processing is separable from many nonlinguistic reasoning systems, while an amodal semantics network may interface between language and general cognition.The framework therefore treats LLMs as context-aware mappings from language to meanings and proposes using neuroscience to locate the boundary between language and thought.Source: §5.2.3 · pp. 49–50

5.3.1 Structured hybrid models of language and thought

  • The proposed AI direction is to center systems on a probabilistic language of thought that unifies world models, language models, physics, graphics, and planning modules.Probabilistic programming frameworks could natively incorporate LLMs, treating techniques such as scratchpads and chain-of-thought as probabilistic programs over strings and structured hypotheses.Source: §5.3.1 · pp. 50–51

5.3.2 Robustness and trustworthiness in language understanding

  • LLMs’ fluency remains undermined by hallucinations, inconsistent constraint-following, and unpredictable out-of-distribution behavior, motivating modular symbolic reasoning with explicit, verifiable programs.The proposed architecture separates language-specific systems from reasoning engines for inference, planning, and physical simulation.Source: §5.3.2 · p. 51

5.3.3 Interpreting models that use language

  • The framework is interpretable by design because it constructs visible, editable, and constrainable world models and meanings rather than post-hoc explanations of hidden computations.Open questions include whether end-to-end LLMs construct context-specific world models, maintain uncertain beliefs, and implement probabilistic inference, physical simulation, or planning (B. Z. Li et al., 2021; Hase et al., 2021).Source: §5.3.3 · pp. 51–52

5.3.4 Learning from human-scale data

  • Focused neural translation from language into probabilistic programs could require less data than general token prediction, while a thinking substrate separates translation learning from learning general-intelligence representations and algorithms.Progressive amortization could train literal semantic parsers first, then supervise models to absorb increasingly context-sensitive pragmatic inferences; human language acquisition and bootstrapping methods offer related directions.Source: §5.3.4 · pp. 52–53

6 Conclusion

The paper argues that human language is grounded in purposeful world models and cognition, unlike language models’ learning from vast linguistic input. It presents a sketch toward AI systems that connect language to interpretable, controllable thought without requiring language models to reliably model the world, infer, or decide.

  • Human language is tightly connected to reasoning, belief revision, action, knowledge construction, and the pursuit of new goals.The conclusion frames these connections as central requirements for a theory of human language and meaning.Source: §6 · p. 53
  • Unlike large language models, humans think first and learn from relatively little input how language maps into purposeful world models and beliefs.Human world models are described as the core of cognition, constructed and maintained toward intentions and desires rather than as fragile byproducts of language.Source: §6 · p. 53
  • The paper sketches computational components for connecting human language to cognition while incorporating language models without requiring reliable world modeling, inference, or decision-making.The proposed direction aims toward AI models that understand meaning predictably and operate in interpretable, explainable, and controllable ways.Source: §6 · p. 53

Appendices

The appendices provide commented example code for reference, while directing readers to the GitHub repository for the complete, corrected, up-to-date implementations and reproducibility instructions.

Appendices

  • The appendix includes human-readable commented code to clarify the paper’s examples and provide a reference implementation.The code is included for completeness and interpretation.Source: Appendices · p. 70
  • The appendix code may not reflect the most up-to-date version of the examples.Source: Appendices · p. 70
  • The GitHub repository provides the most complete and corrected code, plus execution and reproducibility instructions.The repository is identified as github.com/gabegrand/world-models.Source: Appendices · p. 70

A Language and world models … A.2 Relational reasoning

The paper instantiates a probabilistic tug-of-war world model in which player traits determine team strength and outcomes, then translates natural-language conditions and queries into executable probabilistic expressions. The examples also show how underspecified statements, relational comparisons, and quantified claims can be formalized in this language.

A.1.1 Generative world model for tug-of-war

  • The tug-of-war model represents each player’s strength as a Gaussian variable centered at 50 and models match outcomes by comparing the teams’ strengths.The program frames the scenario as a game between teams of players, with 50 described as approximately average strength.Source: §A.1.1 · p. 70
  • Team strength sums players’ strengths, while a lazy player contributes half their strength with a probability determined by an intrinsic laziness frequency.Laziness is modeled as a player-specific uniform random variable, and its effect is implemented through a probabilistic flip.Source: §A.1.1 · p. 70

A.1.2 Translation examples for tug-of-war

  • Natural-language prompts use Condition statements to provide scenario facts and Query statements to ask about quantities of interest.For example, “Alice won against Bob” becomes a condition on won-against, while “If Mary played against Tom, who would win?” becomes a query.Source: §A.1.2 · p. 70
  • The translation examples support relational facts about individual players and teams, including statements that one team won against another.The examples encode both single-player teams and multi-player teams as arguments to won-against.Source: §A.1.2 · p. 70
  • Underspecified language can be mapped to explicit quantitative conditions, such as interpreting “Sue is very strong” as strength greater than 75.The examples therefore require the translation process to supply an interpretation for vague descriptive language.Source: §A.1.2 · p. 70
  • The framework allows new relational predicates to be defined and used in conditions, queries, and quantified claims about multiple players.Examples define stronger-than? for pairwise comparisons, query whether Sue is stronger than Mary, and require at least two players to be stronger than John.Source: §A.1.2 · p. 71

A.2.1 Generative world model for kinship … A.2.4 Translation examples for kinship

This section presents a probabilistic kinship world model representing family-tree identities and relations, along with utilities for generating, querying, and traversing these structures. It also shows how natural-language conditions and questions translate into executable relational predicates, including nested family relations and child-count queries.

A.2.1 Generative world model for kinship

  • A generator builds family trees from person identifiers and genders, optionally adds partners with probability 0.5, and recursively generates children whose count is bounded-geometric unless maximum depth is reached.Each person includes two parent identifiers.Source: §A.2.1 · pp. 71–72

A.2.2 Kinship tree utilities

  • Kinship-tree utilities retrieve people by property, name, or identifier, access properties, and apply predicates across the tree through mapping, filtering, and existence operations.Named and unnamed people are supported through a unified person-reference lookup, while tree operators evaluate predicates using each person's name.Source: §A.2.2 · pp. 72–73

A.2.3 Kinship conceptual system

  • The conceptual system defines relations for a person's partner, parents, grandparents, and children by traversing stored partner, parent, and child links.The supplied code explicitly derives grandparents by applying the parent relation to a parent and introduces a children-of function for child relations.Source: §A.2.3 · p. 73
  • The kinship conceptual system defines predicates for partners, siblings, fathers, grandparents, and children, specifically partner-of?, siblings-of, father-of?, grandparent-of?, and child-of?.Source: §A.2.3 · p. 74

A.2.4 Translation examples for kinship

  • Kinship translations represent statements as conditions and questions as queries, covering direct relations, nested partner-relative chains, parent retrieval, child counting, and yes/no sibling questions.Examples translate facts such as Ryan’s partnership with Taylor and Taylor’s motherhood of Sam, existential chains involving Payton’s partner, and queries about Sam’s parents, Kyle’s children, Ryan’s grandfather, and Taylor’s sister.Source: §A.2.4 · p. 75

A.2.5 Why not Prolog? … A.3.3 Generative world model for physical scenes

This section explains why probabilistic programming is needed for an expressive language of thought and develops generative models for physical scenes. It represents objects, forces, motion, collisions, and events over time, enabling relational scene construction, physical simulation, and event queries.

A.2.5 Why not Prolog?

  • Church is preferred to Prolog because its probabilistic generative domain theories support mixed deductive and inductive inferences that definite-clause logic does not capture well.Semantic parsing itself can use Prolog or other languages, but Church combines probabilistic priors and likelihoods with generative domain theories.Source: §A.2.5 · p. 76

A.3.1 Generative world model for static visual scenes

  • The static visual-scene model generates up to 12 objects with shape and color attributes, then supports filtering and querying scenes by these properties.Objects use cube, sphere, or cylinder shape categories and predefined RGB color values; scene states are rendered by a separately generated render function.Source: §A.3.1 · pp. 76–77

A.3.2 Translation examples for static visual scenes

  • The visual translation examples express existence, cardinality, conjunction, and object-shape or color queries over generated scenes.Examples include a blue object, at least two blue plates, many blue plates, exactly two plates alongside a yellow object, and whether a mug exists.Source: §A.3.2 · p. 78

A.3.3 Generative world model for physical scenes

  • The physical-scene model represents dynamic scenes with collision detection, object shapes and initial states, forces, friction, gravity, and post-friction force updates.The supplied implementation uses two objects, sphere-or-block shapes, sampled initial positions and forces, shape-dependent friction constants, and a gravity-based normal force.Source: §A.3.3 · p. 79
  • The model updates object motion with Newtonian acceleration, friction-adjusted forces, velocity integration, and position integration.Its code defines force-after-friction, a = f/m, v_next, and x_next, then uses these functions in state transitions.Source: §A.3.3 · pp. 79, 80, 82
  • Initial scene generation defines each object’s state using a chosen shape, an initial x-position, and an initial force computed after friction from the push force, shape, and mass.Source: §A.3.3 · p. 80
  • Collision processing defines circle-intersection checks, identifies colliding events, computes an elastic-collision subject velocity, and associates that result with subject_final_v.Source: §A.3.3 · pp. 80–81
  • The model recursively generates scene and event states over time from an initial scene, updating object states using collision events.Scene states are generated from prior states and event states, with memoized generation across the full time horizon.Source: §A.3.3 · pp. 82–83
  • Derived predicates identify scene objects by attributes such as color and shape and support existential and filtered object queries.The implementation collects objects from the initial scene and applies predicates to test or return matching object identifiers.Source: §A.3.3 · p. 83
  • The world model derives moving and resting events from object velocity, labeling moving objects as quickly or slowly using threshold-based predicates.Events store identifiers, times, predicates, subjects, and speeds; the supplied implementation sets both QUICKLY_THRESHOLD and SLOWLY_THRESHOLD to 2.Source: §A.3.3 · pp. 83–84
  • Collision events are inferred from changes in subject and object speeds, distinguishing launching, hitting, and colliding relations and preserving their event participants and velocities.A subject moving into a stationary object can be labeled launching, hitting, and colliding when it stops; otherwise, moving subjects yield hitting and colliding labels.Source: §A.3.3 · pp. 84–85
  • The domain theory defines predicates and filters for querying event subjects, event objects, objects, and events within the generated scene.Source: §A.3.3 · p. 85
  • The generative physical-scene model creates a red object left of a blue object, samples a random force, and forward-simulates the scene using a physics engine implemented in Church.Natural-language comments explain the code but are not included in the LLM prompt.Source: §A.3.3 · p. 86

A.3.4 Translation examples for visual scenes … C.1 Attribution of graphics resources

This section illustrates language-to-code translation for visual scenes and social reasoning, combining probabilistic predicates and events with generative world models, utilities, transitions, and planning, while noting code editing as an extension and recording graphics attributions.

A.3.4 Translation examples for visual scenes

  • Visual-scene translations encode object properties, quantitative attributes, forces, collisions, and queries such as an object’s final velocity as probabilistic-program expressions.Examples represent colors, shapes, mass thresholds, push force, event roles, and physical-event attributes in structured code.Source: §A.3.4 · pp. 86–87

A.4.1 Generative world model for social reasoning

  • The model probabilistically assigns bike ownership to agents, makes available motions agent-specific—walking alone or walking and biking—and samples restaurant openness before selecting positive utility with mean 10 or a negative utility.Source: §A.4.1 · pp. 87–88
  • The model evaluates actions by combining food and motion utilities with recursively computed future state values after bounded gridworld transitions.Action values are formed from immediate utility plus the value of the resulting state, supporting iterative optimal-action evaluation.Source: §A.4.1 · pp. 88–89
  • The generative world model creates restaurant-navigation agents with varying preferences in a gridworld and implements a value-iteration-based planner directly in Church code.The model derives optimal policies and trajectories, terminal goals, motion-location predicates, and structured action representations for querying agents’ planned behavior.Source: §A.4.1 · pp. 90–92

A.4.2 Translation examples for social reasoning domain

  • Translation examples encode graded preferences, negation, restaurant availability, and action conditions as Church expressions over utility, openness, and planned-action predicates.For example, “Bob likes pizza” uses positive utility, “really likes” raises the threshold above 10, and action conditions query whether Bob walked North on Danner.Source: §A.4.2 · p. 92
  • Social-reasoning examples translate questions about Bob’s preferences, actions, destinations, and lunch location into PLoT queries.The examples include queries for whether Bob likes vegetarian food, where he is going, and where he will go for lunch.Source: §A.4.2 · p. 92

B OPEN QUESTIONS

  • Novel-word examples suggest that language-to-code models can use syntax–semantic mappings to hypothesize meanings.This open question concerns how models generalize translation beyond familiar vocabulary.Source: Figure 14 · p. 93

B.2 Code editing

  • Code editing is needed when language bends domain-theory rules, enabling existing PLoT generative models to be modified rather than replaced.The paper highlights utterances about team strength, kinship, visual scenes, and navigation, and notes that language-guided code editing could support localized changes and iterative theory revision.Source: §B.2 · pp. 93–94

C.1 Attribution of graphics resources

  • Graphics resources are attributed to sachin modgekar and Rflor from thenounproject.com.The listed assets are an artificial neural network icon and a cog icon.Source: §C.1 · p. 94
Loading 2306.12672v2…