Approved by Ursula Addison on 2026-05-14

Authors:

Contributors:

Editors:

Papers: Economic Attention Networks — Iklé, Pitt, Goertzel, Sellman (2009); Nonlinear Dynamical Attention — Iklé & Goertzel (2011); Guiding PLN with Attention Allocation — Harrigan et al. (2014); Goertzel (2025), Hyperon Whitepaper §5.3–5.4, §6.3

Status: Current. The ECAN model is operational in two implementations: C++ (legacy, attention repo) and MeTTa (metta-attention on PeTTa). The fluid-dynamic extensions (In-Fluid-Net, incompressible-fluid networks) described in the 2025 whitepaper are proposed.

This card provides technical depth beyond the concise ECAN index card. ECAN (Economic Attention Allocation Networks) is Hyperon's primary attention-allocation and resource-regulation subsystem. It determines which atoms in a potentially vast AtomSpace receive computational resources at any given moment — functioning as an internal economy that balances short-term responsiveness with long-term coherence.

Implementation note. None of the four subsystems that today touch ECAN-style attention — the C++ attention repo, metta-attention on PeTTa, the DAS Attention Broker, and OpenPsi's default action-selector — implements the 2009 paper's math literally. Each is an engineering approximation with its own simplifications. The cleanest historical bridge between attention and inference, a URE forward-chainer hook that consulted atom STI for source selection, was wired into the legacy C++ AtomSpace around 2016 and actively used through 2018; the C++→MeTTa migration left it behind. The subcards below trace this lineage in detail, including the OpenPsi action-selector path and Linas Vepstas's parallel Hyperon-era perception portfolio (which lives on the AtomSpace-Scheme branch rather than the MeTTa-runtime branch).

Related cards: PLN (inference control integration), MORK (Weighted Atom Sweeps), DAS (Attention Broker), MetaMo (motivational priorities), PRIMUS (ambient cognitive loop), Attention and Motivation (synthesis card)

On this page

Core Mechanisms and Foundations

Core Mechanisms

Two Importance Currencies. Every Atom carries two dynamically updated scalar values:

  • Short-Term Importance (STI): Captures immediate, context-dependent relevance. High-STI atoms are in the Attentional Focus — the working memory subset actively available for reasoning and learning.
  • Long-Term Importance (LTI): Reflects longer-horizon expected utility — how consistently an Atom has contributed to successful inference, learning, or goal-directed behavior over time.

Economic Dynamics. ECAN implements an attention economy with several interacting mechanisms:

  • Importance diffusion: STI spreads through Hebbian-weighted associative links. When two atoms are co-activated, their Hebbian link strengthens and future STI diffuses more readily between them. Three diffusion modes exist: Attentional Focus-only (AF, faster, narrower), Whole-AtomSpace (WA, broader, slower), and Fringe spreading (K-hop, see below).
  • Rent collection: Atoms in the Attentional Focus pay "rent" — their STI decays over time unless refreshed by ongoing relevance. This prevents working memory from growing unboundedly.
  • Forgetting: Atoms whose STI falls below threshold and whose LTI is low may be evicted from active processing, reclaiming resources.
  • Hebbian link creation/updating: Co-occurrence patterns between atoms generate and strengthen associative links, which in turn guide future attention flow.

