Bayesian Programming¶
A probabilistic-program specification method that defines variables, factorizes their joint distribution, assigns parametric or nested forms, learns unspecified parameters from data, and answers conditional probability queries.
Core Idea¶
Bayesian programming treats probability as a formal language for reasoning with incomplete information. A program has two parts: a description that defines a family of joint distributions and a question that asks for a particular marginal or conditional distribution.
The description selects pertinent variables, decomposes the joint law into conditional factors, assigns each factor a parametric form or another Bayesian program, and uses data to identify parameters not supplied by the programmer. These choices jointly encode prior knowledge and independence assumptions.
Inference answers the question by applying probability rules to the description. Bayesian networks, hidden Markov models, Kalman filters, and related graphical models can be represented, but the formalism is broader than any one diagram type.
How would you explain it like I'm…
Chance Recipes for Computers
Programming With Maybes
Probability as a Programming Language
Structural Signature¶
Sig role-phrases:
- pertinent variables. Define the uncertain quantities and their domains. Constitutive vocabulary. If altered: Omitting a decision-relevant variable changes the model family.
- joint decomposition. Factorizes the joint distribution through declared conditional independences. Constitutive structure. If altered: A wrong factorization encodes false independence.
- probability forms. Assign parametric distributions or calls to other Bayesian programs to factors. Constitutive local semantics. If altered: An unspecified form prevents effective computation.
- identification data. Learns parameters not fixed by prior specification. Optional but central completion mechanism. If altered: Data cannot identify parameters excluded or confounded by the specification.
- probabilistic question. Selects the conditional or marginal distribution the program must compute. Identity-bearing output request. If altered: A description without a query is a model, not a completed problem-solving program.
What It Is Not¶
- Not Bayesian inference alone. The identity includes a reusable model description and an explicit question.
- Not one graphical model. Several model families can be specified within the formalism.
- Not assumption-free learning. Variable choice, decomposition, and forms encode prior structure.
- Not guaranteed identifiability. Data cannot resolve every parameterization the specification permits.
Scope of Application¶
The formalism applies to probabilistic robotics, perception, diagnosis, control, and other tasks where uncertain models and queries can be specified explicitly.
- Probabilistic robotics. Combines sensor, state, and action models.
- Sequence models. Represents hidden-state temporal dependencies.
- Diagnosis. Computes hypotheses conditioned on observations.
- Sensor fusion. Factors evidence with dependence declared.
- Model composition. Nests Bayesian programs as probability forms.
Clarity¶
The program separates model construction from inference. It makes variable selection, conditional-independence assumptions, distributional forms, learned parameters, and the requested conditional visible, so ‘Bayesian’ cannot serve as a label for an unspecified posterior calculation.
Manages Complexity¶
Large uncertain systems become tractable when a joint distribution is factored into local forms and reusable subprograms. The decomposition compresses knowledge while exposing where approximation, data scarcity, or a false independence assumption enters.
Abstract Reasoning¶
- Define pertinent variables and their domains from the task.
- Factor the joint distribution using justified conditional independences.
- Assign normalized forms or nested programs to every factor.
- Identify unknown parameters from data while checking identifiability.
- Pose the desired conditional distribution and choose an exact or approximate inference method.
Knowledge Transfer¶
The description–question architecture transfers literally across probabilistic application domains. A particular factorization, prior, or inference algorithm does not transfer automatically; only the typed roles do, and every new domain must justify its variables and independences.
Examples¶
Canonical¶
A mobile robot defines pose, command, map, and sensor variables; factors motion and observation laws; learns sensor parameters from data; and asks for the posterior pose given commands and readings.
Mapped back: pertinent variables → pose, command, map, sensor; joint decomposition → motion and observation factors; probability forms → transition and likelihood models; identification data → sensor calibration data; probabilistic question → posterior pose.
Applied / In Practice¶
A diagnostic program nests a disease progression subprogram inside a test model and asks for disease probability given results. Changing the query to predicted future tests reuses the description but requests a different distribution.
Mapped back: pertinent variables → disease states and tests; joint decomposition → progression and observation; probability forms → nested subprogram; identification data → clinical observations; probabilistic question → diagnosis or prediction.
Structural Tensions¶
T1: expressive model vs. tractable inference. Richer dependencies improve fidelity while making exact computation expensive. Diagnostic: Which independences are defensible and computationally useful?
T2: programmer knowledge vs. data identification. Specification supplies structure while data estimates what remains unknown. Diagnostic: Which assumption is fixed and which is learnable?
T3: modularity vs. global coherence. Nested programs promote reuse but their forms must compose into one valid joint law. Diagnostic: Do all local distributions share consistent variables and normalization?
Structural–Framed Character¶
Bayesian programming is mixed-structural. Probability laws are formal, while variables, priors, decomposition, and questions reflect modeling judgment. It is institutionally tied to probabilistic AI practice but transfers widely under retyping. Its character: executable probabilistic reasoning organized as a model description plus query.
Structural Core vs. Domain Accent¶
Skeletal core. Define a structured generative model, complete uncertain parameters with evidence, and answer a conditional query.
Domain-bound accent. Random variables, joint distributions, priors, data, factorization, and inference algorithms define the method.
Why not prime. Model-and-query structure travels, but Bayesian programming is a probabilistic formalism.
Instantiates / Related Primes¶
- Factorization. The joint law is decomposed into local conditional forms.
- Inference. The question is computed from the description and evidence.
- No canonical parent edge is asserted in the current DAG.
Neighborhood in Abstraction Space¶
Bayesian Programming sits in a moderately populated region (41st percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.
Family — Empirical Measurement & Statistical Inference Methods (50 abstractions)
Nearest neighbors
- MAP estimator — 0.89
- Gaussian Naive Bayes — 0.88
- Bootstrapping populations — 0.87
- Uncertainty analysis — 0.87
- M-Estimator — 0.87
Computed from structural-signature embeddings · 2026-10-08
Not to Be Confused With¶
- Bayesian network. Tell: Is one directed graphical model meant, or the broader description–question formalism?
- Probabilistic programming. Tell: Does the language follow this specific Bayesian-program decomposition and question scheme?
- Bayesian inference. Tell: Is a model family being specified or only one posterior computed?
- Factor graph. Tell: Is the object a graph representation or the full program with identification and query?
References¶
- Frozen Wikipedia discovery revision: https://en.wikipedia.org/wiki/Bayesian_programming (revision 1353182868).
- Preserved source candidate: http://bcf.usc.edu/~rosenblo/Pubs/agi15_demski.pdf
- Preserved source candidate: https://web.archive.org/web/20181012014510/http://bcf.usc.edu/~rosenblo/Pubs/agi15_demski.pdf
- Preserved source candidate: https://ocw.mit.edu/courses/sloan-school-of-management/15-097-prediction-machine-learning-and-statistics-spring-2012/lecture-notes/MIT15_097S12_lec15.pdf
- Preserved source candidate: http://www.cs.brandeis.edu/~cs134/K_F_Ch3.pdf
- Preserved source candidate: http://cogprints.org/1670/5/Lebeltel2000.pdf
- Preserved source candidate: https://hal.archives-ouvertes.fr/hal-00537809/file/diard10_author.pdf
- Preserved source candidate: https://hal.archives-ouvertes.fr/hal-00747148/file/A_Bayesian_Framework_for_Active_Artificial_Perception.pdf
- Preserved source candidate: https://hal.inria.fr/inria-00182004/file/coue-etal-ijrr-06.pdf
The frozen Wikipedia revision is discovery provenance. The retained source set was reviewed for identity, formal or operational relation, and scope. The encyclopedia's structural synthesis is bounded to those claims; a thin authority surface is recorded as a nonblocking source-strengthening repair rather than concealed.