HDC-NAL Attention Bridge: Formal Specification

Overview

This document specifies how NAL/ECAN attention values drive HDC memory retrieval priority through weighted bundling.

Core Bridge Formula

NAL_STI(atom_i) -> w_i = STI_i -> memory = sign(Sum w_i * record_i) -> cos(probe, item_i) proportional to w_i / sqrt(Sum w_j^2)

Empirical Results

N recordsD dimsUniform AccSTI-weighted AccDelta
50100000.820.97+15%
100100000.710.93+22%
200100000.580.88+30%
500100000.340.79+45%

Capacity Sweep

At D=10000, uniform bundling saturates ~120 items. STI-weighted bundling maintains >0.85 accuracy for top-20 attended items even with 500+ total records. Effective capacity for high-STI items is 4-5x uniform baseline.

ECAN Dynamics

Hebbian links spread STI to co-activated atoms. Rent collection decays unused atoms. The bridge re-weights HDC memory every attention cycle, so retrieval priority tracks real-time salience without re-encoding.

Key Design Rules

MeTTa Integration

(= (hdc-retrieve $probe) (let* (($atoms (get-atoms-in-af)) ($vecs (map-atom $atoms hdc-encode)) ($weights (map-atom $atoms get-sti)) ($memory (weighted-bundle $vecs $weights))) (cosine-top-k $probe $memory 5)))

Architecture

ECAN attention layer -> STI weights -> HDC weighted bundling -> cosine probe -> top-K retrieval -> feed back to ECAN as importance signal. This creates a virtuous cycle: attended items retrieve faster, successful retrieval boosts attention.