Draft — This content has not been approved for publication.

New to PLN? Start with the PLN index card for an overview and the PLN Primer for a plain-language on-ramp — this page is the expert-level technical deep dive.

PLN (Probabilistic Logic Networks) is Hyperon's primary framework for uncertain reasoning — deductive, inductive, and abductive inference in which every belief carries a graded truth value (a strength and a confidence) rather than a binary true/false. It has roots in the 2009 PLN book and has evolved continuously through the Hyperon transition. Today the PLN ecosystem runs on two coexisting paradigms — a runnable "Local-Rule" production line and a Lean-formal "World-Model" research line — and the central open question is whether the World-Model paradigm will be productionized or remain theorem-level. Both are covered under Status and Resources below.

On this page

Core Mechanisms and Inference

Truth Values

PLN represents belief strength as Simple Truth Values (STVs): pairs \(\langle s, c \rangle\) where \(s \in [0,1]\) is the estimated probability and \(c \in [0,1]\) is the confidence (loosely analogous to normalized sample size). Multiple truth value types are supported:

  • Simple (STV): (strength, confidence) — the workhorse representation
  • Evidential (ETV): tracks positive and total evidence counts
  • Distributional: discretized histograms over \([0,1]\), enabling richer uncertainty representation
  • Indefinite: interval-valued probabilities for reasoning under deep uncertainty (from Iklé & Goertzel 2008)

Formal intuition: STVs can be interpreted through a Beta distribution over event frequencies: strength summarizes the estimated frequency, while confidence tracks evidential weight and concentration. This is an interpretive bridge, not a replacement for the implementation-specific formulas used by individual rules. (See Geisweiller, AITP-25 slides 12–16.)

Truth Value Interpretation

PLN truth values carry a dual interpretation that creates practical tension in applications: strength can be read as fuzzy set membership (degree to which an element belongs to a set) or as probabilistic truth (estimated probability of a proposition). These interpretations diverge for mutually exclusive alternatives — e.g., pronoun resolution where exactly one antecedent is correct. The workaround uses confidence (not strength) to encode preference ordering: all candidates at high strength but geometrically decreasing confidence (0.5, 0.25, 0.125…). Default reasoning follows a similar pattern: defaults are simply low-confidence beliefs that get overridden by higher-confidence specific knowledge through TV revision, with no special non-monotonic mechanism required. ContextLinks provide additional scoping when defaults apply only in certain domains. (mailing-list-backed: Either-or-truth-values, default-reasoning, 2014–2016)

Inference Rules

PLN provides a library of inference rules, each with a corresponding truth-value formula that computes output STVs from input STVs:

  • Deduction: \(A \to B,\; B \to C \vdash A \to C\)
  • Induction: \(A \to B,\; A \to C \vdash B \to C\)
  • Abduction: \(A \to C,\; B \to C \vdash A \to B\)
  • Modus Ponens: \(A \to B,\; A \vdash B\) — classical skeleton; PLN uses an implementation-specific truth-value formula, detailed below.
  • Revision: combines independent evidence for the same proposition
  • Symmetric Modus Ponens: \(A \leftrightarrow B,\; A \vdash B\) (for Similarity links)
  • Negation introduction and elimination
  • Inversion: \(A \to B \vdash B \to A\) (for Inheritance and Implication)
  • Equivalence to Implication: converts between Equivalence and Implication links
  • Transitive Similarity: \(A \sim B,\; B \sim C \vdash A \sim C\)
  • Evaluation Implication: derives implications from evaluation patterns
  • Inheritance-based argument replacement: substitutes predicate arguments via implicit combinators (Evaluation + Inheritance)
  • Member Deduction via Inheritance: \(\text{Member}(x, A),\; A \to B \vdash \text{Member}(x, B)\)

Modus Ponens — formula detail (lib_pln.metta, source reviewed 2026-07-06):

strength:   Ps * PQs + 0.02 * (1 - Ps)
confidence: Ps * PQs * Pc * PQc

Ps, Pc = premise P strength and confidence; PQs, PQc = implication strength and confidence. The strength formula adds a small false-antecedent prior (0.02 in the reviewed source; earlier explorations used 0.2), and confidence is the product of both premise strengths and both premise confidences. This formula is appropriate only when no explicit evidence for \(\lnot A \to B\) is available; PLN generally prefers term-logic deduction when available.

