Guiding PLN with Attention Allocation

Guiding Probabilistic Logical Inference with Nonlinear Dynamical Attention Allocation

Authors: Cosmo Harrigan, Ben Goertzel, Matthew Iklé, Amen Belayneh
Year: 2014
Venue: Proceedings of AGI-14, Springer

Summary

Describes how ECAN's nonlinear dynamical attention allocation can guide PLN inference, focusing computational resources on the most promising reasoning paths.

Relevance to Hyperon

Directly relevant to the PLN+ECAN integration in Hyperon's PRIMUS architecture — how attention guides reasoning.


Curated Excerpts (cluster-pilot extraction, 2026-04-26)

This paper proposed ECAN-guided PLN. ECAN cluster-pilot Source 3 (2026-04-26) audited the executable realization of the proposal across OpenCog Classic and Hyperon-MeTTa codebases. Cross-model triangulation: Claude orchestrator + Codex + Gemini.

Author cross-source identity (cluster Source 2 V0-3)

Lead author Cosmo Harrigan is also the original architect of the OpenCog ECAN diffusion subsystem. File-header Copyright attribution dates 2014–2016 across opencog/attention/ImportanceDiffusionBase.cc/.h, WAImportanceDiffusionAgent.cc/.h, opencog/attentionbank/bank/AttentionSCM.cc, and two HebbianCreation tests in the attentionrepo. The 2014 paper and the 2014–2016 diffusion-subsystem implementation come from the same person; the design and the code share authorship.

Co-author Amen Belayneh later authored the OpenPsi action-selector cleanup (commit e5bae708, 2017-11-09) that introduced an STI-weighting helper rule-sca-weight using cog-av-sti. Note that OpenPsi cluster pilot Source 1 (2026-04-27) verified this helper is uncalled in OpenPsi's default runtime path at b31c7e3 — the default selector is psi-get-satisfiable-rules; Ghost installed its own STI-weighted selector via OpenPsi's action-selector seam. OpenPsi was an ECAN-coupling enabler, not itself a default executable ECAN consumer.

Executable realization: narrow, brief, deliberately removed

The paper's proposal was realized only narrowly in OpenCog URE, and was then deliberately unwired:

  • 2016-03-09 — Misgana Bayetta wired the executable hook in commit 0a0b09912 ("Pass source selection mode to the constructor") in the URE forward chainer. The constructor accepted a source_selection_mode enum with three values: TV_FITNESS, STI, UNIFORM. The STI case used tournament_elem[s] = s->getSTI() for tournament selection of inference sources from the AtomSpace.
  • 2018-10-23 — Nil Geisweiller deliberately commented out the STI case in commit 0b744dbab ("Re-work source and rule selection in the forward chainer"). The verbatim removal-context comment in the diff:
    An attentionbank is needed in order to get the STI...
    The new SourceSet path did not preserve the AttentionBank dependency. The 2018 rewrite authors knew the AttentionBank coupling was required and chose not to wire the new path through it.
  • 2019-01-08 — Nil Geisweiller removed the source_selection_mode sm constructor argument entirely in commit 5a5b7785d. The enum value at ForwardChainer.h:42 persists as dead residue in current URE HEAD cec5509.

The hook was narrow: it read atom STI for forward-chainer source selection only. It was not a full ECAN agent integration; PLN reward signals were not coupled back to ECAN currency dynamics; the rest of the 2014 paper's vision (attention-guided rule selection, attention-modulated truth-value revision, ECAN-mediated forward/backward chaining cooperation) remained paper-only.

Additional executable-coupling events (OpenPsi cluster pilot Source 4, 2026-04-28)