Fringe Spreading (Third Diffusion Mode). The AF-only and WA diffusion modes have a known gap: atoms 2-3 hops from the Attentional Focus receive negligible STI even when they are highly relevant (e.g., question-answer ImplicationLinks connected to AF words only via intermediate nodes). Fringe spreading addresses this by diffusing STI K hops out from each AF atom (typically K=2 or K=3), analogous to a "fringe of consciousness." This is faster than WA diffusion but broader than AF-only. A design tension remains between fringe spreading and intra-AF attractor dynamics: variable-K spreading (Matt Iklé's proposal to replace AF-only entirely) risks slowing attractor formation by orders of magnitude. (mailing-list-backed: Fringe-of-consciousness-importance-spreading, 2016)

Directional Diffusion and Hebbian/Non-Hebbian Split. STI diffusion follows a tunable split: x% along HebbianLinks, (1-x)% along non-Hebbian links (e.g., InheritanceLinks, EvaluationLinks). Early implementation revealed that STI could get "stuck" on intermediate structures (e.g., ListLinks inside EvaluationLinks) because diffusion originally only flowed along ordered link targets, not back to source atoms. The fix required diffusion along both incoming and outgoing sets. For calibrating non-Hebbian weights, a three-step empirical methodology was proposed: (1) run Hebbian-only diffusion, (2) measure co-activation frequency for each (link-type, source-node-type, target-node-type) combination, (3) derive "virtual Hebbian weights" from the resulting statistics. (mailing-list-backed: Importance diffusion, 2014)

Mathematical / Formal Foundations

Information Geometry. The 2011 paper by Iklé and Goertzel formalizes ECAN using information geometry, casting attention allocation as movement on a statistical manifold where the distance metric reflects information-theoretic cost of attention reallocation.

Fluid-Dynamic Extension (Proposed). The 2025 whitepaper (§5.3–5.4) proposes extending ECAN with an incompressible fluid dynamics model where attention mass (STI values) becomes a conserved fluid density \(\rho(t,x)\) advected by a divergence-free velocity field \(u(t,x)\). Key proposed properties:

  • The velocity field is derived from an optimal control policy solving a Hamilton-Jacobi-Bellman (HJB) boundary-value problem
  • The incompressibility constraint \(\nabla \cdot u = 0\) enforces strict attention budget conservation
  • Pressure acts as a shadow price for attention congestion
  • Between ECAN's discrete economic updates, attention would evolve via the continuity equation with the HJB-derived velocity field, providing goal-aware routing that complements ECAN's diffusion

The continuity equation governing attention transport:

\[\frac{\partial \rho}{\partial t} + \nabla \cdot (\rho\, u) = 0\]
  • Variables: \(\rho(t,x)\) = attention density (STI mass) at position \(x\) and time \(t\); \(u(t,x)\) = velocity field derived from HJB optimal control
  • Assumptions: Incompressibility (\(\nabla \cdot u = 0\)) enforces strict conservation of total attention budget
  • Meaning: Attention mass is neither created nor destroyed — it flows through the knowledge graph along goal-optimal paths between ECAN's discrete economic steps
  • Source: Goertzel (2025), Hyperon Whitepaper §5.3–5.4

This fluid-dynamic layer would not replace ECAN's economic mechanisms but provide a continuous-time transport substrate between ECAN's discrete steps. The whitepaper notes this is particularly useful for credit assignment in multi-hop causal chains where traditional diffusion may lag.

System Interfaces and Implementation

System Interfaces

  • PLN: ECAN-guided PLN is a paper-architectural design (Harrigan et al. 2014) that has not been productionized as an executable inference-control runtime. Two narrow executable ECAN/STI hooks existed historically and were both deliberately decoupled by 2019: the URE forward-chainer STI source-selection hook (commit 0a0b09912 2016-03-09 wire-up by Misgana Bayetta; commit 0b744dbab 2018-10-23 unwired by Nil Geisweiller with the comment "An attentionbank is needed in order to get the STI..."; constructor argument removed in commit 5a5b7785d 2019-01-08), and the OpenPsi default action-selector STI path 2016-05 to 2016-11 (commit 8ab0e8f81 2016-05-10 added by Amen Belayneh; commit 9f2697859 2016-11-24 removed by Linas Vepstas; reintroduced as uncalled helper in commit e5bae708f 2017-11-08). Separately, the Loving AI Ghost dialogue runtime explicitly disables STI weighting via the supported Ghost API in commit 51a413e7 (2018-06-06 DevHEAD), then carried forward in the Scheme runner via commit 6ec13879 (2020-09-21 leungmanhin). Modern URE replaced its hook with internal complexity-penalty source weighting (no AttentionBank dependency). Current MeTTa-PLN has no attention-layer integration. See ECAN Full → Development and Historical Context for the full reconstructed nine-event lifecycle, including the OpenPsi action-selector path documented during the OpenPsi cluster pilot (2026-04-28).
  • MOSES: ECAN-weighted regions of AtomSpace define the fitness landscape for evolutionary search.
  • DAS: The Attention Broker in DAS implements ECAN's STI/LTI separation at the storage layer, mediating between attention allocation and physical atom placement across distributed backends.
  • MORK: On MORK, ECAN's importance values drive Weighted Atom Sweeps — aggregate weight counters in each trie node enable importance-proportional sampling without global scans.
  • MetaMo: Motivational priorities from MetaMo influence ECAN's attention distribution, directing STI toward goal-relevant atoms.
  • WILLIAM: Compression-driven importance signals from WILLIAM inform ECAN about which regions have the highest learning payoff.

Implementation Anchors

  • attention (legacy C++) — OpenCog ECAN agents: ImportanceDiffusion, RentCollection, HebbianLinkCreation/Updating, Forgetting. Requires AtomSpace, CogUtil, CogServer.
  • metta-attention (current MeTTa) — Declarative MeTTa port on PeTTa. Two-tier: attention-bank (storage/indexing) + attention agents (ECAN logic). Faithful continuation of the Classic C++ pragmatic variant — neither implementation reproduces the 2009 ECAN paper math literally (a strict-literal score of 0/4 across the four core formal mechanisms). The module named "stochastic-importance-diffusion" is inherited concept naming from the paper; the active implementation in both C++ and MeTTa is deterministic elapsed-time decay (STI × (1 − decay_rate)^averageElapsedTime), not the literal 0.5 × (1 + tanh(shape × (si − FocusBoundary))) stochastic focus-boundary probability. Hebbian learning, AF/WA rent, and AF/WA diffusion are real running agents under PeTTa's hyperpose superposition; performance and concurrency caveats apply (see Development and Historical Context).

Status and Resources

Last verified: 2026-05-13

Current Status

  • Operational: C++ ECAN agents (attentionrepo); MeTTa ECAN (metta-attentiononSTI,0.5stochastic PeTTa) with elapsed-time importance decay and Hebbian learning. The "stochastic-importance-diffusion" module name is inherited concept naming from the 2009 paper; the active implementation in both C++ and MeTTa is deterministic × (1 − decay_rate)^averageElapsedTime not the literal × (1 + tanh(...)) focus-boundary probability — confirmed by direct code inspection of both repos.
  • Under development: MORK-native importance embedding via Weighted Atom Sweeps; DAS Attention Broker integration; collapse→fold performance refactoring
  • Proposed: Incompressible-fluid-network attention dynamics (In-Fluid-Net); HJB-based optimal control for goal-aware attention routing; continuous-time transport between discrete ECAN steps

Open Problems / Research Directions

  • Scaling ECAN to very large AtomSpaces — balancing diffusion breadth against computational cost (fringe spreading as intermediate solution)
  • Integration of fluid-dynamic attention with MORK's ShardZipper for distributed attention state
  • Tuning the economic parameters (rent, wages, tax rates) adaptively rather than manually — virtual-Hebbian-weight calibration as one proposed methodology
  • Formal analysis of convergence and stability properties under the fluid extension
  • Resolving Hyperpose concurrency for attention diffusion — batch-parallel STI updates with bounded error tolerance
  • IIT Phi as evaluation metric for attention dynamics quality — unexplored since 2017
  • Re-establish executable PLN-attention coupling. The narrow URE STI source-selection hook from 2016–2018 was deliberately unwired in commit 0b744dbab when the URE rewrite did not preserve the AttentionBank dependency. Current MeTTa-PLN has no attention-layer integration; the 2014 Harrigan et al. paper-architectural design has not been productionized as an executable runtime. See ECAN Full → Development and Historical Context for the full timeline.
  • Decide which broader-OpenCog ECAN consumers to revive. Pre-2019 OpenCog had Ghost dialogue (STI-weighted action-selector at matcher.scm:117-130, 284; STI/AF reads/writes in matcher and schema procedures), NLP fuzzy matching (AF-only via bank->atom_is_in_AF), Python web API AttentionValue surfaces, and OpenPsi (action-selector seam plus an uncalled rule-sca-weight STI helper — an enabler rather than a default consumer) — all confirmed at the pre-removal monorepo snapshot during the ECAN cluster pilot. None were preserved as functioning ECAN integrations across the 2019 AttentionBank removal; none have documented MeTTa equivalents. Selecting which consumer integrations to rebuild is an open Hyperon-ecosystem decision.

Primary Sources

  • Economic Attention Networks — Iklé, Pitt, Goertzel, Sellman (2009). AGI-09.
  • Nonlinear Dynamical Attention — Iklé & Goertzel (2011). AGI-11.
  • Guiding PLN with Attention Allocation — Harrigan et al. (2014). AGI-14.
  • Goertzel, B. (2025). Hyperon for AGI⇒ASI Whitepaper, §5.3–5.4, §6.3.
  • Cluster-pilot extraction archive (2026-04-26): 4 source briefs + 16 findings/reconciliation files at scripts/archive/ecan_pilot/ in the wiki repository. Cross-model triangulation by Claude orchestrator + Codex + Gemini.

History and design lineage →



Discussion