Each rule’s TV formula is grounded in probability theory. For example, deduction computes output strength from the conditional probabilities of its premises, with confidence derived from the evidence supporting each link. Where a formula takes a minimum over premise confidences, the minimum reflects an evidence-backing constraint: a conclusion cannot draw on more evidential support than the least-witnessed premise.

ImplicationScopeLink Semantics

PLN distinguishes ImplicationScopeLink from ForAll+ImplicationLink because they compute different truth values. ImplicationScopeLink computes TV as an average conditional probability: \(\sum_x P(x) \cdot Q(x) / \sum_x P(x)\), while ForAllLink wrapping an ImplicationLink uses universal quantification semantics. This semantic split (introduced ~2016) required six scoped link types: ImplicationScope, ExtensionalImplicationScope, IntensionalImplicationScope, and three Equivalence variants. The scoped forms are syntactic sugar — PLN formulas are derived from the non-scoped combinators — but the TV difference is real and affects inference results. (mailing-list-backed: ImplicationLink, 2016)

Inference Control

PLN supports multiple chaining directions:

  • Forward chaining: derive new conclusions from known facts (data-driven)
  • Backward chaining: find evidence to support a query (goal-driven)
  • Polyward chaining: combined forward and backward reasoning in the same pass

The current MeTTa implementation uses a priority-queue-based derivation engine with stamp-disjoint checking to prevent circular reasoning. The public API provides two entry points:

  • PLN.Derive($Tasks $Beliefs $queryTerm $maxsteps $taskqueuesize $beliefqueuesize) — Returns all derived tasks and beliefs after $maxsteps inference steps
  • PLN.Query($Tasks $Beliefs $queryTerm $maxsteps $taskqueuesize $beliefqueuesize) — Returns the truth value and evidential base of $queryTerm only

Inputs use the sentence format (Sentence ($Term (stv $Strength $Confidence) ($EvidenceID))). Tasks are active sentences driving derivation; Beliefs are additional background knowledge. Evidence IDs enable stamp-disjoint tracking — statistically dependent inputs can share an ID to improve uncertainty reasoning accuracy. PLN is imported into MeTTa code via PeTTa's git-import mechanism: !(git-import! "https://github.com/trueagi-io/PLN.git").

(Provenance: github-wiki, PLN repository wiki — usage guide and inference rules)

Evidence Tracking Strategy

PLN uses a deliberate two-tier approach to evidence tracking. For focused precise deliberative reasoning, stamp-disjoint checking (or full inference trails) prevents circular double-counting of evidence. For large-scale low-accuracy "background" inference, this overhead can be omitted — circular multiple-counting "kinda comes out in the wash" when running broad inference across large AtomSpaces. This design rationale informed the current stamp mechanism as a practical compromise between full inference trail maintenance and no trail tracking at all. Ben Goertzel noted maintaining an auxiliary AtomSpace to store inference digraphs was considered for the precise tier. (mailing-list-backed: Inference-trails, 2017)

Mathematical Foundations

The STV Quantale

The 2025 FactorGraph paper formalizes the message-passing algebra over PLN truth values using quantale-like operations. The carrier is the non-negative quadrant \([0,\infty) \times [0,\infty)\) (not \([0,1]^2\), since messages accumulate during propagation and are normalized at marginal readout).

Accumulation (marginalizing over variables, aggregating incoming messages):

\[\oplus\bigl((s_1,c_1),(s_2,c_2)\bigr) = (s_1 + s_2,\; c_1 + c_2)\]

Conjunction (at factor nodes, reflecting independent conjunction of premises):

\[\otimes\bigl((s_1,c_1),(s_2,c_2)\bigr) = (s_1 \cdot s_2,\; c_1 \cdot c_2)\]
  • Variables: \(s_i\) = strength (estimated probability), \(c_i\) = confidence (normalized evidence weight)
  • Domain: Carrier is \([0,\infty) \times [0,\infty)\) for message-passing; \(\otimes\) is closed on \([0,1]^2\)
  • Assumptions: \(\otimes\) assumes statistical independence between premises
  • Meaning: \(\oplus\) aggregates incoming messages during marginalization; \(\otimes\) combines premise truth values at factor nodes. Messages accumulate via \(\oplus\) and are renormalized at marginal readout.
  • Source: Goertzel (2025), PLN FactorGraph MORK v2