The OpenPsi cluster pilot Source 4 (Hanson archaeology) reconstructed two further executable-coupling lifecycle events not surfaced by the ECAN cluster pilot. Together with the URE timeline above, the complete reconstructed history of executable ECAN/STI coupling at OpenCog Classic comprises 9 events between 2016-03 and 2020-09; all decoupling was completed by 2018-10 except for inheritance commits.

  • OpenPsi default action-selector STI path 2016-05 to 2016-11. Commit 8ab0e8f81 (2016-05-10 Amen Belayneh, "add importance into the utility function") introduced the helper most-important-weighted-atoms at opencog/openpsi/utilities.scm:78-90 with weight (* (tv-conf a-stv) (tv-mean a-stv) sti), and conditionally routed the default selector through it at action-selector.scm:121-127, 170-176 via a cog-af-boundary gate. The author comment on the conditional reads "Remove `most-weighted-atoms` version once ecan is integrated" -- the STI path was the intended default, the non-STI path the temporary fallback. Commit 9f2697859 (2016-11-24 Linas Vepstas, "General cleanup of the action selector") removed the cog-af-boundary conditional from both psi-default-action-selector and psi-default-action-selector-per-demand. Commit e5bae708f (2017-11-08 Amen Belayneh, "Cleanup openpsi action-selector functions") reintroduced rule-sca-weight as strength * confidence * STI -- but as a helper definition only, with no runtime caller. This is the state captured at the 2019 b31c7e3 snapshot referenced in the OpenPsi cross-source identity note above.
  • Loving AI Ghost runtime explicit STI-disable, 2018-06-06. Commit 51a413e7 (DevHEAD, "update run script to not use ECAN and feedback when rules are loaded") added (ghost-af-only #f) (ghost-set-sti-weight 0) to opencog/loving-ai-ghost/bin/run.sh via telnet to the production CogServer Scheme runner. Per the Ghost API documented in opencog/ghost/README.md:217-222, (ghost-set-sti-weight 0) uses a supported public control to remove STI from Ghost's rule-selector weight calculation; the documented default is non-zero. The Loving AI team actively evaluated ECAN's impact on dialogue and chose not to use it. The Scheme-runner inheritance landed in commit 6ec13879 (2020-09-21 leungmanhin, in leungmanhin/loving-ai-ghost at bin/run.scm:4). Loving AI Ghost continues to use OpenPsi's action-selector seam via (psi-set-action-selector! ghost-component ...) -- it decouples from ECAN/STI, not from OpenPsi entirely.

The Hanson dialogue runtime stack (ros-behavior-scripting + Loving AI Ghost) is best characterized as a runtime/application branch over Classic OpenPsi, not a separate mathematical tradition. It executed OpenPsi rules as the behavior-loop authority but did not pursue paper-equation faithfulness, hardcoded demand satisfactions (e.g., face-demand-satisfied (stv 1 1) in ros-behavior-scripting/src/psi-behavior.scm), and used the supported Ghost STI API to deliberately disable ECAN/STI in production. Methodology lesson surfaced by the same Source 4: caller-analysis must be time-indexed -- the same function can have callers at one snapshot and not at another. See scripts/archive/openpsi_pilot/source4_hanson_archaeology/findings_reconciled_crossmodel.txt for V4-1 detail.

What URE built instead

URE invested in a separate Bayesian / control-rule inference-control architecture, decoupled from AttentionBank. Cluster Source 3 verified the mature C++ stack at HEAD cec5509:

  • MixtureModel.cc/.h — Universal-Operator-Induction-style aggregation; per-rule beta-distribution likelihood × complexity prior exp(-cpx_penalty × length)
  • ThompsonSampling.cc/.h — Bayesian rule selection via per-candidate beta-PDF × product of others' beta-CDFs
  • BetaDistribution.cc/.h — alpha/beta from TV strength × confidence; boost::math::ibeta_inv sampling
  • ActionSelection.cc/.h — Handle-to-TV action maps wrapped around Thompson sampling
  • backwardchainer/BIT.h/.cc — Backward Inference Tree machinery; BITNode::operator() probability-of-usefulness; AndBIT::expand / AndBIT::select_leaf
  • backwardchainer/ControlPolicy.cc/.h — backward-chaining control-rule selection using MixtureModel + ActionSelection

Modern URE forward-chainer source weighting at SourceSet.cc:38-54, 217 uses strength × confidence × exp2(-complexity_penalty × complexity) — a TV-fitness × base-2 complexity factor, no AttentionBank dependency. Legacy C++ PLN at singnet/pln(HEADa0983ada8 2021-10-28) is a URE-dependent rulebase; pln-set-attention-allocation in modern PLN is a thin wrapper around URE's already-dead URE:attention-allocation hook.

The Harrigan et al. 2014 vision in 2026 Hyperon

Modern MeTTa PLN (trueagi-io/PLN's lib_pln.metta) has no attention-layer integration. The 2014 paper's executable PLN+ECAN integration vision has not been productionized in the current Hyperon ecosystem. The MeTTa successor of URE's inference-control stack, chaining/, preserves only ~5 of 16 URE control features (PLN cluster Source 7 finding, supported by the Source 3 C++ ground-truth inventory).

Re-establishing executable PLN-attention coupling is an open problem. See ECAN Full → Development and Historical Context and the cluster-pilot reconciliation files at scripts/archive/ecan_pilot/source3_legacy_ure_pln/findings_reconciled_crossmodel.txt in the wiki repository.