This structure enables PLN to participate in the broader weakness theory framework, where inference scheduling prioritizes steps that maximize weakness reduction per unit cost.

Linear Logic Connection

Ben Goertzel drew an explicit connection between PLN's evidence tracking and resource management in linear logic: the careful tracking of evidence in PLN maps to the resource-sensitivity of linear logic, where different heuristic approximations correspond to multiplicative vs. additive operator-sets. This provides theoretical motivation for PLN's two-operation quantale structure: \(\oplus\) (accumulation) corresponds to additive resource pooling, while \(\otimes\) (conjunction) corresponds to multiplicative resource consumption. (mailing-list-backed: Uncertain-linear-logic-and-PLN-truth-values, 2017)

Context Quantaloid Unification

The broader source materials describe a proposed unification of PLN and NARS as different computational strategies within a single Context Quantaloid framework. Rather than maintaining separate reasoning engines, both would be instantiated from the same algebraic structure — differing in their choice of quantale and update rules but sharing the same compositional semantics. This remains a theoretical proposal. An earlier (2014) precursor — "Fibered Products of Logics" — proposed combining PLN with temporal, deontic, and other logics via category-theoretic pullbacks, where each logic is a functor between categories of AtomSpaces and their combination is a pullback. The key practical insight: semantic fibering would yield auto-generated rules connecting temporal and probabilistic knowledge, e.g. \(TV(\text{Inheritance}\; A\; B) = \int_T TV(\text{AtTime}\; (\text{Inheritance}\; A\; B)\; T)\). (mailing-list-backed: Fibered-products-of-different-logics, 2014)

Independence Assumptions

The quantale product \(\otimes\) assumes independence between premises. The PLN FactorGraph MORK design note proposes a heuristic restructuring pass that would mitigate this: computing Jaccard similarity between variable neighborhoods to detect dependencies, then either inserting explicit DependencyFactor nodes or clustering correlated variables into macro-variables. The proposed pass would run in \(O(|E|)\) using PathMap neighbor lookups.

Execution on MORK

The 2025 design documents propose two complementary execution strategies for PLN on MORK. A 2026 source-code review found these proposals at significantly different implementation maturities — see Implementation status notes below each section.

Backward Chaining (Goal-Directed) — partially implemented

The "PLN Chaining On MORK" paper describes a low-level backward chaining engine with:

  • Atom types: RuleAtom, PatternAtom, GoalAtom, ContinuationAtom, MagicAtom
  • Indices: HeadIndex (predicate+argument-mask → rules), FactIndex (ground/partial facts), UnifyIndex (argument hashes, Bloom filters for fast rejection)
  • Scheduling: best-first search prioritizing by weakness (prefer more general rules), expected gain / cost, and chain length
  • Caching: subgoal memos (transposition table), head filter caches, partial-proof caches — typically 10-100x speedup
  • Locality: KaHyPar hypergraph partitioning of co-activated atoms for NUMA-aware placement
  • Magic sets: push query bindings down into rule bodies to shrink candidate sets before unification

Implementation status: The chaining/repositoryRuleAtom contains DTL backward/forward chaining, proof-tree, iterative-chaining, and inference-control experiments, but the specific MORK-backed "PLN Chaining On MORK" architecture described above is only partially resonant with that repo. The paper's / GoalAtom / ContinuationAtom vocabulary, HeadIndex/FactIndex/UnifyIndex, magic sets, KaHyPar locality, and full memo/cache architecture were not found as an integrated implementation during that review.

Factor-Graph Belief Propagation (Background Reasoning) — paper / proposal / benchmark-only

The "PLN FactorGraph MORK v2" paper describes a message-passing implementation where:

  • Each PLN formula becomes a VariableAtom carrying an STV
  • Each inference rule instance becomes a FactorAtom with a local potential function \(\varphi_f : V^k \to V\)
  • FactorVarLinks connect factors to variables; MORK's PathMap indexes neighbor lookups in near-constant time
  • Variable→Factor messages aggregate incoming evidence via \(\oplus\)
  • Factor→Variable messages apply the rule's TV formula via \(\otimes\) and marginalize via existential quantification
  • Supports distributional truth values (matrix-multiply for deduction, matrix-invert for inversion)
  • Handles nested quantifiers via Skolemization with dedicated ExistsSTV and ForAllSTV routines

Implementation status: The MORK / PathMap substrate exists, and an adjacent Lean formalization of its semantics exists in the MORK MM2 PathMap Formalization draft. FactorGraph PLN over MORK itself remains paper / proposal / benchmark-only until a message-passing runtime is found or built. A direct review of the MORK Rust source found no FactorGraph implementation — zero matches for FactorGraph, MessagePass, or BeliefPropagation. The atom vocabulary above (VariableAtom, FactorAtom, FactorVarLinks) is disjoint from the actual implemented atom types in MORK and chaining. The product-quantale algebra (\(\oplus\), \(\otimes\)) is real at the Lean level per the MORK-PathMap formalization, but that formalization specifies substrate semantics, not a message-passing runtime. See the xiPLN draft §8 for the conceptual distinction between semantic factor graphs (world-model factorization) and operational factor graphs (inference control schedulers); the v2 paper's proposal is the latter and is not currently implemented.

When to Use Which (design-level intent)

Per the original 2025 design documents: backward chaining excels for goal-driven, latency-sensitive tasks (QA, dialogue, planning) involving localized portions of the knowledge base; factor-graph propagation excels for broad-based "background inference" that surfaces implicit knowledge across large AtomSpaces — running continuously in PRIMUS's ambient cognitive loop. Note: this is design-level intent. The factor-graph half is unrealized; MORK currently functions as a symbolic rewrite / forward-chaining substrate via (exec ...) programs (per the same source review), not as a belief-propagation runtime.

Status and Resources

Last verified: 2026-07-05

Two coexisting paradigms

  • Local-Rule PLN (production) — lib_pln.mettaonRunnable,Mettapedia/Logic/PLNJointEvidenceNoGo.lean PeTTa runs the pln0.9 rule surface under a confidence-priority forward-chaining queue. / current reference implementation but per the No-Go theorem (xiPLN §5; Lean-proven in ) formally known to be incomplete for arbitrary world models without joint correlation information.
  • World-Model PLN (Lean-formal) — the post-2024 line in the xiPLN and World-Model Calculus drafts. Treats inference as stateful posterior revision with evidence extraction; "fast PLN rules" become Σ-guarded compiled tactics whose soundness is discharged relative to a declared world-model class. Substantial Lean theorem spine; operational runtime closure is explicitly pending per xiPLN.tex §9 ("future work").

Current Status

  • Operational / verified in this pass: The currently verified implementation line is the trueagi-io/PLNlocal-rulePLN.Derive PLN implementation on PeTTa, including truth-value formulas, core inference rules, and the / PLN.Query task-queue entry points. This should not be read as coverage of the full PLN book rule set or the newer MORK/factor-graph proposals.
  • Adjacent / partially verified: DTL forward/backward chaining exists in chaining/, and a PeTTa-edition pattern miner exists in hyperon-miner. These are relevant to the PLN lineage, but this review did not verify them as integrated production components of the PLN runtime.
  • Design-stage / proposal / not found as integrated runtime: MORK-native PLN backward chaining, FactorGraph PLN belief propagation on MORK, PLN-ECAN attention-guided control, weakness/geodesic scheduling, and finalized PLN v1.0 milestone planning remain design-stage, historical, proposed, or unverified in this review.

Resource-bound defaults (lib_pln.metta, source reviewed 2026-07-06)

  • PLN.Config.MaxSteps: 100
  • PLN.Config.TaskQueueSize: 10
  • PLN.Config.BeliefQueueSize: 100
  • PriorityRank: confidence — highest-confidence tasks processed first

Recent developments (2026)

Inference control is currently paused (per Nil Geisweiller, 2026-04): the geodesic / attention-guided inference-control direction is blocked on first getting a scalable backward chainer working in MORK — forward and backward chaining need to run scalably in the same place before control can be layered on. To that end, a "backward-chaining-via-forward-chaining" effort (Nil Geisweiller / ngeiswei) inverts a theory via the blackbird combinator so a forward chainer emulates backward chaining; it has a draft paper (BackwardViaForward, intended for AITP) and code in trueagi-io/chaining.(PLN Reported overhead ~2× vs native backward chaining on PeTTa; an initial MORK port (mid-2026, after the MORK unification occurs-check fix) was far slower and remains provisional (the two implementations were found not to explore isomorphic search spaces). / MORKification Mattermost, 2026-04 → 06.)

Open Problems / Research Directions

  • Independence assumption mitigation at scale (dependency restructuring pass described in FactorGraph paper)
  • Temporal and procedural reasoning extensions (Geisweiller & Yusuf 2023)
  • Effective resource and attention allocation control via ECAN integration
  • Benchmarking infrastructure for comparing chaining vs. factor-graph modes
  • Quantale-based unification of PLN and NARS inference within shared Context Quantaloid

OSLF Foundations for Probabilistic PLN (piPLN) (research discussion)

Greg Meredith's OSLF (Observational/Spatial Logic Formulae) framework has been discussed as a possible category-theoretic route for deriving PLN probabilistic semantics. The "secret decoder ring" bridging OSLF to MeTTa evaluation is:

\[\llbracket (U : X) \rrbracket = \mathbf{for}\;(p \leftarrow \llbracket X \rrbracket \;\mathbf{where}\; \llbracket U \rrbracket)\;\mathbf{yield}\;\{p\}\]

where \(X\) is a sort in the computation theory and \(U\) is a filter on sorts looking for structural and behavioral characteristics. This interprets the Grothendieck construction concretely: collect all program witnesses \(p\) from the semantic space of \(X\) that satisfy filter \(U\). (leithaus, PLN Mattermost, Sep 2023)

Meredith identified three independent sources of fuzziness in OSLF that map to distinct probabilistic mechanisms in piPLN (PLN Mattermost, Nov 2023):

  1. Graph/Evolution: probability distribution over computational transitions → fuzzy modal operator ("how you evolve is nuanced")
  2. Yoneda/Representability: enriched Yoneda lemma where witnesses are probabilistically determined by morphisms → fuzzy identity ("you are kinda who you know")
  3. Poset/Collection: fuzzified membership in the lattice superimposed on Yoneda → graded set membership ("your membership in clubs is nuanced")

Each source can be independently fuzzified or kept crisp, yielding a family of logics ranging from classical to fully probabilistic. The enrichment uses Paige North's weighted (co-)limits machinery. This research direction remains active but pre-implementation.

Primary Sources

World-Model line (2026 working drafts — publication-card synthesis pending): xiPLN (Zar & Codex CLI); World-Model Calculus (Zar & Oruži); Wm Pln Book V3 (Zar & Oruži, March 2026); MORK MM2 PathMap Formalization (Zar & Oruži, March 2026); Markov-de Finetti Formalization (Mettapedia Project, April 2026); PLN Review (Zar & Oruži, March 2026).

Related literature:

Worked Examples in the PLN Repository

  • FlyingRaven— deduction chain: categorical reasoning about which birds can fly, with conflicting evidence (Sam the Raven vs. Pingu the Penguin).
  • Toothbrush— physical reasoning chain: plastic properties lead through reshaping and hardening to object removal.
  • Smokes— social network probabilistic reasoning: friends, smoking, and cancer (Tuffy Smokes benchmark).
  • Robot— task planning: PLN infers which objects to bring based on observed properties and derived classifications.
  • RavenInduction— inductive reasoning: two raven observations drive inference about color frequency.
  • DeductionRevision— evidence combination: two parallel deduction paths reach the same conclusion, then merge via Revision.
  • PLN repository wiki
  • pln-experimental— exploratory implementation with additional proof-of-concept examples.

Related cards: ECAN (attention-guided inference control), MORK (execution substrate), MOSES (rule evolution), MetaMo (goal prioritization), AtomSpace (knowledge substrate), PRIMUS (ambient cognitive loop)

PLN History →


it would be nice to have a high level explanation of what PLN is in the beginning.

 

 

Toothbrush reasoning and pln-experimental — exploratory implementation does not lead to any page

Anna.....2026-05-04 21:02:11 UTC

if we include things like this:

lib_pln.metta on PeTTa runs the pln0.9 rule surface (~14 rules, multiplicative-confidence pivot since Peter Isaev's commit 7ffce05)

we should have some automatic update, since commits usually happen pretty often

Anna.....2026-05-04 21:03:55 UTC