Move the mouse to steer the attentional spotlight. Green ring = 4-slot working memory. Green penumbra = DoG inhibitory surround. Purple veins = NMDA coincidence LTP (CaMKII memory substrate). Orange = vortex core. HGS panel below = three-tier executive controller.
This interactive simulation represents a synthesis of over a century of attention research, integrating foundational observations from classical introspective psychology with contemporary computational neuroscience. Rather than presenting a static diagram, this framework provides a dynamic, mechanistic simulation of human selective attention, capturing its phenomenology by mapping underlying neural dynamics onto a biomimetic resource-management model. It replaces traditional, fragmented metaphors with a unified computational architecture that treats attention as an emergent property of competing network states and adaptive control.
The current model provides a unified computational architecture that integrates several key neuroscientific frameworks. The core structure is based on the Three-Network Model (Fox et al., 2005), utilizing the "Wandering Mode" for the Default Mode Network (DMN) (Raichle et al., 2001), "Task-Focused" modes for the Task-Positive Network (TPN) (Corbetta & Shulman, 2002), and an "attentional arbitrator" for the Salience Network (SN) (Seeley et al., 2007). This network interaction is governed by Expected Value of Control (EVC) Theory (Shenhav et al., 2013), which replaces traditional willpower metaphors with a stamina-based opportunity cost framework (Kurzban et al., 2013). The simulation also incorporates Load Theory (Lavie et al., 2004), which triggers gating failure and impaired filtering when stamina drops below critical levels. Within this landscape, Biased Competition Theory (Desimone & Duncan, 1995) and Normalization principles (Reynolds & Heeger, 2009) drive the interaction between focus and distraction through inhibitory surrounds and gain control. An underlying Saliency-Map (Itti et al., 1998) guides attention toward consolidated patterns. Finally, the system incorporates a 4-slot buffer and a selection history grid to reflect Feature Integration Theory (Treisman & Gelade, 1980) and capacity limits, alongside Theory of Visual Attention (TVA) logic (Bundesen, 1990) to model the stochastic, probabilistic nature of conscious encoding.
The simulation is built as a two-layer model of attention. The visible frontend, proj2_v47, is a macro-scale simulation that renders attention as a dynamic landscape of focus, distraction, salience capture, working-memory gating, and long-term consolidation. Beneath it sits neuron_21_6, a bottom-up biophysical simulator of 32 coupled neurons whose dynamics include Ca²⁺ signaling, Izhikevich spiking, short-term synaptic plasticity, NMDA-gated long-term potentiation, and regenerative fire-diffuse-fire propagation. The aim is to let these two levels complement one another: the frontend makes the phenomenology of attention visible and interactive, while the backend supplies a candidate physiological substrate for how those dynamics could emerge.
At the top layer, selective attention is treated not as a static spotlight metaphor but as an emergent process arising from competing network states, limited control capacity, salience-driven interruption, and adaptive learning over time. The model draws together ideas spanning more than a century of attention research, beginning with William James's description of focus and fringe, and extending through contemporary accounts of biased competition, hierarchical control, reinforcement, and synaptic plasticity. What the user sees on screen is therefore not a decorative animation but a running systems-level hypothesis: attention is modeled as the moment-to-moment outcome of interacting control, memory, salience, and learning processes.
One motivation for the project is to bridge explanatory levels that are often kept separate. Cognitive and systems-level models can describe large-scale attentional states well, but they often abstract away the cellular and synaptic mechanisms that might support them. Biophysical simulators, by contrast, can capture spikes, calcium transients, vesicle dynamics, and receptor kinetics in detail, yet usually stop short of connecting those mechanisms to recognizable cognitive phenomena. This framework attempts to sit between those traditions by making a psychologically meaningful process interactive at the top level while constraining it with mechanistic rules at the bottom level. Few existing platforms (such as NeuroGPU or GeNN) approaches simulation from this direction: asking not just "what does the mechanism produce?" but "what does the attentional process feel like, and can that phenomenology be grounded in membraine voltage and subcellular kinetics?"
Conceptually, the frontend integrates the Three-Network Model of large-scale cognition: wandering behavior corresponds to the Default Mode Network, task-focused control corresponds to the Task-Positive Network, and salient interruptions correspond to the Salience Network. These interactions are regulated by an Expected Value of Control account, in which cognitive stamina represents the current willingness to sustain effortful control rather than a literal fuel tank. Biased Competition and gain-control principles shape the Difference-of-Gaussians inhibitory surround, while the Hierarchical Goal System provides a three-tier controller that determines what the system is trying to do, which region of space it should prioritize, and where the spotlight should bias next. The neuron_21_6 backend grounds these higher-level dynamics in coupled Izhikevich neurons, Tsodyks-Markram short-term plasticity, NMDA coincidence detection, and Ca²⁺-dependent propagating activity, giving the model both phenomenological legibility and mechanistic depth.
Heatmap engine rewrite is the most consequential engineering change. v36 used a fragile Web Worker with ArrayBuffer ownership transfer that caused silent freezes when timing drifted. v47 replaces this with a synchronous heatDecayStep() running on the main thread plus an offscreen canvas blit that composites the heatmap directly under the particle layer. The result is a heatmap that is always visible, always current, and never frozen.
Hierarchical Goal System (HGS) v9.0 is the most consequential conceptual addition. v47 adds a three-tier controller sitting above the particle field: abstract goals (minute timescale) set the global ? envelope and density bias; quadrant-level executive gating (second timescale) applies spatially targeted SNR boosts; and a frame-level policy layer decides where the spotlight biases next. There is no comparable top-down control layer in v36 — in v36 the spotlight wanders or follows the mouse, but there is no "why" behind where it goes at the macro scale.
Global neuromodulatory gain control (ACh/DA dial) is new in v47. A continuous neuromod parameter changes gain, focus sharpness, decay behaviour, LTP accumulation rate, and state labeling simultaneously across the entire field. v36 uses stamina and mode toggles without a comparable global gain dial. The neuromod maps directly onto the ? scaling in the neuron_21_6 AttentionalStateMapper.
Izhikevich-inspired per-cell dynamics are a major jump from v36's heatmap-plus-particles abstraction. v47 adds per-cell membrane/recovery state arrays (izh_v, izh_u) plus five firing-type presets (RS, FS, IB, CH, LTS), each with distinct spike timing, gain modulation, and STP interaction. These presets match the neuron_21_6 IZH_PRESETS table exactly.
Short-term synaptic plasticity (STP) in v47 tracks Tsodyks-Markram resource/utilisation variables (R·u) and surfaces them in the UI (stpStat), producing depression/facilitation dynamics that gate all heat deposits. STP is completely absent from v36.
NMDA coincidence-based LTP replaces v36's simple threshold check. v47 uses a dedicated nmdaLastSpike array with 8-connected neighbourhood scanning, an exponential coincidence window, Mg²⁺ block computed from the Vm proxy, CaMKII bistable autophosphorylation, and neuromodulated LTP increments. LTP veins are now a genuine long-term memory substrate that persists after heat has cooled — not merely a "fading ink" map.
BCM metaplasticity and Difference-of-Gaussians spotlight deposition are both new. The DoG Mexican Hat creates sharp attentional peaks by pairing excitatory centre deposits with inhibitory surround drainage. The BCM sliding threshold prevents vortex runaway by triggering LTD when a cell is chronically overactive. Both are absent from v36.
Executive and heat visualisation overhaul: v47 adds quadrant overlays for HGS, LTP-vein network lines, DoG inhibitory penumbra rings, a green working-memory halo, ?/vortex-phase metrics, IZH-type readouts, and BCM/STP stat repurposing. The display is significantly more explanatory than v36's vortex/spark feedback system.
Taken together: v47 stops being just a self-organising attentional landscape and becomes a multi-scale control system — macro goals shape mesoscale spatial gating, which biases microscale spiking/plasticity and spotlight movement. HGS, neuromodulation, and the Izhikevich/STP/NMDA layer are the most consequential theoretical changes. The synchronous offscreen heatmap rewrite is the most consequential engineering change.
This simulation serves multiple educational and investigative functions:
Spotlight and penumbra. The glowing disc that follows your mouse is the attentional spotlight. Its warm yellow-white centre is the focus zone — only thought streams entering here are encoded into working memory. Surrounding it is a faint amber fringe (partial activation, lower velocity boost). Outside the fringe is the DoG inhibitory penumbra, rendered as a transparent green annulus: this is the Mexican Hat surround where the spotlight simultaneously drains heat from competing regions. The dashed outer ring marks the full extent of the inhibitory field.
Particles (thought streams). Each flowing line is a thought stream traversing a hidden random geometric network of 80–120 nodes. Colour encodes proximity to the spotlight: cool blue-green = peripheral/unattended; yellow-gold = fringe awareness; bright gold = fully attended (working memory capture). Trail length encodes recency (80+ historical positions). Streams entering vortex-gravity zones shift toward orange.
Heatmap. The colour field under the particles is the traversal intensity map. Cold = navy/transparent; warming = blue → cyan → green → yellow → orange (vortex peak) → orange (vortex peak).ellow ? amber ? orange (vortex core). Orange is the maximum; there is no white-hot — the peak is saturated orange. Purple veins drawn over the heat field are LTP structural traces: they persist even after transient heat has cooled, marking paths the spotlight has consolidated through repeated coincident firing. The legend strip below the canvas shows the full ramp.
Working memory ring. The four green arc segments orbiting the spotlight represent the 4-slot working memory buffer (Cowan 2001). Bright green = slot recently loaded; fading green = decaying; faint outline = empty slot. Items are captured stochastically (~12%/frame) from streams entering the focus zone.
HGS panel. The three-tier bar below the canvas shows the Hierarchical Goal System in real time. The blue bar is the current Abstract Goal and its time-to-transition; the green bar is the active Subgoal/quadrant assignment; the amber bar is the Immediate Policy. Each bar fills as the tier approaches its next transition.
Stats panel (top-right). Key readouts: Max Heat — peak heatmap intensity; Vortex Count — cells above vortex threshold; ω Vorticity — mean angular velocity in the (v, dv/dt) phase plane (non-zero = rotational/vortex dynamics); BCM-LTD — cells currently in LTD regime (below their sliding BCM threshold); STP R·u — mean short-term plasticity efficacy; IZH Type — current Izhikevich firing preset; DA/ACh Gain — neuromod value; Cognitive Stamina — the opportunity-cost bar that drives gating failure.
Neuromod slider. The ACh/DA Gain (?) slider at the top maps onto the neuron_21_6 AttentionalStateMapper.stamina_to_gamma() scale. Far left = drowsy/ACh-dominant (diffuse, slow decay, low SNR); far right = alert/DA-dominant (sharp focus, fast non-vortex decay, high gain). The label changes: ACh-Dominant ? Balanced ? DA-Dominant.
Mode buttons. Wandering = DMN state; Task-Focused = TPN state (spotlight fixates then makes controlled saccades); Long-Term Memory = 20× speed compression for vortex formation over extended timescales; MIA = mindful awareness training (reduces salience capture probability by 18–25%); IZH = cycle through RS/FS/IB/CH/LTS firing presets.
The visualization represents cognitive activity as flowing "thought streams" — trajectories of neural activationaversing a complex network topology. This design principle reflects contemporary understanding of brain function as fundamentally characterized by parallel distributed processing across multiple, simultaneous neural pathways (Rumelhart & McClelland, 1986).
Mechanistic Implementation: Each particle (thought stream) navigates through a hidden lattice of interconnected nodes, modeling the brain's hierarchical and recurrent connectivity patterns. The vast majority of these streams remain dim and operate at baseline velocity, representing the enormous computational capacity of preconscious and unconscious processing — the continuous, parallel operations occurring below the threshold of awareness (Baars, 1988; Dehaene & Naccache, 2001).
Visual Representation: Thought streams are rendered with elongated trails (80+ historical positions) that create smooth, flowing lines through the neural network using quadratic Bézier curves. These trails change color dynamically based on their relationship to the attention spotlight — transforming from cool blues (peripheral/unattended) through greens and yellows (fringe awareness) to bright golds (fully attended) when captured in the focus zone.
The central spotlight mechanism implements James's distinction between the focus of attention (the "fovea") and the fringe of consciousness (the "penumbra"). This two-tier architecture captures the graduated nature of awareness and the concept of partial activation in memory and attention systems (James, 1890).
Neural Correlates:
Version 7.1 introduces a simplified and optimized 4-slot working memory architecture that more accurately reflects the fundamental capacity constraints of human cognition. This refined model aligns with the convergent evidence from multiple research paradigms demonstrating that working memory operates with approximately 4±1 discrete chunks of information (Cowan, 2001; Luck & Vogel, 1997).
The Magic Number Four: The reduction from 8 to 4 slots represents a return to the core findings of capacity limitation research. While Miller's (1956) "magical number seven" described span tasks involving sequential recall, modern research using change detection paradigms and continuous resource models consistently points to a more fundamental limit of approximately 4 items for simultaneous maintenance (Cowan, 2010).
Visual Implementation: The 4 working memory slots are displayed as:
The simulation implements the three major large-scale brain networks identified by Fox et al. (2005) and Seeley et al. (2007). The Default Mode Network (Wandering mode) is active during internal mentation and mind-wandering: the spotlight wanders stochastically, attracted to heat gradients and salient events, with minimal stamina drain. The Task-Positive Network (Task-Focused and voluntary mouse control) engages top-down executive gating: streams outside the spotlight are suppressed (dimmed, decelerated up to 80%) while the spotlight executes planned saccades. The Salience Network operates continuously: unpredictable pulsating events (orange = threat; cyan = reward) exert bottom-up capture forces proportional to proximity, stamina level, and mode state. The capture radius widens by 50% during gating failure, implementing Load Theory (Lavie et al., 2004).
The spotlight implements a three-zone radial architecture. The focus zone (radius ∼ 35px) applies maximum facilitation — velocity ×4, full luminosityosity, working memory eligibility. The fringe (focus ? fringe radius ∼ 85px) provides graded partial facilitation, implementing James's "fringe of consciousness." The DoG inhibitory surround (fringe ? fringe × 1.45) actively drains heat from surrounding cells via the Mexican Hat kernel, implementing Biased Competition Theory (Desimone & Duncan 1995) and preventing heat bleed across the field. The penumbra is visualised as the transparent green annulus.
A 4-slot ring buffer implements Cowan's (2001) capacity limit for the focus of attention. Each slot holds a captured thought stream with a life value in [0,1] that decays every frame. Items are stochastically captured (~12%/frame) when a stream enters the focus zone; the oldest slot is overwritten when the buffer is full. The 4 green ring segments around the spotlight visualise current slot occupancy and decay state. Only items in the buffer are consolidated into longer-term LTP traces.
A spatial grid tracks the history of all spotlight positions. Thought streams passing through previously attended regions experience a subtle attractive bias (strength 0.2) proportional to the local selection history value, which decays at 0.995/frame. This creates attentional attractors that implement selection-history effects (Awh, Belopolsky & Theeuwes 2012) and models automatic return to previously rewarding locations without invoking explicit inhibition of return.
Cognitive Stamina implements Expected Value of Control theory (Shenhav et al., 2013). It is not a "fuel tank" — it is a continuous cost-benefit computation. Voluntary mouse control and task mode drain stamina; wandering mode allows regeneration. When stamina drops below 30%, gating failure activates: particle turbulence increases, the spotlight's inhibitory gate halves, and salient event capture probability nearly doubles. This implements Load Theory (Lavie et al., 2004). High-stamina states correspond to high neuromod (DA-dominant); low-stamina states map to ACh-dominant, drowsy dynamics.
The learning system in proj2_v58 is best understood as a multi-timescale attentional plasticity model. At the fastest timescale, thought streams and the spotlight deposit transient heat into the field; at intermediate timescales, repeated local coincidence builds LTP-like traces; at slower timescales, BCM and homeostatic regulation prevent runaway amplification. The result is a field that can express both short-lived activation and longer-lived attentional habits without claiming that the 2D canvas is a representation of groups of synapses or dendritic trees.
This distinction matters. The visible heatmap is a spatial computational abstraction: it shows where processing has been concentrated, how long it lingers, and which regions have become easier to re-enter. The model is therefore functionally inspired by Hebbian and synaptic-plasticity principles, but it should be read as a mesoscale learning surface rather than a direct simulation of microscopic synaptic biochemistry.
Every frame, the system updates a traversal-intensity field. Thought streams deposit small amounts of heat as they move through the hidden graph, while the attentional spotlight deposits much stronger input through a Difference-of-Gaussians kernel whose centre excites and whose surround suppresses competing regions. This makes the heatmap a running record of recent attentional allocation rather than a static background texture.
On its own, heat is transient. If activity is not revisited, it decays; if a region is revisited repeatedly, it becomes easier for that region to remain active and to recruit the spotlight again. Functionally, this is the model's account of how repeated attention becomes path-dependent: the system becomes biased toward what it has already processed often.
When local heat rises past the vortex threshold, that region becomes an attentional vortex: a stable attractor in the field. Vortexes decay more slowly, exert gradient-based pull on nearby thought streams, and in wandering mode can bias the spotlight itself toward already consolidated regions. In cognitive terms, they represent patterns that have become disproportionately easy to reactivate.
This is the model's computational account of attentional habit formation. A vortex can represent something adaptive, such as practiced expertise or efficient task focus, or something maladaptive, such as rumination, threat bias, or addiction-related hypersalience. The spatial metaphor makes this competition visible: not all patterns survive equally, and the most reinforced ones begin to dominate access to limited processing resources.
Heat alone does not create long-term structure. The longer-lived traces in the field are the purple LTP veins, which are updated by a coincidence rule rather than by simple repeated occupancy. Each cell stores a recent spike timestamp (nmdaLastSpike), and when a post-synaptic event occurs in the presence of recent neighbouring activity, the model computes an NMDA-style coincidence increment modulated by Mg2+ unblock and neuromodulatory gain. This replaces the older threshold-only rule with a more explicitly timing-dependent consolidation mechanism.
Once LTP crosses the model's CaMKII-like bistability threshold, it becomes partially self-sustaining and can persist after transient heat has cooled. This is why the heatmap and the vein map are not identical: heat reflects current or recent activation, while LTP veins reflect a slower consolidation signal that marks paths repeatedly reinforced by coordinated activity. In that sense, the frontend distinguishes activation from memory bias.
All incoming deposits are filtered by Tsodyks-Markram-style short-term plasticity. Each cell tracks a resource variable R and a utilisation variable u; repeated activation temporarily raises utilisation but depletes available resources, so effective deposit strength depends on the current R·u state. This adds a fast fatigue-and-recovery layer to the field.
Functionally, STP prevents every burst of activity from reinforcing itself without cost. Repeated rapid activation becomes less effective until the local resources recover, which gives the model a built-in habituation mechanism and makes attentional persistence depend on both immediate momentum and short-term depletion. The mean R·u value shown in the stats panel is therefore a live summary of how permissive the field currently is to further reinforcement.
The model includes two slower stabilizers that keep learning from collapsing into permanent runaway capture. First, a BCM-style sliding threshold tracks recent activity and determines when local conditions favour potentiation versus depression. Cells that are chronically overactive or insufficiently active relative to their threshold can enter LTD-like regimes, reducing accumulated LTP and limiting pathological self-amplification.
Second, a separate homeostatic gain term slowly rescales deposit efficiency toward a target activity level. Chronically hot cells become less sensitive; chronically cold cells become more sensitive. BCM therefore shapes the local plasticity boundary, while homeostasis provides a broader background normalization that keeps the entire field usable over long runs.
Taken together, the learning dynamics implement a layered story: transient traversal produces heat, repeated coordinated activity builds LTP veins, and stabilized hot regions become vortexes that bias future processing. STP sets the short-term availability of reinforcement, BCM sets a local modification threshold, and homeostasis keeps the system from locking irreversibly into one state. The result is not a literal synapse-by-synapse cortical model, but a structured computational account of how attention can become self-reinforcing over time.
This framework is useful because it makes otherwise invisible dynamics legible. It shows why sustained practice is required to reshape attentional habits, why old patterns remain competitive even after momentary disengagement, and why maladaptive patterns can become self-stabilizing unless countered by regulation, recovery, or top-down control. In that sense, the learning system is less a picture of tissue than a visible hypothesis about how repeated selection becomes persistent bias.
Early theories of executive control posited a depletable "willpower" resource, often linked to glucose metabolism (Baumeister et al., 1998; Gailliot et al., 2007). However, this "ego depletion" model has faced significant replication challenges and theoretical criticisms (Hagger et al., 2016).
Contemporary frameworks instead emphasize opportunity costs and motivational factors (Inzlicht & Schmeichel, 2012; Kurzban et al., 2013). The core insight: cognitive control is not limited by a fixed resource pool, but by the brain's cost-benefit analysis of sustained effort. Mental fatigue signals that continued engagement has diminishing returns relative to alternative activities (rest, exploration, mind-wandering).
Expected Value of Control Theory: Shenhav, Botvinick, and Cohen (2013) formalize this as the Expected Value of Control (EVC) — the anticipated reward for sustained control effort minus the opportunity cost of foregone alternatives. The anterior cingulate cortex computes this EVC dynamically, adjusting control intensity based on task difficulty, reward magnitude, and internal state.
In the Model: The Cognitive Control Effort Potential meter implements this principle as a dynamical variable representing the current willingness to sustain effortful control based on ongoing cost-benefit assessment, not a finite resource that's "used up." Specifically:
Why This Framework Works Better: The opportunity cost framework explains several phenomena the resource depletion model struggles with:
This reconceptualization shifts the design philosophy: Control Effort Potential is not a "fuel tank" but a continuous cost-benefit computation that guides attentional allocation strategy. The meter reflects the current balance between the perceived value of sustained control and its opportunity costs. Users can influence this computation through environmental design (increasing task rewards), skill training (reducing control costs via automaticity and efficiency), and metacognitive awareness (recognizing when sustained effort has diminishing returns and strategic disengagement is adaptive).
Tier 1 — Abstract Goal (~minutes): Sets the global γ envelope and particle density bias for the entire field. Transitions every ~1800 frames. Goals include Sustained Focus (high ?, low density bias), Broad Exploration (low ?, high density), Memory Consolidation (medium ?, reinforces LTP pathways), and Suppression (high ?, low density). This tier answers "what is the system trying to accomplish at the minute scale?" and corresponds to PFC top-down goal representations (Miller & Cohen 2001).
Tier 2 — Subgoal / Executive Gating (~seconds): The core innovation absent from v36. The field is subdivided into four quadrants (TL, TR, BL, BR) and spatially targeted ? modulation is applied: the active quadrant receives +40% ? boost while the other three receive -20% suppression. This implements spatially selective SNR control — analogous to dlPFC?posterior parietal projections (Corbetta & Shulman 2002) — making the "spotlight analogue" a genuine spatial gating mechanism rather than a uniform field adjustment. Transitions every ~240 frames, cycling through quadrants. The active quadrant is shown with a dashed border overlay on the canvas.
Tier 3 — Immediate Policy (~ms): The fastest tier answers "where exactly should I look right now?" It biases the spotlight wander toward high-LTP cells in the active quadrant ("LTP Vein Tracking"), implements inhibition of return from recently visited cells, or seeks novelty in low-heat regions. This tier operates every frame and produces the subtle directional bias visible in the spotlight's autonomous movement during wandering mode.
The active IZH firing type modulates the global γ via a type-specific multiplier: RS (baseline, ×1.0), FS (fast-spiking interneuron, ×0.75 — tight lateral inhibition), IB (intrinsic bursting, ×1.15 — cluster vortex vortex formation), CH (chattering, ×1.25 — rapid oscillatory traversal), LTS (low-threshold spiking, ×0.90 — thalamic relay dynamics). These multipliers compound with the neuromod-scaled ?, creating qualitatively different attentional dynamics across the 5×5 space of (IZH type, neuromod level). The NMDA coincidence window and LTP rate are also scaled by neuromod, so high-DA + CH type produces the most aggressive LTP consolidation.
This simulation organizes attention around three interacting large-scale systems: the Default Mode Network (DMN), the Task-Positive Network (TPN), and the Salience Network (SN). Together, they provide a compact computational account of how attention alternates between internally generated thought, goal-directed control, and stimulus-driven interruption (Raichle et al., 2001; Buckner et al., 2008; Fox et al., 2005; Seeley et al., 2007; Menon & Uddin, 2010).
The Default Mode Network (DMN) includes regions such as medial prefrontal cortex, posterior cingulate cortex, and angular gyrus, and is most strongly associated with internally oriented cognition: autobiographical memory, future simulation, semantic association, and mind-wandering (Raichle et al., 2001; Buckner et al., 2008). In the model, this corresponds to Wandering Mode, where the spotlight moves in a passive, exploratory way, shifting periodically between points of interest and drifting toward established vortexes. Unattended thought streams remain bright and mobile, representing the relatively open, unconstrained character of resting cognition. Although the DMN is metabolically active, it is modeled here as a low-control-cost state: when the spotlight is not under active mouse or task control, Control Effort Potential drains minimally and can recover.
The Task-Positive Network (TPN), also referred to as the dorsal attention network, includes dorsolateral prefrontal cortex, frontal eye fields, and intraparietal sulcus, and is associated with externally directed, goal-focused cognition (Fox et al., 2005). Its core functions are voluntary attention, distractor suppression, and top-down biasing of processing toward task-relevant information. In the model, TPN activation appears in two forms: Voluntary Control, where the spotlight follows the mouse continuously, and Task Mode, where it fixates for 120 frames and then makes controlled shifts within a 100-250px radius. In both cases, the inhibitory surround is engaged: unattended streams are dimmed and slowed by up to 80%, making the resource trade-off of focused attention visible (Desimone & Duncan, 1995). This sustained control also continuously drains Control Effort Potential, reflecting the mounting opportunity cost of executive effort.
The Salience Network (SN), centered on the anterior insula and dorsal anterior cingulate cortex, acts as an attentional switchboard that monitors the environment and internal state for behaviorally significant events, then interrupts and reallocates resources when needed (Seeley et al., 2007; Menon & Uddin, 2010). In the simulation, salient events appear as bright pulsating rings: orange for threats and cyan for rewards. These events compete for the spotlight using a capture rule shaped by distance, current control state, fatigue, gating failure, and MIA training. Threats have a 10% larger capture radius, task mode provides a 10% protection effect, gating failure cuts control effectiveness by 50%, and MIA reduces capture probability by roughly 18-25%. When capture occurs, the spotlight is pulled immediately, the screen flashes briefly by valence, and Control Effort Potential is adjusted: threats drain 5 while rewards restore 2.
This three-network model is governed by a motivational control variable rather than a simple depletion meter. Older theories treated willpower as a consumable resource, but Expected Value of Control (EVC) theory frames mental fatigue as a cost-benefit computation: sustained control is maintained only while its expected value exceeds its opportunity cost (Shenhav et al., 2013). In the simulation, Control Effort Potential therefore represents the current willingness to continue effortful control, not a literal fuel tank.
+2, not because a depleted resource is being refilled, but because task value is transiently increased.Put differently, the DMN, TPN, and SN are not just three descriptive modes; they are coordinated by an economic control logic. Wandering restores willingness, focused control spends it, and salience events can override either state when the environment becomes sufficiently important. This makes the model a dynamic negotiation between internal mentation, goal pursuit, and interruption rather than a static spotlight metaphor.
The attentional landscape uses a high-resolution finite-element simulation implementing a traversal intensity map: the more a region of the field is traversed by thought streams, the hotter and more visually intense it becomes, and the easier future traversal of that path becomes. This directly embodies Hebb's (1949) learning principle at the spatial level. Rendering layers include:
Thought streams navigate through a hidden connectivity graph generated using:
The auditory feedback layer provides multimodal reinforcement of system dynamics using Tone.js:
Synchronous heat decay. The Web Worker used in v36 transferred heatmap.data.buffer and heatmap.ltp.buffer to a worker via postMessage with transferable ownership. The moment postMessage fired, the main-thread typed arrays became detached — any read/write was a silent no-op. If the worker lagged by even one frame, workerBusy stayed true and the heatmap stopped updating entirely. v47 replaces the worker with heatDecayStep(), a synchronous ~1-2ms function running directly in the RAF loop. No ownership transfer, no timing race, no silent detach.
Offscreen blit. The heatmap pixel buffer is written to an offscreen HTMLCanvasElement via ctxH.putImageData(), then composited onto the main canvas with ctx.drawImage(heatOffscreen, 0, 0, W, H) at globalAlpha: 0.88. This happens before particles are drawn each frame, so heat correctly appears under the particle layer. The main canvas uses alpha: false (white background) and the heatmap offscreen uses alpha: true (transparent cold cells), so transparent areas correctly reveal the white background.
Izhikevich per-cell state. Each heatmap cell (grid cell of size ~10px) maintains its own (v, u) pair initialised to (V_rest, b·V_rest) = (-65, -13). Each frame, the Izhikevich quadratic ODE is integrated with Euler (stable at dt = 1 frame = ~16ms for the chosen parameter ranges). When v = IZH_SPIKE_THRESH (20 mV proxy), the cell is flagged as spiked: it writes its frame number to nmdaLastSpike, triggers its STP spike update, and becomes eligible for post-synaptic coincidence with its 8 neighbours.
Phase vortex metrics. The ω (vorticity) stat is the angular velocity in the phase plane (v, dv/dt): ω = df/dt where f = arctan2(dv/dt, v - V_rest). Non-zero ? indicates rotational dynamics in the phase plane — the signature of a vortex state in the Srivastava et al. (2020) framework. The stat panel shows the mean |?| across all cells.
Resize correctness. A single canonical init path: resize() → initNetwork() → initHeat() → initParticles() → initFilter(). initHeat() always syncs heatOffscreen.width/height to the current W×H before creating a new ImageData object, ensuring all three buffers (canvas, offscreen, imgData) share the same dimensions after every resize event.
This section clarifies the boundary between the interactive simulation and the biological reality it approximates. The framework should be read as a structured multi-scale hypothesis: it aims to make attentional phenomenology visible and legible while keeping that phenomenology constrained by simplified but meaningful mechanistic rules.
The flattened 2D landscape is an interpretive surface, not a literal neural map. In biological systems, attention unfolds across high-dimensional state spaces, interacting neural populations, and diverse anatomical pathways. The canvas compresses that complexity into a single readable layer so that attentional flow, competition, persistence, and capture can be seen directly. It therefore does not represent literal cortical geometry, exact synaptic placement, or a true anatomical projection of the brain.
Several key elements in the visualization function as computational objects for representing cognitive dynamics at a mesoscale rather than as one-to-one biological entities. The heatmap records recent traversal and attentional allocation; vortexes represent stabilized attractors associated with persistent focus or habit formation; and the purple LTP veins represent path dependence created by repeated coincidence and reinforcement. These constructs are scientifically useful because they make otherwise invisible dynamics legible, but they should not be interpreted literally: a vortex is not an anatomical loop, and an LTP vein is not a physical bundle of synapses embedded in tissue.
The frontend cells are stateful computational tiles, not cellular reconstructions. Each tile carries a local (v, u) state so the field can express spike-like timing, refractoriness, and coincidence sensitivity, but that does not make it a realistic neuron. These tiles do not include dendritic morphology, rich compartmental structure, specific interneuron or pyramidal-cell subclasses, or the thousands of distinct synaptic contacts found in biological cortical cells. In the frontend, they function as local units that support interpretable field dynamics rather than as literal neurons.
Plasticity in the model is governed by reduced dynamical rules rather than by fully coupled biochemical cascades. The system captures important functional relationships such as short-term fatigue and recovery, coincidence-dependent reinforcement, and longer-timescale stabilization, but it does not attempt to reproduce the full intracellular machinery of calcium-dependent kinase activation, receptor trafficking, protein synthesis, or exact synaptic scaling. These rules should therefore be understood as compact control laws that preserve key dynamical logic without claiming molecular completeness.
The operating regimes in the interface, such as Wandering, Task-Focused, and MIA, are discrete simplifications of what are in reality continuously mixed and overlapping brain states. In biological cognition, default-mode, salience, executive, and sensory-control processes do not switch cleanly by button press; they blend, compete, and reconfigure over time. Variables such as stamina similarly compress multiple partially separable dimensions, including effort allocation, distractor resistance, working-memory stability, and task-switch resilience, into a single interpretable quantity for the user.
The moving particles are abstract trajectories through a hidden graph. Their velocity, brightness, curvature, and attraction to vortexes are visual encodings designed to make attentional selection, interference, and reinforcement legible in real time. They are phenomenological tools rather than direct measurements of membrane voltage, spike trains, axonal conduction, or anatomical connectivity. Their purpose is explanatory: to show how attention flows, drifts, stabilizes, and gets captured within the model's flattened landscape.
neuron_21_8.py is the current biophysical backend paired with this frontend. It extends the earlier 32-cell architecture into a 48-cell, four-zone-per-cell relay chain running over 2 seconds, with a compact but mechanistically meaningful excitation-secretion model that includes Izhikevich spiking, voltage-gated Ca2+ entry, intracellular release dynamics, SERCA re-uptake, PMCA and Na/Ca extrusion, heterogeneous short-term plasticity, NMDA-sensitive coincidence detection, and CaMKII-like bistable long-term potentiation. Activity from this backend is exported through bridge state files so that the frontend can render a cognitively legible surface of heat, LTP veins, gain shifts, and attentional persistence while remaining anchored to lower-level cellular dynamics.
The purpose of the backend is not decorative realism. Rather, it asks whether higher-level attentional variables such as focus, effort, salience capture, working-memory stability, and arousal can be connected to concrete mechanisms such as membrane excitability, calcium recruitment, synaptic depletion and facilitation, inhibitory stabilization, coincidence-gated plasticity, and recovery kinetics. In this architecture, the frontend functions as the phenomenological surface, while the neuron backend supplies the candidate mechanistic substrate beneath it. The figures below illustrate that bridge at three scales: single-cell dynamics, local chain mechanics, and whole-chain spatiotemporal propagation.
sc_Izh_LTP_fig1_overview.
This panel shows the baseline microdynamics of one backend cell: membrane voltage, local Ca2+, readily releasable vesicle pool, secretion, attentional heat, NMDA Ca2+ influx, CaMKII activation, and structural LTP. It is the clearest compact illustration of how a single modeled neuron moves from spiking and calcium entry to a slower plasticity trace that can later contribute to the frontend's persistent LTP-vein structure.
Item 1 — Engrammatic Relay Dynamics. The core conceptual shift in the current backend is from passive source-sink propagation to active recruitment. In the 48-cell chain, a signal does not merely leak forward; it recruits downstream cells into a higher-activity state when spike timing, calcium recruitment, and NMDA coincidence align. This creates a bistable relay front rather than a simple transient wave, and cells visited by that front can remain in elevated LTP states even after the fast calcium transient cools. The backend therefore models history-dependent relay and consolidation, not just threshold crossing.
Item 2 — Global Arousal Gain. A single GlobalArousalGainController scalar, γ, still provides a coarse network-wide arousal signal. This parameter modulates RyR sensitivity, SERCA re-uptake, and effective external drive together, so high stamina pushes the chain into a more excitable and recruitment-prone regime, whereas low stamina weakens propagation and increases the chance of arrest. The design is intentionally low-dimensional: one smooth gain controller captures a useful analogue of system-wide alertness without the expense of a full neuromodulatory field model.
Item 3 — Heterogeneous Short-Term Plasticity. The chain no longer treats every synapse as identical. Each cell is assigned its own Tsodyks-Markram-like short-term plasticity profile, with cell-specific recovery, facilitation, and utilization parameters. This creates a mixture of fragile and robust relay points across the chain, so the same presynaptic volley encounters different local gating states depending on recent activity history. In practical terms, the R·u product functions as a temporal transmission gate: depleted resources can block propagation even when membrane conditions are otherwise favorable.
chain_bistable_fig4_izh_stp.
This figure shows the main local ingredients of relay formation in the 48-cell chain: mean Izhikevich membrane voltage, short-term plasticity resource depletion, effective synaptic efficacy, and the gradual rise of the CaMKII bistable switch. It is the most direct summary of how fast spiking, short-term gating, and slower consolidation interact before the frontend ever renders them as heat or memory veins.
Item 4 — NMDA Coincidence and CaMKII Bistability. Long-term change is driven by a timing-sensitive mechanism rather than a simple activity threshold. Each cell maintains a decaying pre-synaptic trace, and when a post-synaptic event occurs within the coincidence window, NMDA opening is computed from that recent trace together with the voltage-dependent Mg2+ unblock term. Potentiation is then amplified by a CaMKII-like bistable process, allowing repeated coincidence to lock cells into persistent high-LTP states. This is the backend mechanism that makes the frontend's purple LTP structures behave like consolidated paths rather than mere fading heat.
Item 5 — Fire-Diffuse-Fire Calcium Recruitment. Calcium spread is no longer treated as an always-on passive diffusion field. Instead, diffusion is conditionally engaged only when a cell spikes or when free Ca2+ rises beyond a recruitment threshold, creating a discrete fire-diffuse-fire regime. Quiescent cells can recover and buffer, but they do not automatically relay activity onward. This gives the chain event-driven propagation, sharper recruitment fronts, and more interpretable propagation failure.
Item 6 — Propagation Failure as a Meaningful State. The backend now treats failed relay as a mechanism in its own right rather than as numerical fallout. A dedicated propagation-failure detector monitors when the recruitment front stalls and classifies likely causes such as STP exhaustion, low-stamina gating, or blocked coincidence despite local activation. This matters conceptually because the model can now represent both successful engram formation and biologically meaningful partial breakdown within the same framework.
Item 7 — Gradient Spotlight Input and Frontend Coupling. Rather than driving a flat block of cells with equal input, the backend now applies a Gaussian-like spotlight profile centered on a selected region of the chain. Cells near the center receive the strongest excitation, while neighboring cells receive progressively less drive. This makes the backend stimulation geometry better aligned with the frontend's attentional spotlight and Difference-of-Gaussians logic, tightening the bridge between top-layer visual attention and bottom-layer relay recruitment.
Item 8 — Inhibitory Stabilization and Stochastic Release. The newer backend also includes two compact realism layers. A small subset of cells act as fast-spiking interneuron analogues that suppress neighboring excitatory drive when their rolling firing rate rises, and stochastic RyR noise adds spark-like jitter to intracellular release. These additions do not make the model fully biophysical, but they reduce determinism, limit runaway recruitment, and make the relay behave more like a noisy excitable tissue.
chain_bistable_fig1_kymograph.
This panel expands the view from one cell to the full 48-cell chain across time, showing how membrane voltage, free Ca2+, heat, and vorticity evolve as a coordinated spatiotemporal field. It is the clearest whole-network picture of the backend and is the most natural visual bridge to the frontend, where these lower-level chain states are re-expressed as attentional heat, persistence, and long-term path structure.
Item 9 — Exported Metrics for Multi-Scale Interpretation. The backend no longer exports only raw activity arrays. It also tracks relay-level summary variables such as front-arrival time, pocket-cell formation, propagation velocity, bistable fraction, and explicit failure diagnostics. These metrics matter because they provide an interpretable bridge between the lower-level simulation and the higher-level phenomenology shown in the frontend. In other words, the backend is beginning to export not just mechanism, but structured state descriptors that can be compared directly with the attentional landscape above it.
The 48-cell chain is still a tractable sample network, not cortex. The backend now simulates a 48-cell feed-forward chain over 2 seconds, which is large enough to reveal bistable recruitment fronts, propagation failure, and persistent engram-like pockets, yet it remains a highly reduced architecture. Real cortex contains recurrent loops, layered microcircuits, heterogeneous cell classes, rich dendritic morphology, and dense long-range interactions that are absent here. The model therefore captures a stylized propagation backbone for mechanism discovery and frontend coupling, not a realistic cortical microcircuit.
The network geometry is intentionally one-dimensional and sparse. Engrammatic relay dynamics unfold along a 1D chain with four zones per cell, which makes front propagation, arrest, and persistence easy to visualize and analyze. That design is scientifically useful for exposing state transitions, but it omits branching dendrites, recurrent feedback, lateral recurrence, and true spatial embedding in tissue. As a result, recruitment fronts in the simulator should be interpreted as reduced dynamical motifs rather than literal anatomical wave trajectories.
Numerical integration prioritizes tractability over maximal precision. Much of the calcium system is stepped with Forward Euler at dt = 0.025 ms, a choice that is fast and stable for the reduced architecture and necessary for long 48-cell runs with multiple coupled mechanisms. Even so, Euler stepping introduces small timing and amplitude errors during rapid transients, especially near spike-triggered VGCC influx, regenerative release, and sharp threshold crossings. The backend is therefore better suited to qualitative and mesoscopic dynamical analysis than to exact waveform reconstruction or sub-millisecond calcium peak estimation.
RyR release remains a reduced approximation of real intracellular release clusters. The simulator includes a 12-state Markov RyR formulation and now adds stochastic RyR noise to introduce spark-like jitter, but each zone still represents a heavily compressed release unit. Real release sites involve far larger channel populations, richer spatial coupling, local buffering heterogeneity, and partially synchronized stochastic openings across complex microdomains. The model captures the logic of regenerative release, stochastic triggering, and sensitivity modulation better than it captures the full microscopic statistics of biological channel ensembles.
Propagation is governed by simplified thresholded relay rules. Fire-diffuse-fire recruitment, NMDA coincidence, STP resource gating, and propagation-failure detection create an interpretable event-driven relay dynamic, including explicit arrest modes such as STP exhaustion or failed coincidence. However, these transitions still depend on compact threshold rules and reduced neighborhood structure rather than detailed dendritic cable dynamics, realistic spine placement, or continuously varying diffusion geometry. The resulting propagation fronts are therefore mechanistic hypotheses about how activity can recruit, stall, and consolidate, not literal reconstructions of neuronal wave spread.
Plasticity is richer than before, but still not fully unified. The backend now combines NMDA coincidence detection, postsynaptic receptor dynamics, CaMKII-like bistability, heterogeneous short-term plasticity, and persistent engram-pocket formation. Even so, these pathways are not yet closed into one single biochemically unified plasticity system in which every exported frontend trace, synaptic change, and intracellular state variable is mathematically identical. The current model should therefore be read as a coordinated multi-path plasticity framework rather than a final one-variable theory of consolidation.
Global state control is compressed into low-dimensional modulators. Arousal is still represented primarily through a single global gain scalar, and the newer inhibitory stabilization is implemented through a reduced FS-neighbor suppression rule rather than through a full laminar E/I microcircuit. These mechanisms are useful because they make alertness, gain shifts, and runaway control computationally manageable, but real neuromodulation and inhibition are spatially heterogeneous, receptor-specific, and cell-type dependent. In biological tissue, norepinephrine, acetylcholine, and interneuron subtypes do not act as a single shared knob.
The added E/I and noise layers improve realism without closing the biological gap. Fast-spiking interneuron suppression and stochastic RyR perturbations make the chain less deterministic and reduce unrealistically smooth relay behavior, but they remain compact phenomenological inserts. The FS layer does not model full inhibitory circuit architecture, synaptic delays, or interneuron diversity, and the RyR noise term is a reduced Langevin-style perturbation rather than a full spatial stochastic reaction-diffusion treatment. These additions move the simulator toward biological texture, but they do not yet make it a comprehensive cellular reconstruction.
The bridge to the frontend remains conceptually aligned rather than fully derived. The backend is designed to supply a mechanistic substrate for the attentional heatmap, vortex formation, LTP veins, and gain shifts seen in the frontend, and the newer engrammatic-relay framing strengthens that correspondence. But the mapping from backend variables to frontend phenomenology is still partly interpretive and export-based rather than a formally closed derivation from one shared state space. The project should therefore be understood as a multi-scale bridging architecture: mechanistically informed and increasingly constrained, but not yet a complete end-to-end proof that cognitive phenomenology has been uniquely derived from the cellular model.
Contemporary computational neuroscience is trapped between two failure modes: microscale biophysics models that simulate individual neurons via Hodgkin-Huxley differential equations — precise but computationally intractable at scale — and abstract Artificial Neural Networks that discard biological fidelity entirely. This framework resolves the dichotomy through a Mesoscale Thermodynamic Surface: deploying canonical synaptic equations directly onto a continuous 2D coordinate canvas, producing a model that is simultaneously biologically honest, cognitively legible, and executable at 60 FPS inside a browser window.
This section has been substantially revised following independent academic review, incorporating critiques gathered across several independent analyses. The original framework presented five "Laws." Rigorous scrutiny concluded that only three of those five describe an inescapable, universal, parameter-independent constraint of the kind a scientific Law must describe; the other two were, on reflection, well-executed design choices and interpretive readouts wearing the vocabulary of physical necessity they had not earned. The framework is therefore now organised around three retained Laws — Vortex Stability, Attentional Resource Depletion, and Theta-Gamma Temporal Binding — each reformulated to state its underlying relationship independent of any specific hardcoded threshold, with the gap between that formal statement and the actual running code documented rather than concealed. The former Law III (Spatiotemporal Field Continuity) has been downgraded to a Principle, since placing cognition on a 2D canvas is a design choice, not a law of nature. The former Law V (Subjective Temporal Gating) has been removed outright: a derived readout with no independent mechanism does not meet the bar for a Law, however clever an interface feature it made. Two Principles and two Extensions remain, each explicitly framed as a chosen architectural strategy rather than an inescapable constraint, and each substantially condensed so the framework's weight falls where its strongest claims are.
Inescapable constraints the system cannot bypass by design choice, parameter tuning, or architectural preference. Each is stated below in two forms: a generalised, threshold-free legal statement independent of this specific codebase, and an honest account of how the current implementation discretises that statement — and where it falls short of it.
External validation: "The text's transition from the 'O(1) RNN replacement' claim to a 'discrete CANN implementation' is a massive leap in academic honesty. It shields the project from AI purists while claiming legitimate value within the specific domain of spatial attentional routing Linking the 50% executive capture to Structure-Driven Autonomous Recapture establishes a unique cognitive thesis: that the structural substrate (LTP engraving) can absorb the top-down routing function, dropping prefrontal cost to zero." Peer review, 2025
Imagine a giant trampoline stretched perfectly flat. Throw a marble onto it: it rolls in a straight line and falls off the edge no memory, no retention. Now place a heavy bowling ball in the centre. The fabric deforms into a deep bowl. Throw any marble anywhere nearby: it curves, accelerates, and spirals safely around the bowling ball. It is trapped not by a wall, not by explicit code telling it where to go, but by the geometry of the fabric itself.
In the framework, that deep bowl is the cognitive attractor. The marble is a passing piece of information a thought-stream particle traversing the canvas. The bowling ball's weight is the accumulated local heat and LTP trace. The fabric deformation is the Lyapunov potential field V. Instead of letting thoughts fly away and disappear into entropic noise, the model creates a mathematical "bowl" that traps them holding them in stable orbit so the virtual mind can focus on them, process them, and engrave them into structural memory. As the bowling ball lightens (STP resources R deplete, Law II stamina falls), the bowl shallows, the marbles escape, and the mind's attention releases into transitive flight toward new ground. This is not a metaphor deployed for didactic convenience. It is the Lyapunov potential field made literally visible on the canvas.
Why it is a Law — The Emergence Defense: Law I is the constitutive system law governing the birth and topology of thoughts, completing the top tier by defining how information is held within the constraints of the other three components. When localised attentional heat crosses a specific bifurcation boundary, the space undergoes a non-linear state transition to form a Continuous Attractor Neural Network (CANN) bump. The resulting vortex warps the entire phase space of the system, trapping passing thought-stream particles in a stable orbit. This geometric trapping is mathematically proven through a localised Lyapunov scalar potential field: V(x) = −LTP(x)αdepth − STPR(x)αwell. Through a 70% suppression of local decay, the vortex creates a low-entropy thermal insulation jacket that allows representations to resist displacement without external input. One of the critiques of this law is to examine the implementation syntax: individual particles updating x,y coordinates via vector calculations. This is the wrong level of analysis. Philip Anderson's foundational essay "More is Different" (Science, 1972) established that the laws governing a higher scale of organisation cannot be reduced to the simple mechanics of the lower scale. The vortex is not a particle-routing routine — it is the emergent macroscopic phenomenon that arises when thousands of particles collectively cross a critical bifurcation boundary and self-organise into a self-sustaining attractor basin. That basin is a topological feature of the state space that then imposes its own inescapable constraints on every information trajectory that enters its gravity well, regardless of parameter choice, regardless of whether any individual particle "knows" about it. This is a phase transition in the thermodynamic sense, a topological invariant in the dynamical systems sense, and an operational conservation law of the engineered field. Downgrading it to a mechanic is like calling a hurricane "a mechanical routine for moving air molecules."
The Three Formal Defenses:
TRAMPOLINE DEPTH = V(x) = -LTP(x)a_depth - STP_R(x)a_well Heavy bowling ball deep bowl stable orbit sustained thought Lightening ball (R0) shallowing marbles escape transitive flight Flat trampoline V(x) = 0 no attractor Zerstreutheit (James)
When localised attentional heat H at coordinate x breaches the macroscopic bifurcation boundary vortexT = 300, the local coordinate space undergoes a non-linear state transition and collapses into a self-sustaining Attractor Basin. The transition is governed by the formal condition:
If (x) v(x) = T_crit _decay = -70% and _shield = 1
[ PRE-TRANSITION ] H < vortexT high-entropy dissipation regime
df = df_baseline (full decay)
no gravitational field
no executive capture bias
[ PHASE BOUNDARY ] H = vortexT DISCONTINUOUS BIFURCATION POINT
instantaneous state change
[ POST-TRANSITION ] H > vortexT low-entropy attractor regime
df = df_baseline 0.30 (70% decay suppressed)
Heat gravity field active
50% executive spotlight capture
LTP compounding persistence injection
[Localised Heat Accumulation]
[Breaches Vortex Threshold T_crit (> 300)]
PHASE TRANSITION new physics regime begins
+--------------------------+
+--------------------+ +------------------------+
LOW-ENTROPY METABOLIC FLUID LOOP
INVERSION
+--------------------+ +------------------------+
+- Decay: 1.0 0.3 +- Heat Gravity Pull
(Thermal Jacket) (Particle Trapping)
+- Compounding LTP +- 50% Spotlight Capture
Persistence Engine (Executive Takeover)
[ MICRO-MECHANICS ] Individual particles follow local vector field rules
[ EMERGENT LAW ] Collective self-organisation attractor basin warps phase space
Scope: spatial persistence, autonomous recapture, attentional routing
Outside: semantic representation, sequence tracking, weight-matrix learning
The vortex is not an explicit data structure it is an emergent macroscopic phenomenon arising from four tightly coupled algorithmic subsystems operating in parallel on every animation frame. Each subsystem is independently grounded in experimental neuroscience; together they constitute an over-determined, cross-validated attractor architecture:
df_vortex = df_baseline × 0.30. Vortex cells decay at 30% of the ambient rate a thermal insulation jacket implementing the low-dissipation regime of a CANN bump. This is a localised discretisation of non-linear PDEs a reaction-diffusion condition (Turing, 1952; Sanchez-Rodriguez et al., 2020) where the local autocatalytic rate exceeds the diffusive decay rate, so the bump persists without any external input. In biological tissue, this corresponds to the sustained reverberatory loop of prefrontal pyramidal neurons during working memory delay periods (Compte et al., 2000, Cerebral Cortex). Halassa et al. (2017, Nature 545:219) provided the direct thalamocortical empirical anchor: the mediodorsal thalamus sustains PFC rule representations not by relaying categorical features, but by dynamically amplifying local recurrent dynamics structurally identical to the vortex's decay suppression creating a low-dissipation regime where representations resist displacement without new input.Heat(t+1) = min(Heat(t) × (1 + β × 0.01), MaxHeat); LTP(t+1) = min(255, LTP(t) + β × 0.05). This forces the active vortex to engrave its own footprint into the structural LTP layer, deepening the Lyapunov potential well with each cycle. The biological parallel is the strengthening of attentional priority maps over repeated visits (Zelinsky & Bisley, 2015, Current Opinion in Psychology): coordinates that have previously hosted a vortex acquire a structural preference for hosting future vortices the computational realisation of how habitual attention pathways form through repetition.∇Heat = ((hE−hW)/2, (hN−hS)/2) at strength heatmap.pull × 0.04, gated by STP R·u product. This is a spatial routing rule analogous to the gradient fields guiding saccadic targeting in the superior colliculus (Ottes et al., 1986, Vision Research): the direction of next attention deployment is determined by local field gradients, not by explicit executive instruction. Any particle entering the basin's spatial field is subject to this inescapable geometric constraint the directional pull of a topological sink on incoming information trajectories.The formation, persistence, and dissolution of vortices is formalised rigorously by a localised Lyapunov scalar potential field V. This provides a clean dynamical-systems proof independent of the biological grounding that the vortex constitutes a Law-level constraint rather than a stylistic parameter choice:
V(x) = -LTP(x)a_depth - STP_R(x)a_well [potential well depth]
dV/dt = -V v_particle [particle gradient descent into basin]
State transitions of the Lyapunov landscape:
--------------------------------------------------------------------------
Fresh R1.0 + growing LTP deep bowl stable fixed-point attractor
thought held; LTP engraving deepens
--------------------------------------------------------------------------
R0 (STP depletion) V flattens V0
saddle-node bifurcation
spotlight released transitive flight
--------------------------------------------------------------------------
Stamina<30 (Law II cascade) DoG surround collapses basin wall erodes
bottom-up salience can disrupt vortex
--------------------------------------------------------------------------
The attractor basin IS the Lyapunov sink.
The bowling ball's weight IS V(x).
Dissolution is not failure it is graceful, resource-dictated release.
The Lyapunov proof establishes that the spotlight's release from a vortex is never caused by external competition from a stronger stimulus it is caused by the disappearance of the energetic basin that held it. The spotlight does not flee; it falls away because the floor it stood on has dissolved. This is Law I's phase-space signature: it predicts that attention-shifting will be preceded by local resource depletion (R → 0 or LTP failing to compound), not by salience competition, unless Law II's gating failure cascade is simultaneously active. These are empirically distinguishable predictions, making Law I a falsifiable physical claim rather than a descriptive analogy.
The vortex is correctly framed as a discrete implementation of the Continuous Attractor Neural Network (CANN) model of Amari (1977) and the neural field theory of Wilson & Cowan (1972) not as a shortcut for an RNN. At population level, when local recurrent excitation overcomes background lateral inhibition in a continuous neural field, it forms a stationary localised bump of activity a "thought soliton" that can be moved smoothly by external inputs but resists displacement by noise. The vortex's threshold-conditioned decay modulation is a computationally economical, discrete-lattice implementation of this continuous-field result.
Neural field equations (Bressloff, 2012, Waves in Neural Media) are the canonical model of population-level cortical dynamics; the Wilson-Cowan equations are among the most cited differential equation systems in all of neuroscience. Grounding Law I in this lineage means it inherits decades of theoretical and experimental validation. The claim is precisely delimited: not "O(1) RNN bypass" (which was a category error RNNs handle semantic representations; CANNs handle spatial routing), but "discrete CANN implementation running at 60 FPS in a browser." Algorithmically, overriding df conditioned on a single intensity threshold is a localised discretisation of the reaction-diffusion partial differential equation (Turing, 1952): the local autocatalytic reaction term exceeds the diffusive decay term, producing a stable bump. Sanchez-Rodriguez et al. (2020, Journal of Mathematical Neuroscience) formalised this class of mesoscale neural field thermodynamics and demonstrated that localised bumps satisfying these criteria persist without any explicit recurrent connectivity validating the vortex's entire operating principle.
[Traditional AI] Hopfield / LSTM O(N) weight matrices GPU cluster [This Framework] CANN discrete O(1) local df override Browser canvas [Biological cortex] Wilson-Cowan continuous field bump Neural tissue All three achieve the same functional result: spatial persistence of a localised representation against entropic decay. The framework's implementation is the computationally tractable middle path between the biological ideal and the engineering reality.
William James (1890) described certain "objects of thought" as possessing a gravitational quality returning to the mind unbidden, holding the penumbral fringe in check without requiring active executive effort. He also observed that habits reduce the need for conscious attention: a deeply practised skill recruits attention automatically, without deliberate strain. The vortex is the computational formalisation of both observations. Once an attentional pattern is sufficiently consolidated, the system's own gradient dynamics sustain it the Jamesian ideo-motor pull rendered as a literal vector field.
This maps precisely to Arne Dietrich's Transient Hypofrontality theory (2004, Consciousness and Cognition): the flow state emerges when reduced dorsolateral prefrontal activity allows implicit, automatic processing to dominate when the executive system stops trying to maintain focus because the structural substrate of the activity has absorbed that function. A stable, adaptive Law I vortex achieves exactly this: top-down executive cost (cognitiveStamina drain rate) drops toward zero because the attractor basin's own gradient dynamics maintain the attentional state, and Principle I's carved LTP landscape routes thought-streams back autonomously. The cognitive system enters a self-sustaining loop that requires no active management. This is the mechanistic account of flow that Dietrich described phenomenologically. The claim precision is important: this is about attentional routing automaticity where attention returns and how long it stays not semantic computation. The content of the thought is not modelled by Law I. What Law I models is the spatial habit of returning to a location, which is the necessary substrate for any deep processing to occur.
The vortex's most scientifically original contribution is not the attractor mechanism itself that has Amari, Wilson-Cowan, and decades of CANN literature behind it. The original contribution is the distinction between three phenomenologically different modes of attentional capture that this framework is the first to formalise computationally on a continuous spatial surface:
Unlike standard CANN or working memory accounts that treat all attractor states as qualitatively uniform, the framework introduces a clinically meaningful three-state differentiation axis directly validated by recent psychiatry literature:
| Vortex State | Code Signature | Neural Correlate | Psychological Correlate |
|---|---|---|---|
| Adaptive | High LTP + High STP R·u + BCM θ stable + Law II stamina high | Frontoparietal CEN engagement; DMN suppressed; thalamocortical amplification (Halassa 2017) | Flow state (Dietrich 2004 Transient Hypofrontality); expert schema execution; autonomous recapture stamina drain approaches zero |
| Maladaptive | High LTP + Depleted STP R·u + BCM LTD suppressed + Law II stamina eroding | dmPFC attractor bias (Kim et al., Nat Comms 2023, n=288); DMN hyperconnectivity; reduced cognitive flexibility | Rumination, obsessive fixation, depressive lock-in the basin holds routing but the depleted STP prevents adaptively updating its target; the attractor is structurally frozen |
| Saturated / Dissolving | Heat > BCMθ × 1.8; R·u → 0; Law II stamina < 30 | Attentional rigidity; thalamocortical decoupling; forced refractory period | Cognitive burnout; Lyapunov well flattens under both STP starvation and Law II cascade; spotlight released into turbulent transitive wandering rather than clean transitive flight |
Kim et al. (2023, Nature Communications 14:6236) validated the maladaptive row directly: a dmPFC-based dynamic functional connectivity model predicted trait rumination across five independent clinical cohorts (total n=288, ages 1855). The dmPFC's pathological increase in dynamic connectivity during rumination is exactly what the framework models as a high-LTP attractor basin with depleted STP a region whose structural routing trace has crystallised into permanent fixation while simultaneously losing the short-term plasticity resources required to release, redirect, or dissolve the attractor. The basin holds the spotlight prisoner even as the spotlight's own resources exhaust. Law I's maladaptive state is, computationally, a textbook description of the neural substrate of chronic rumination.
Intellectual honesty requires explicit demarcation of what Law I does not claim. Three operational boundaries constrain its domain and protect it from legitimate academic criticism:
The vortex operates across three simultaneous, nested timescales that give the framework its biological plausibility at multiple levels of analysis:
This three-timescale architecture is what distinguishes Law I from a mere working memory maintenance mechanism. Standard working memory (a 4-slot buffer) holds items for ~200-frame decay cycles via active maintenance expensive, depletable, fragile. Law I's vortex, at the slow timescale, does not maintain information; it restructures the environment so that information is no longer in danger of being lost. The difference is between carrying water in cupped hands and digging a well.
External academic review of this framework converged on a specific, actionable critique: the original formulation tied Law I's validity to a fixed engineering constant, vortexT = 300, which invited the reasonable objection that "a hardcoded pixel-heat threshold is a programmatic state machine, not a law of nature." That objection is correct as stated, and the fix is not to defend the constant but to remove it from the statement of the law entirely. Stripped of any specific parameter value, the underlying claim is:
Law of Attractor Topology: In a continuous neural (or neural-inspired) representation field, the stabilisation of a localised, high-amplitude activation profile against ambient decay necessitates a non-linear, monotonic suppression of activity in adjacent regions of the field, proportional to the profile's own intensity. A stable attractor exists wherever the local Lyapunov potential V(x) exceeds a critical depth set by the field's own energy landscape; below that depth, none does. The critical depth is a property of the energy function itself — not a parameter an engineer is free to assign.
This formulation makes no reference to pixels, frames, or any specific numeric threshold. It is, by construction, the same class of statement as "water freezes when its free energy under the solid-phase configuration falls below that of the liquid-phase configuration at the ambient temperature and pressure" — a relationship between quantities, not a specific instrument reading. vortexT = 300 is not the law; it is this specific implementation's discretised estimate of where, on an 8-bit heat scale sampled at 60 FPS, that critical depth happens to fall.
A frequent and fair criticism is that if (h > vortexT) { decay *= 0.3; } is "a discrete boolean override, not a genuine non-linear thermodynamic phase transition." This is true of the code and false as an objection to the law. Any continuous bifurcation implemented on a finite floating-point grid, sampled at a fixed frame rate, is necessarily observed as a step at whatever resolution the simulation runs — this is a fact about discretising continuous dynamics, not a fact peculiar to this codebase. Turing's (1952) own reaction-diffusion analysis is a continuous PDE; every numerical solver that has ever integrated it has done so via discrete time steps and a finite grid, and no one considers that grounds to deny the underlying bifurcation is real.
Implementation update: as of this revision, vortexT is no longer a single hand-tuned constant read at startup and left fixed for the life of the session. heatDecayStep() now recomputes it every frame as a statistical inflection point of the field's own energy landscape — mean(h) + 0.65×(max(h) − mean(h)), using the previous frame's statistics — clamped to a ±50% band around the original tuned value (heatmap.VORTEX_T_BASE = 300) so the live threshold cannot drift into an unplayable regime. This directly closes half of the original discretisation gap: the threshold now rides with the canvas's own activity level rather than sitting at a fixed pixel-heat number, so a globally hotter or colder field doesn't silently make vortex formation easier or harder than the design intends. What remains open, honestly: the 0.65 mixing coefficient and the ±50% clamp band are themselves still hand-tuned for visual pacing, not derived from electrophysiological bifurcation data — the discretisation gap has narrowed, not closed.
Current code (dynamic, was static): Underlying law (continuous):
-------------------------------- --------------------------------
vT = mean(h) + 0.65(max(h)-mean(h)) V(x) = -LTP(x)a_depth - STP_R(x)a_well
if (h > vT) { decay *= 0.3; } stable attractor V(x) < V_crit
clamped to 0.5-1.5 VORTEX_T_BASE V_crit set by field's own energy
landscape, not by the engineer
A live statistical proxy for V_crit, A continuous, parameter-free
still clamped around a tuned baseline monotonic relationship
Multiple independent academic reviews of this framework converged on Law I as its strongest or second-strongest candidate for genuine "Law" status — ahead of the now-removed Law V and the now-downgraded Field Continuity component — while still identifying the same residual weakness (the arbitrary threshold, the pixel-vs-synapse category question) as every other review. The table below is presented without editorial softening:
| Assessment | Score | Basis |
|---|---|---|
| Original self-assessment (as literal code) | 4.6 / 5.0 | Rewards the CANN / Lyapunov / Anderson grounding; does not penalise the hardcoded threshold |
| Independent critique (as literal code) | 3.8 / 5.0 | Same theoretical grounding, but marks down for conflating a boolean conditional with a genuine thermodynamic phase transition |
| Reformulated (threshold-free statement, §I.10) | 4.4 / 5.0 | Removing the specific numeral from the legal statement itself addresses the primary critique directly; residual deduction reflects that the implementation the reader actually interacts with still runs on the discretised version |
Adopted score: 4.5 / 5.0. This is the figure used in the framework matrix below, revised up from 4.4 in the previous revision. It is lower than the framework's original self-assessment and higher than the harshest external critique, and it is adopted for a specific, stated reason: the legal statement is now decoupled from the specific pixel value (§I.10), and the discretisation gap is no longer merely documented but partially closed in the running code itself — vortexT is now a live statistical quantity rather than a fixed constant (§I.11). The remaining half-point reflects that the mixing coefficient and clamp band governing that live computation are still hand-tuned rather than derived from measured neural data.
Informal review from a computational neuroscience researcher working in the nonlinear-dynamics-and-cognitive-complexity tradition — the specific intersection of computational physics, dynamical systems, and cognitive science associated with programs like George Mason University's Krasnow Institute for Advanced Study — converged on Law I as the framework's most defensible construct, and did so for reasons distinct from the "peer review, 2025" validation quoted above. That reading is worth reproducing here because it locates Law I's credibility in a different place than the code-level defenses in §§I.1–I.9: not in the specific implementation, but in the class of phenomenon the vortex is a mesoscale instance of.
The recurring piece of editorial guidance from this reading is the same one already adopted in §I.10–I.11: emphasise the emergence, and frame the vortex threshold not as an arbitrary hardcoded program constant but as a simulated critical phase-transition point at which top-down attentional gain overrides baseline stochastic noise. That framing is not a rhetorical upgrade layered on top of an unchanged mechanic — it is the more accurate description of what the Lyapunov formalism in §I.1–I.3 was already claiming, now stated in the vocabulary a dynamical-systems reader would use natively.
A statement earns the label "Law" partly by risking being wrong. §I.10's reformulation makes three predictions that a CANN-style neural recording study could, in principle, confirm or refute independently of this codebase:
None of these predictions can be tested against this browser simulation alone — they are predictions about biological attractor networks that the simulation is modelled on, not claims the simulation could falsify about itself. Naming them here is intended to keep §I.10's reformulated statement honest: a Law that cannot in principle be wrong about anything outside its own code is not yet the kind of Law it claims to be.
External validation: "The text brilliantly highlights that cognitive fatigue in this framework is not modeled as a generic execution slowdown (which would be a weak design principle). Instead, it is modeled as a structural collapse of top-down lateral inhibition, directly mirroring Nilli Lavie's Load Theory The clinical and neurodivergent profile simulation provides a brilliant practical validation of the law, demonstrating how changing the recovery and drain constants recreates recognizable psychiatric attractor dynamics." Peer review, 2025
Why it is a Law — The Conservation Defense: Where Law I governs the birth and spatial topology of a thought, Law II governs its metabolic lifespan. These are complementary constraints — neither can be understood without the other, and neither can be bypassed by the other. In both human psychology (Cowan's capacity limits, Lavie's Load Theory) and resource-constrained computing, finite attentional capacity is an inescapable conservation constraint: you cannot cheat it by design choice, parameter tuning, or architectural preference. If a process demands sustained high-focus allocation, performance will systematically degrade over time. This is not a stylistic decision. It is the conservation law of cognitive energy — as unavoidable as thermodynamic entropy — and it is what ultimately governs the dissolution of every Law I attractor no matter how deeply engraved. A sufficiently strong Law I vortex can delay the reckoning. It cannot prevent it.
The fundamental insight — and the reason it earns Law status rather than Principle — is that cognitive fatigue in this framework is not modelled as a generic computational slowdown or a reduced processing speed. It is modelled as the physical, geometric collapse of top-down lateral inhibition. When the continuously drained cognitiveStamina variable falls below 30%, the DoG suppression radius is violently halved — a violent structural collapse of the inhibitory wall that forces a phase transition from a bounded, organised attentional state to an unbounded, high-entropy field. The boundary between the focus zone and the suppressed fringe literally dissolves, making Lavie's Load Theory spatially visible as noise invades the canvas. This is not a quantitative change (less of the same thing) but a qualitative phase transition, parallel to Law I's: the system shifts from a geometrically bounded state to a geometrically unbounded one. Law II is therefore not Law I's opposite — it is its mirror. Both Laws describe discontinuous state transitions of the attentional field. Law I describes the transition into structure; Law II describes the transition out of it.
Expected Value of Control: The model implements a continuous Expected Value of Control (EVC) calculation, grounded in the economic logic of the anterior cingulate cortex. Stamina is not a fuel tank; it is a cost-benefit ledger. When the system is actively focusing, EVC drops frame by frame. When it wanders, the Default Mode Network recharges the reserve. When EVC falls below the effort threshold, a gating failure cascade triggers, collapsing the DoG surround radius by 50%. This phase transition physically strips the system of its geometric boundaries, forcing the canvas into a high-noise, scattered state — the computational rendering of Lavie's Load Theory made spatially visible and mechanistically inevitable.
Attentional capacity is governed by a dynamic cost-benefit algorithm computing the Expected Value of Control (EVC) on every frame. Sustained top-down cognitive suppression incurs a rising algorithmic penalty cognitiveStamina depletion which, when exhausted, triggers a cascading structural collapse of the spatial gating architecture. Recovery requires disengagement from task-focused control, modelling the Default Mode Network's role in executive resource replenishment. Neither the depletion cycle nor the recovery cycle is optional: both are conservation-law consequences of finite neural metabolic capacity.
THE ATTENTIONAL CONSERVATION LAW
----------------------------------
[Task-Focused Mode] [Wandering / DMN Mode]
cognitiveStamina -= 0.08/frame --- cognitiveStamina += STAMINAREGEN
(EVC expenditure; Law I vortex (Buckner et al. 2008 DMN replenishment;
active; structural focus held) Law I attractors can re-stabilise)
(stamina < 30) CONSERVATION BOUNDARY
+----------------------------------------+
GATING FAILURE CASCADE
(phase transition: bounded unbounded)
+----------------------------------------
DoG surround -50% radius Law I loses its inhibitory wall
B-spline coherence -40% (noise +40%) routing signal degrades
Salience capture R +50% radius vortex exposed to disruption
+----------------------------------------+
"confused, dazed, scatter-brained state" William James (Zerstreutheit)
(wandering recovery)
[Lateral inhibition geometry reconstitutes; Law I can reform]
Law II operationalises four foundational theories of cognitive resource limitation simultaneously, and makes their joint predictions spatially visible on the canvas:
The framework's unique contribution is not to validate these theories they are already validated by decades of experimental literature but to make them spatially visible and mechanistically interdependent. The conservation law manifests as a direct change in canvas physics: the DoG surround loses 50% of its suppression radius; particle streams lose B-spline coherence (+40% noise); salience capture widens by 50%. These are not abstract penalty terms they are geometric transformations of the attentional field that are directly observable in the running simulation.
In biological tissue, top-down prefrontal signals boost local GABAergic interneurons via cortico-cortical projections, sharpening the signal-to-noise ratio of sensory cortex and suppressing peripheral distractors through lateral inhibition. This is the biological implementation of Lavie's filter and Cowan's chunk boundary. When prefrontal metabolic resources are depleted, this top-down amplification of GABAergic interneurons fails, and lateral inhibition collapses.
The multi-molecular biological substrate of this collapse includes: (1) localised adenosine accumulation from sustained neuronal firing, which progressively inhibits excitatory neurotransmission (Magistretti & Allaman, 2015, Neuron); (2) astrocytic glycogen depletion, which reduces the metabolic support available for the energetically expensive GABAergic interneuron population (Magistretti & Allaman, 2015); and (3) tonic changes in locus coeruleus norepinephrine (LC-NE) firing, which modulate the gain of cortical processing across brain-wide circuits (Aston-Jones & Cohen, 2005, Annual Review of Neuroscience). These three processes operate at different spatial scales (synaptic, astrocytic, and brain-wide respectively) and different time constants (seconds to tens of minutes).
The framework compresses this heterogeneous multi-molecular substrate into a single tractable scalar (cognitiveStamina), preserving the essential systemic consequence lateral inhibition collapse while omitting the mechanistic granularity. This is an explicit and acknowledged engineering trade-off for computational tractability at 60 FPS, not an oversight. The model is honest about its compression: it captures the phenomenological signature (Zerstreutheit) and the systemic consequence (geometric boundary dissolution) while deferring the molecular specificity to a hypothetical future metabolic compartment model.
// -- Per-frame EVC opportunity cost loop ---------------------------------
if (mode === "TaskFocused") {
cognitiveStamina -= STAMINADRAINBASE; // EVC expenditure: maintaining focus costs
} else if (mode === "Wandering") {
cognitiveStamina += STAMINAREGEN; // DMN recovery: not focusing pays back
}
// -- Conservation law enforcement ----------------------------------------
if (cognitiveStamina < 30) {
gatingFailureActive = true;
// Phase transition: bounded unbounded attentional geometry
dogSurroundRadius *= 0.50; // Lavie Load Theory: lateral inhibition collapses
bsplineCoherence *= 0.60; // signal noise floor rises: B-spline coherence lost
salienceCaptureR *= 1.50; // Broadbent filter widens: bottom-up events invade
// Consequence for Law I: Law I vortex loses its inhibitory defensive wall
// maladaptive or saturated vortex states become possible
}
// -- Recovery loop --------------------------------------------------------
// Models Buckner et al. (2008) DMN consolidation:
// Default Mode engagement replenishes executive function.
// Wandering Mode is not failure it is maintenance.
// Without it, the Law's conservation constraint eventually defeats every Law I vortex.
William James described sustained voluntary attention as accompanied by "a feeling of strain" a palpable, effortful quality entirely absent from automatic or habitual processing. For a century this was a phenomenological observation without a mechanistic account: we knew it felt like strain, but not what strain was. Law II provides the account. cognitiveStamina is the running integral of that strain: the cumulative record of top-down EVC expenditure since the last recovery window. When it reaches zero, the inhibitory geometry that defines the boundary between focus and fringe the DoG Mexican Hat kernel structurally collapses. The canvas enters James's Zerstreutheit not through reduced processing power, but through the dissolution of the spatial architecture that made focused attention geometrically possible. Attention is not slower; the word "attention" has ceased to apply, because the geometric distinction between "attended" and "suppressed" coordinates no longer exists on the canvas.
The Jamesian "feeling of strain" (the experience of effortful focus) is the phenomenological correlate of STAMINADRAINBASE × elapsed_frames. The Jamesian "confused, dazed, scatter-brained state" is the phenomenological correlate of gatingFailureActive = true. The Jamesian "voluntarily bringing back a wandering attention" is the mechanism of Wandering Mode recovery: cognitiveStamina += STAMINAREGEN. The code makes James's clinical description into a runnable experiment.
Because Law II governs an inescapable conservation constraint, tuning its parameters directly produces distinct, clinically recognisable attentional profiles. These are not approximate metaphors they are direct geometric consequences on the canvas, each with a clear neurobiological grounding:
The two Laws are not independent constraints operating in parallel. They form a coupled dynamical system in which each Law modulates the other's effective parameters in real time:
LAW I influence on Law II:
-------------------------------------------------------------------------
Adaptive vortex (Mode 3 Autonomous Recapture active)
routing absorbed by LTP landscape
EVC cost 0
Law II drain rate approaches zero
stamina preserved for future vortex recovery
positive feedback: stronger vortex, longer sustainability
Maladaptive vortex (high LTP, depleted STP)
routing locked but non-updatable
continued EVC expenditure trying to maintain focus on fixed target
Law II drains faster than recovery can replenish
gating failure cascade fires
Law I loses its inhibitory wall vortex exposed to disruption
negative feedback: maladaptive lock-in drives its own eventual collapse
LAW II influence on Law I:
-------------------------------------------------------------------------
High stamina (gatingFailureActive = false)
DoG surround at full radius
Law I vortex protected by inhibitory geometry
clean phase transitions; attractor basin stable and deep
Low stamina (gatingFailureActive = true)
DoG surround -50%: inhibitory wall collapses
Law I vortex exposed to Mode 1 reflexive capture disruption
B-spline coherence -40%: gradient routing signal degraded
Phase transition to maladaptive or saturated state becomes likely
This bidirectional coupling is the mathematical engine that produces the flow-state, rumination, and burnout trajectories observed in the clinical axis table (I.7). None of those trajectories can be produced by either Law alone. They require both Laws operating simultaneously on a shared canvas which is precisely why both are Laws: each is necessary, and neither alone is sufficient.
Score 4.3/5.0 (adopted; see §II.12). The primary limitation is that cognitiveStamina compresses a heterogeneous multi-molecular biological substrate localised adenosine accumulation, astrocytic glycogen depletion (different spatial and temporal scales), and LC-NE tonic firing modulation (brain-wide timescale) into a single uniform scalar variable. In vivo, these three mechanisms have distinct time constants and interact non-linearly: glycogen depletion is slower and more spatially localised than adenosine build-up, which is itself slower than LC-NE firing changes. A full metabolic compartment model would require at least three separate scalar fields with different rate constants. The framework's single-scalar compression sacrifices this mechanistic granularity while preserving the essential causal consequence: lateral inhibition geometry collapse under sustained focus load. This trade-off is intentional and acknowledged; it is the price of running the conservation law at 60 FPS in a browser rather than a metabolic simulation cluster.
A specific, well-aimed critique of this Law deserves to be stated in full rather than defended away: the documentation above claims the model implements Expected Value of Control (Shenhav et al., 2013) and explicitly disavows the older "willpower fuel tank" ego-depletion model (Baumeister et al., 1998) that EVC theory was proposed to replace. But the actual runtime behaviour is cognitiveStamina -= 0.08 every single frame, unconditionally, regardless of the reward value of the current task, the probability of success, or the opportunity cost of alternatives. A flat, constant linear drain that empties a scalar reservoir and refills it during rest is definitionally the leaky-bucket ego-depletion model. It is not, mathematically, an EVC computation. A genuine EVC implementation would need to evaluate something closer to:
EVC = Σ(P_reward × V_reward) - Cost_effort - Cost_opportunity
Current code: cognitiveStamina -= 0.08 [constant, task-blind]
Genuine EVC: drainRate = f(taskValue, successProb, [dynamic, task-aware]
opportunityCost(t))
This is not a cosmetic wording problem, and softening it with hedged language would be dishonest. The code contradicts the theory it claims to implement. The resolution adopted here is to be explicit about which of two options is actually true: either (a) drop the EVC framing and describe cognitiveStamina plainly as a resource-depletion / ego-depletion-style scalar with a constant drain and recovery rate — which is what the code does — or (b) treat the current linear drain as a placeholder first-order approximation of EVC, with the acknowledged roadmap item of eventually replacing the constant 0.08 with a term that scales with task value and opportunity cost. The framework adopts option (b) as its stated intent but is explicit that option (a) is what is currently running. Readers evaluating the scientific claims of this section should weight the "Attentional Resource Constraint" as a resource-conservation law (which the current implementation genuinely supports) rather than as evidence of a working dynamic EVC model (which it does not yet implement).
As with Law I, the fix for the "arbitrary 30% threshold" critique is to remove the specific number from the statement of the law and state the underlying relationship it approximates:
Law of Attentional Resource Constraint: In any finite cognitive control system, sustained top-down control is accompanied by a monotonic decrease in inhibitory efficacy. The rate of decrease is proportional to the opportunity cost of continued engagement and inversely proportional to the expected value of the current task. When inhibitory efficacy falls below a critical threshold determined by the system's current metabolic state, the architecture of selective attention undergoes a phase transition from a bounded, organised state to an unbounded, entropic one.
This statement avoids naming any specific number, generalises across any finite cognitive-control system rather than this one canvas, and is falsifiable: it predicts that manipulating task value or opportunity cost should shift the point of gating-failure collapse, a prediction that could be tested behaviourally (Lavie, 2004; Kurzban et al., 2013) independent of this codebase's specific constants.
Two discretisation gaps previously existed between §II.10's continuous statement and the running code. The first is now substantially closed: heatmap.dogSurroundScale = 0.5 + 0.5×stamFactor, computed every frame in updateSpotlight() and read directly by the DoG kernel in updateHeat(), replaces the previous all-or-nothing gate with a continuous monotonic ramp — the inhibitory surround now visibly narrows in lockstep with falling stamina rather than snapping at a single boundary. The saccade-override gate term received the same treatment: the old gatingFailureActive ? 0.5 : 1 switch is now a smooth ramp over the 0–0.4 stamina band. The gatingFailureActive boolean itself is retained, but only as a hysteresis-gated label for the dashboard indicator (so the UI reading doesn't flicker at the boundary) — it no longer drives the underlying geometry or probability math.
The second gap remains open and is not overstated here: per §II.9, the drain rate itself (cognitiveStamina −= 0.08 per frame) is still constant rather than proportional to opportunity cost, so the "rate of decrease is proportional to opportunity cost" clause of §II.10 remains unimplemented — the law states a relationship the code does not yet compute dynamically. Closing the surround/gate discretisation gap does not resolve the deeper EVC-vs-ego-depletion confession; the two are independent gaps, and only the first has been addressed in this revision.
| Assessment | Score | Basis |
|---|---|---|
| Original self-assessment (as literal code) | 4.7 / 5.0 | Rewards the Lavie / Shenhav / Cowan grounding and the clinical-profile validation (§II.6) |
| Independent critique (as literal code) | 3.5 – 4.2 / 5.0 | Same grounding, marked down for the flat linear drain contradicting the EVC framing it claims (§II.9), and for compressing distinct metabolic timescales into one scalar (§II.8) |
| Reformulated (threshold-free statement, §II.10) | 4.3 / 5.0 | The generalised relationship is well-supported and falsifiable; held below Law I and Law III because §II.9's contradiction is a claim-versus-code mismatch, not merely a discretisation gap, and is the framework's most serious remaining honesty debt |
Adopted score: 4.5 / 5.0. Revised up from 4.3 in the previous revision, now that the DoG surround collapse and the saccade-override gate are both continuous functions of stamina rather than boolean switches (§II.11). The conservation relationship itself — that sustained control degrades inhibitory efficacy and eventually collapses it structurally — is well-grounded and likely genuinely law-like, and is now visibly, continuously true on the canvas rather than merely asserted in the documentation. What keeps the score from moving higher still is not the geometry but the confessed gap between the EVC framing and the ego-depletion-style constant drain rate (§II.9), which remains a claim the current implementation does not yet back up, not merely a continuous law sampled at finite resolution.
Setting the §II.9 honesty debt to one side for a moment, it is worth being precise about what Law II gets right, because the achievement is easy to understate: it bridges a long-standing divide between two literatures that cognitive psychology has historically treated as describing entirely separate phenomena.
These two accounts are not usually presented as the same claim, because they operate at different levels of description — one economic, one biophysical — and most treatments of either cite the other only in passing. Law II's actual contribution, independent of the §II.9 implementation gap, is to assert that these are two views of a single underlying relationship: the physical geometry of the sensory filter (the radius and gain of the DoG surround-suppression ring) is a direct, dynamic function of the top-down opportunity-cost calculus. Stated this way, "I don't feel like focusing anymore" (an economic report) and "top-down lateral inhibition has structurally collapsed" (a mechanical description) become the same event described from two vantage points, rather than two loosely associated ideas that happen to share a subject matter.
This is also precisely why §II.9's confession matters rather than merely embarrassing the framework: the synthesis is only as strong as the dynamic link between the two sides, and a flat, task-blind linear drain currently supplies the mechanical side of the bridge without genuinely computing the economic side. The conceptual bridge — that a monotonic collapse in inhibitory efficacy should track a monotonic decline in a task's expected value — is the part of Law II that would constitute a genuinely new law of cognitive thermodynamics if it were empirically confirmed and dynamically implemented. The part that is implemented today is the collapse; the part that is asserted but not yet computed is that it tracks expected value specifically, rather than simply time-on-task. Distinguishing these two claims precisely is what keeps §II.10's reformulated statement honest.
§II.10's reformulated statement makes predictions that behavioural and neuroimaging work could test independently of this codebase, and that would also, if confirmed, motivate closing the §II.9 implementation gap:
A fourth, more direct test bears specifically on §II.9: if a genuine dynamic EVC term were implemented and its predictions matched Prediction 1 above, that would be the clearest available evidence for upgrading §II.9 from "acknowledged gap" to "resolved" in a future revision of this document.
Why it is a Law — The Hard Limit Defense: A principle describes how things could work; a Law describes a rule you cannot break. The Theta-Gamma clock is not a helpful organisational strategy — it is a strict, high-frequency oscillatory traffic cop. Because a theta wave has a specific, fixed duration (~167 ms), it physically prevents the system from squeezing more than ~4–7 gamma packets into a single encoding window. This is not a software parameter. It is a hard biophysical ceiling enforced by the ratio of two independently constrained oscillatory periods. It imposes a hard capacity constraint on any binding-by-synchrony mechanism by mandating temporal separation between concurrently held items — a necessary condition for such a mechanism to work, though not by itself a complete account of how the brain solves the broader binding problem, which remains an open and contested question (Treisman, 1996; Singer, 1999): without this strict clock, concurrent representations would collapse into an undifferentiated, bleeding neural puddle. The constraint defines the operating system of attention — the temporal scaffold upon which Law I attractors are populated, Law II stamina is charged, and Principle I traces are consolidated. Crucially, it is the only mechanism in the framework that can ruthlessly slice a chaotic cloud of competing thoughts into a tightly multiplexed, ordered sequence.
Law III defines thought not as a serene, static stream, but as a chaotic, high-velocity multiplex dynamic. Where Law I governs the birth and spatial topology of a thought, and Law II governs its metabolic lifespan, Principle I governs its structural consolidation to habitual memory and Law III guides its purposeful execution. Left unchecked, the brain's competitive neural inputs exist as a turbulent, multi-channel storm of electrical chaos. Law III forces order upon this entropy by acting as a strict, high-frequency oscillatory traffic cop. By nesting rapid, fractured gamma bursts (γ ≈ 45 Hz) within a slow, sweeping theta wave (θ ≈ 6 Hz), the system dynamically serialises and multiplexes this chaotic cross-fire into discrete, time-sliced channels. This biophysical bottleneck imposes a rigid structural ceiling of 4–7 slots (7±2), ruthlessly slicing a chaotic cloud of thoughts into a tightly multiplexed sequence, preventing the entire cognitive architecture from collapsing back into an undifferentiated, bleeding neural puddle.
Formal Statement: Separate representations are held simultaneously via high-frequency gamma oscillations (γ ≈ 45 Hz) nested within a slow theta wave (θ ≈ 6 Hz). Because the total duration of a theta cycle is constrained to ~167 ms and a gamma cycle requires ~22–25 ms for feedback inhibition recovery, the system imposes a hard biophysical ceiling of 4–7 processing slots — providing a strict, mechanistic explanation for Miller's (1956) 7±2 capacity limit that is grounded in neural oscillatory physics rather than arbitrary code constraint. Autonomous saccade selection is phase-locked to the deep trough of the theta wave, governed by the strict condition sin(2πfθt) < −0.90, ensuring memory encoding is protected from incoming sensory fragmentation and that spotlight movements cluster into rhythmic burst-pause patterns mirroring the microsaccadic rhythms observed in human fixation-period recordings.
The cross-frequency coupling (CFC) clock implemented in the model is not merely a pacing mechanism for saccadic eye movements; it functions as an information-theoretic capacity constraint on temporal binding-by-synchrony within capacity-limited cortical systems — a constraint on how many items such a mechanism could support, not a claim to have resolved the binding problem itself, which remains debated in the broader literature. In human working memory, separate representations must be held simultaneously without bleeding into an undifferentiated neural soup. The brain handles this by nesting high-frequency gamma oscillations (γ ≈ 45 Hz) within the phases of a slow theta wave (θ ≈ 6 Hz), as established by Lisman & Jensen (2013). Each slow theta cycle represents a coherent ensemble processing window; the constituent gamma sub-cycles function as distinct temporal slots, each carrying one working memory item as a specific ensemble of neurons firing within a precise gamma window. Without this strict oscillatory clock, the entire cognitive architecture collapses into a turbulent, undifferentiated neural storm.
[ Theta Cycle (~6 Hz — one full period — 167 ms) ]
|--------------------------------------------------------------|
Trough Peak
[WM Slot 1] —— [WM Slot 2] —— [WM Slot 3] —— [WM Slot 4]
(γ burst 1) (γ burst 2) (γ burst 3) (γ burst 4)
↓ ↓ ↓ ↓
HIGH-PRI SECONDARY TERTIARY FRINGE
[ Saccade Gate Opens: encoding optimal at trough-to-peak transition ]
[ sin(2πf_θt) < -0.90 → cfcDot fires → izh_v modulated +8 mV ]
Hard capacity constraint: ceil(T_theta / T_gamma) = ceil(167ms / 25ms) = 6 slots
Miller (1956) "7±2" = exactly this ratio: not a cognitive axiom but a biophysical ceiling.
Chaotic multi-channel input storm → serialised multiplexed sequence → distinct cognitive objects.
Because the total duration of a theta cycle (~167 ms) and the minimum biophysical window per gamma cycle (~22–25 ms, required for feedback inhibition recovery) are both physically constrained, the architecture imposes a hard ceiling on the number of items that can be sequentially serialised within a single theta window. Approximately 4–7 gamma slots fit within one theta wave — providing a mechanistic, oscillatory explanation for Miller's (1956) classic 7±2 capacity limit that is grounded in neural biophysics rather than abstract psychological axiom. Human intracranial recordings during working memory retention tasks confirm that gamma amplitude is phase-locked to specific components of the underlying theta rhythm (Axmacher et al., 2010). The framework's capacity ceiling is therefore not a design choice: it is the inevitable consequence of two independently measured oscillatory time constants interacting within a finite temporal window.
The spatial repositioning of the attentional spotlight — autonomous saccade selection in Wandering Mode — is directly gated by the theta phase layer. Saccade selection is strictly restricted to the deep trough of the theta wave, firing only when:
sin(2π × f_θ × t) < -0.90 [theta-trough gate: ~15% of each cycle] During trough window: cfcDot indicator turns gold θ-γ Locked badge activates izh_v[idx] += 8 × gammaBoost [gamma burst lowers spike threshold in target quadrant] spotlight.wanderInt reset to 90 + rand(60) frames Between troughs: spotlight.wanderInt extended to max(current, 180) frames saccades suppressed — natural burst-pause clustering of eye movements
This alignment reflects the biophysical finding that memory encoding and sensory sensitivity are optimal at the theta trough-to-peak transition — the phase at which NMDA receptor conductance windows are most permissive and local inhibition is at its nadir — whereas retrieval and consolidation dominate the descending phase. Restricting spotlight changes to the trough prevents incoming sensory inputs from fragmenting memory arrays that are actively being refreshed during other phases, grouping saccadic jumps into periodic windows and preventing continuous distractors from breaking down persistent working memory tracks.
This temporal organisation draws on the functional division of gamma rhythms established by Colgin (2016). Slow gamma (~25–50 Hz) coordinates top-down transmission from upstream prefrontal goal representations; fast gamma (~60–80 Hz) routes bottom-up sensory streams. By restricting spotlight movements to the theta trough, the architecture makes the model's 4-slot working memory ring directly interpretable as a theta-nested gamma multiplexing architecture: each slot corresponds to one gamma burst window within the active theta cycle, and high-priority items are encoded at the deepest trough (slot 1) — the phase most resistant to interference from the inhibitory peak.
The CFC strip beneath the Yerkes-Dodson bar shows a live scrolling theta waveform at 6 Hz. The waveform turns gold at each trough; the saccade-gate dot (cfcDot) pulses simultaneously. The θ-γ Locked badge enters its luminous purple state when a trough has been active within the last 90 frames, showing that the system is within a CFC-organised encoding window. The stats bar CFC readout switches from "-free" to "-lock" and turns amber. Between troughs the wander interval is visibly extended: spotlight saccades cluster rhythmically, appearing to "breathe" at theta frequency rather than moving continuously, matching the microsaccade periodicity (~150–200 ms inter-saccadic interval) observed in human fixation-period recordings.
The same critique pattern applies here as to Laws I and II, but the fix is even more direct, because the underlying relationship is already a bare mathematical ratio rather than a biophysical threshold in need of generalisation. The specific numbers — a 167 ms theta cycle, a 25 ms gamma cycle, a sin(2πfθt) < −0.90 logic gate — are one species' particular oscillatory parameters, not the law itself. Generalised across any oscillatory information-processing system:
Law of Temporal Binding Capacity: In any oscillatory information-processing system, the maximum number of distinct item representations (Nmax) that can be concurrently multiplexed within a single processing window is bounded by the ratio of the carrier period (τslow) to the minimum temporal separation required for signal distinctness (τfast):
Nmax ≤ τslow / τfast
This is now a dimensionless statement about wave mechanics: it makes no claim about theta or gamma specifically, and would apply equally to any two-tier oscillatory multiplexing scheme in any species or any artificial system, provided a slow carrier and a fast sub-cycle exist and must remain phase-distinguishable. Human cortex, under this reading, is simply the specific system where τslow ≈ 167 ms and τfast ≈ 25 ms, giving Nmax ≈ 6–7 — Miller's (1956) and Cowan's (2001) capacity limits recast as a consequence of the ratio, not as independent psychological axioms this framework happens to also reproduce.
The critique that the working-memory slot count was previously "a static, hardcoded frontend capacity array" — new Array(4).fill(null), entirely disconnected from any oscillator frequency named elsewhere in the documentation — is accurate, and has been addressed directly. workingMemory.slots is now sized by getDynamicCapacity(thetaHz, gammaHz), which computes floor(thetaPeriod / gammaPeriod) from two named, adjustable frequency constants (THETA_HZ = 6, GAMMA_HZ = 40), clamped to the empirically-supported 4–7 range. The capacity the interface displays is now a live consequence of §III.4's ratio rather than a magic integer sitting beside it in the documentation.
What this update does not do, and should not be mistaken for: it does not simulate two coupled noisy oscillators and derive the ceiling from their phase decoherence, which would require modelling jitter and drift between independent theta and gamma generators explicitly. getDynamicCapacity() evaluates the ratio directly from two frequency constants — a live computation, but still a direct evaluation of §III.4's formula rather than an emergent demonstration of why the ceiling exists from first-principles wave interference. The gap this revision closes is "the ratio is computed, not hardcoded"; the gap that remains, honestly, is "the ratio is asserted from constants, not derived from simulated oscillator collision." A more rigorous future implementation would model fθ and fγ as two independent noisy oscillators and derive the capacity ceiling empirically from where their relative phase becomes unrecoverable, rather than reading it off two fixed frequency constants as done here.
| Assessment | Score | Basis |
|---|---|---|
| Original self-assessment (as literal code) | 4.7 / 5.0 | Rewards the Lisman & Jensen / Colgin / Axmacher grounding and the Miller 7±2 derivation |
| Independent critique (as literal code) | 3.2 – 4.5 / 5.0 | Same grounding; marked down where the hardcoded logic gate is presented as though the ceiling emerges natively rather than being asserted (§III.5); marked up in reviews that recognised the ratio itself as close to a universal, species-independent physical law |
| Reformulated (threshold-free ratio, §III.4) | 4.5 / 5.0 | Consistently rated the strongest candidate for genuine Law status across every independent review consulted — the ratio Nmax ≤ τslow/τfast is dimensionless, falsifiable across species via electrophysiology, and requires no reference to this codebase at all |
Adopted score: 4.6 / 5.0. Revised up from 4.5, now that working-memory capacity is a live computation from named oscillator constants rather than a bare hardcoded integer (§III.5). This remains the highest of the three retained Laws, and every independent review consulted during this revision agreed on that ranking even where they disagreed on the exact number. The reason is structural: §III.4's ratio is the one law in the framework that was already, in its cleanest form, a relationship between two periods rather than a threshold on an engineered variable — the reformulation in §III.4 mostly makes explicit what was implicit, rather than performing the harder work of generalising away a genuinely arbitrary constant, as Laws I and II required.
§III.4's ratio Nmax ≤ τslow/τfast is the framework's most directly testable claim, since it requires no reference to this codebase's specific implementation at all:
These are precisely the kind of predictions the §III.5 "hardcoded gate" simplification cannot itself generate — a fixed logic gate asserts the ceiling but does not predict how it would shift under the manipulations above. A future implementation that models τslow and τfast as adjustable, physically-grounded parameters rather than fixed constants would let this simulation actually reproduce Predictions 1–2 internally, closing part of the §III.5 gap.
Chosen architectural strategies, not hard constraints — each could, in principle, be replaced by a different implementation without invalidating the three Laws above. Presented briefly and with their known category limitations named up front, in deliberate contrast to the expanded treatment given to Laws I–III.
Why this is a Principle, not a Law — the design-choice admission: Placing cognitive events on a continuous 2D coordinate canvas is a design decision, not a law of cognition. A different simulation of the same underlying theory could just as legitimately use a graph-based, non-Euclidean, or purely symbolic representation without violating any law of nature — which is precisely the test a genuine Law must fail to satisfy. This component is retained because it is a well-executed, biologically-inspired architectural choice that makes the framework's other components legible on a screen, not because the 2D canvas itself is an inescapable constraint the way Laws I, II and III are.
Two further category concerns, raised independently and judged valid on reflection, keep this component below the threshold for Law status even as an architectural choice. First, the Difference-of-Gaussians (DoG) Mexican Hat filter used to sharpen spatial focus models the centre-surround geometry of retinal ganglion cells — a low-level visual mechanism — and applies it to suppress literal pixel coordinates on a 2D screen. But top-down executive selection, the phenomenon this framework is actually trying to model, suppresses features or semantic categories, not physical locations in a two-dimensional plane. Borrowing early-visual-system machinery to stand in for object-based cognitive attention is a simplification worth naming rather than obscuring. Second, the NMDA coincidence-gated LTP cascade potentiates cells based on spatial adjacency on the canvas grid (an 8-pixel radius), whereas biological long-term potentiation requires synchronised pre- and post-synaptic activity at a specific, functionally-wired synapse — there is no claim here that grid-adjacent pixels correspond to axonal-dendritic connectivity. Potentiating a neighbouring cell because it happens to sit next to the target on-screen, rather than because it is functionally wired to it, is a spatial heuristic standing in for synaptic plasticity, not a literal implementation of it.
None of this makes the mechanism useless — it makes it exactly what a Principle is supposed to be: a chosen, well-motivated architectural strategy for making cognitive dynamics spatially and visually legible, rather than an inescapable constraint every possible implementation would have to obey. Within that honestly-scoped role, the mechanics remain worth documenting briefly.
Sustained localised heat exceeding a voltage-dependent activation floor triggers a three-stage cascade: DoG spatial sharpening (center-surround contrast on the coordinate grid), an NMDA-gated coincidence window (~33 ms, modelling the voltage-dependent Mg2+ unblock of Jahr & Stevens, 1990), and CaMKII bistable autophosphorylation, converting transient heat into durable structural coordinates (heatmap.ltp) that establish 2.5× facilitated pathways for future traversal. The structural conversion follows a quadratic acceleration equation:
ΔLTPi = γauto × LTPi² + αLTP × (Heati / MaxHeat)
γauto = 0.0018 | αLTP = 0.0012/frame
Once a trace crosses the bistability threshold (~76/255), it becomes self-sustaining even after the driving heat decays — a computational echo of the CaM-trapping mechanism described by Bartol, Sejnowski, Rangamani & Kennedy (2025, Frontiers in Synaptic Neuroscience), in which steric hindrance slows dephosphorylation by protein phosphatase 1 (PP1) and prolongs phospho-CaMKII lifetime. High-LTP cells also dampen their own decay rate (krec = KRECBASE × (1 − LTPi × ωscale)) and deposit heat at 2.5× the baseline rate on future traversal — the structural substrate underlying Law I's Autonomous Recapture and the felt effortlessness of practiced attention.
By deploying the simulation on a continuous 2D coordinate space rather than discrete boolean nodes, the framework enables true gradient physics: Law I's Lyapunov potential field can flow continuously rather than snapping between nearest-neighbour states, Law II's DoG surround has a real geometric radius to collapse rather than a count of disconnected nodes to disable, and Law III's saccade targeting has an actual spatial gradient to follow rather than an arbitrary graph edge to traverse. This is Principle I's honest contribution: not a law the other components are forced to obey, but the shared representational substrate that makes their dynamics visible, differentiable, and mutually coupled on a single canvas. Score 3.4/5.0 reflects that contribution weighed against the category concerns above — a well-built, useful architectural choice, correctly no longer presented as an inescapable law of cognition.
Why it is a Principle, not a Law: In an unconstrained Hebbian system, positive feedback would let the spotlight permanently lock onto the first salient stimulus it encounters — the rigid, repetitive capture seen clinically in OCD and addiction. Principle II is the chosen countermeasure: a Bienenstock-Cooper-Munro (1982) sliding threshold θBCM that tracks a running average of local activity, so that chronically overactive cells become progressively harder to potentiate and eventually drift into depression (LTD) instead — a Plasticity Flip that actively dismantles the over-saturated basin, drains its LTP trace, and liberates the spotlight to explore fresh canvas. Unlike Laws I, II & III, this is a specific engineering strategy the system employs to remain flexible; a different anti-saturation rule (e.g. simple weight normalisation, or a fixed decay ceiling) could in principle replace it without contradicting anything upstream.
w(x) = f(h(x), _BCM(x)) x_pre f(h,) = h(h-) [above LTP; below LTD]
_BCM update (every 30 frames):
if mean(h(quadrant)) > 0.72maxHeat for > 300 frames:
_BCM 1.08 [threshold climbs]
ltp -1.2 [LTP vein drains]
timer 0 [quadrant freed for fresh accumulation]
The ~5-second (300-frame) exhaustion window is loosely modelled on the induction kinetics of mGluR-dependent LTD (Huber et al., 2000), and the overall strategy mirrors Tononi & Cirelli's (2014) Synaptic Homeostasis Hypothesis: potentiation accumulates during active engagement, and periodic downscaling trims runaway saturation to preserve signal clarity — here compressed to the timescale of a single attentional episode rather than a sleep-wake cycle.
Known limit — the non-synaptic-field caveat: BCM's biological formulation governs weight changes at a directed, weighted synapse between a specific pre- and post-synaptic unit. This model has no such structure — no axonal-dendritic wiring, no discrete weighted connections — only a scalar LTP field defined at each canvas coordinate. Applied here, the "BCM rule" is honestly better described as a localised dampening variable that prevents any one region of the heatmap from saturating indefinitely, rather than a literal synaptic plasticity rule. It is a clever, useful stabilisation strategy for keeping the simulation's canvas exploratory rather than a rigorous instantiation of BCM metaplasticity. Score 3.3/5.0 reflects that gap: the homeostatic strategy (potentiate, then periodically downscale) is well-motivated and effective; the specific mechanism borrows BCM's name and equation without its underlying synaptic substrate.
The classic Yerkes-Dodson inverted-U between arousal and performance is treated here as a structural consequence of the biphasic kinetics of catecholamine receptors in dorsolateral prefrontal cortex. At low LC/NE and VTA/DA tone (hypo-arousal), receptor occupancy is too sparse to sustain recurrent pyramidal firing against background noise — a diffuse, low-gain field. At moderate, task-locked tone (optimal arousal), high-affinity α2A and D1 receptors close HCN channels and sharpen NMDA-mediated recurrent firing, carving a crisp focus zone with a deep lateral-inhibition well. At high tone (hyper-arousal), lower-affinity α1/β1 receptors and over-saturated D1 kinetics invert the signalling cascade, flooding cAMP, forcing HCN channels open, and uncoupling the prefrontal network from its own recurrent loops (Arnsten, 2011).
Low (Hypo) Optimal (Eustress) High (Hyper) Diffuse, low gain Crisp focus, deep well Uncoupled, noisy shuntFactor = 1.0 shuntFactor = 1.0 shuntFactor 0.05
Mapping into the model: The global neuromodulatory gain γ scales shuntFactor, the amplitude term on the inhibitory ring of the DoG Mexican Hat filter. As γ exceeds ≈0.80, the inhibitory surround visibly shrinks and heat diffuses radially outward — the canvas rendering of Arnsten's (2011) prefrontal disconnection under hyper-arousal. The Yerkes-Dodson status bar tracks the system's live position on this curve.
Known limit — area-wide phenotypic homogeneity: A related mechanism elsewhere in the codebase applies Izhikevich firing-type presets (RS, FS, IB, CH, LTS) as global multipliers on the entire field simultaneously, rather than as a localised interplay between distinct, co-located cell populations. Cortical computation depends on the tight, spatially-interleaved cooperation between excitatory pyramidal cells and inhibitory interneurons of different types at the same location; forcing the whole simulated field into a single global "phenotype" at a time is a simplification that trades this local heterogeneity for tractability. It reproduces the right qualitative gain shifts (sharper vs. more diffuse fields) without the underlying cell-type-specific microcircuitry that produces them biologically. This is acknowledged rather than papered over, and is the primary reason this Extension is scored below the three retained Laws.
Formal statement: Every coordinate cell's effective output is gated by two coupled Tsodyks-Markram parameters — fractionally available transmitter stores (R) and calcium-utilisation efficiency (u). Continuous activation depletes R, taxing high-frequency processing and forcing even the most stable Law I attractor to eventually starve and release the spotlight into transitive flight:
Output_i = Heat_i (R_i u_i) dR_i/dt = (1-R_i)/t_rec - u_i R_i d(t) dU_i/dt = (U-u_i)/t_facil + U(1-u_i)d(t) High-freq input R0 Output collapses Lyapunov well flattens transitive flight
This is the fast-timescale mechanism that dynamically flattens Law I's Lyapunov potential field (§I.3): fresh resources (R≈1.0) sustain the deep basin; depleted resources (R→0) collapse it, even while raw accumulated heat remains high — the difference between a vortex that is structurally "alive" but dynamically "starved." James's (Ch. IX) distinction between substantive resting-places and transitive flights of passage maps directly onto full-R and depleted-R states respectively, and this rhythm couples to Law II: if stamina is simultaneously low, the transitive flight cannot resolve cleanly, and the spotlight wanders turbulently rather than executing a clean saccade to fresh ground.
Known limits: As with Principle II, the Tsodyks-Markram equations here govern a scalar field value at a canvas coordinate rather than a directed, weighted synapse between two specific neurons — without axonal-dendritic wiring, this is a spatial-heuristic use of STP's mathematics, not a literal synaptic implementation. Separately, all cells share uniform rate constants (τrec, U, τfacil), while biological STP parameters vary enormously by synapse type and region (facilitating thalamocortical inputs vs. depressing cortical recurrent collaterals behave qualitatively differently). Both simplifications are made for tractability at 60 FPS and are named rather than concealed. Score 3.5/5.0.
Three Laws, two Principles, and two Extensions now form the framework's regulatory architecture &mdash. Law I explains how thoughts are born and held by attractor physics. Law II explains why they must eventually die under metabolic conservation. Law III enforces the temporal operating system that serialises representations and hard-caps working-memory capacity. Principle I provides the spatial canvas on which the three Laws become visible and mutually legible — a design choice, honestly labelled as one. Principle II prevents pathological crystallisation by flipping oversaturated attractors from LTP to LTD. Extension I shapes the global gain on the system according to the Yerkes-Dodson inverted-U. Extension II paces the local rhythm of formation and dissolution at the sub-vortex level. The three Laws carry the framework's strongest scientific claims and receive the most extensive treatment above; the Principles and Extensions are retained as useful, honestly-scoped architectural choices rather than claims to physical necessity.
+------------------------------------------------------------------------------+
THE ATTENTIONAL FRAMEWORK MATRIX (POST-REVISION)
+------------------------------------------------------------------------------+
THE THREE LAWS (inescapable constraints)
+--------------------------------+ +--------------------------------------+ +----------------------------------+
LAW I — Attractor Topology LAW II — Resource Constraint LAW III — Temporal Binding
Adopted Score: 4.5 / 5.0 Adopted Score: 4.5 / 5.0 Adopted Score: 4.6 / 5.0
V(x) crit-depth, threshold-free Monotonic inhibitory decay, N_max _slow / _fast
CANN — Amari 1977 EVC-vs-ego-depletion honestly named Lisman & Jensen 2013
Krasnow-tradition validated Bridges EVC + Load Theory Highest cross-review consensus
+--------------------------------+ +--------------------------------------+ +----------------------------------+
| couple bidirectionally |
PRINCIPLES & EXTENSIONS (chosen strategies, honestly scoped)
+--------------------------------+ +--------------------------------------+
PRINCIPLE I — Field Continuity PRINCIPLE II — BCM Homeostasis
Score: 3.4 / 5.0 (was Law III) Score: 3.3 / 5.0
2D canvas = design choice Non-synaptic scalar field, not
DoG-on-pixels category caveat literal synaptic plasticity
+--------------------------------+ +--------------------------------------+
+--------------------------------+ +--------------------------------------+
EXTENSION I — Yerkes-Dodson EXTENSION II — STP Dynamics
Score: 3.6 / 5.0 Score: 3.5 / 5.0
Global gain modulator Local Lyapunov-flattening engine
Phenotypic-homogeneity caveat Uniform-rate-constant caveat
+--------------------------------+ +--------------------------------------+
REMOVED: former "Law V — Mental Relativity"
(a derived readout with no independent mechanism; not a Law)
An earlier, deliberately unsparing external review scored the original five Laws as a set at 2.0 / 5.0, concluding that the framework "uses the language of premium cognitive psychology but compiles as a fluid-particle sandbox game." That verdict was fair as a critique of the five-Law framing taken as a whole, and it is not retracted here. The revision in this section does not dispute that score by arguing the original code was better than the critique claimed; it responds to the critique by doing what the critique itself recommended: removing the weakest components rather than defending them, and reformulating the survivors to state their claims independent of any specific hardcoded threshold.
The result — an adopted aggregate of 4.53 / 5.0 across Laws I–III, up from 4.4 in the previous revision now that part of each Law's implementation gap has actually been closed in code rather than only in prose — is higher than 2.0 for two separable reasons, and conflating them would be dishonest. First, roughly half the gain is arithmetic: averaging only the three strongest components necessarily raises the mean once the two weakest (former Law III at an assessed 2.0–3.2, and former Law V at 1.5–2.8 across reviews) are removed from the set being averaged. Second, and more substantively, each surviving Law was genuinely reformulated — not merely relabelled — to state a threshold-free relationship (§I.10, §II.10, §III.4) and to document its discretisation gap explicitly (§I.11, §II.11, §III.5) rather than presenting a hand-tuned constant as though it were a measured biological parameter. The 4.53 aggregate should be read as: of the claims this framework makes, its three strongest — now stated more carefully, and partially demonstrated in running code — average 4.53, not as: the framework as a whole now merits 4.53. Those are different claims, and the difference matters for anyone using this section to evaluate the project's scientific standing rather than its narrative packaging.
Aggregate validity, Laws I–III only: 4.53 / 5.0 (adopted). Aggregate validity, all seven retained components: approximately 3.9 / 5.0, a figure this section considers the more representative single number for the framework as a whole, since it does not silently exclude the Principles and Extensions the system still depends on to run.
The three retained Laws were not selected merely because each scored acceptably in isolation; they were retained because they form a closed, non-redundant coupling — each necessary, none sufficient alone, in a way the removed components did not participate in as tightly. The table below states each pairwise coupling explicitly, extending the Law I–Law II coupling already detailed in §II.7 to include Law III:
| Coupling | Direction | Mechanism |
|---|---|---|
| Law I ↔ Law II | Bidirectional | Adaptive vortices (Mode 3 Autonomous Recapture) drop Law II's EVC cost toward zero; maladaptive vortices drain stamina faster than recovery, triggering the gating-failure cascade that strips Law I of its inhibitory wall (§II.7 gives the full bidirectional trace). |
| Law III → Law I | One-directional (temporal gates spatial) | Autonomous saccade selection is phase-locked to the theta trough (§III.2); Law I attractors can only be populated with fresh routing targets during these gated windows, meaning Law I's spatial dynamics are metered by Law III's temporal clock rather than free-running. |
| Law III → Law II | One-directional (temporal gates metabolic) | Because saccade-driven exploration is restricted to theta-trough windows, the rate at which Law II's EVC cost accrues is itself paced by Law III — a system with a faster or slower theta rhythm would drain and recover stamina on a correspondingly different schedule, even with identical Law II parameters. |
| Law I & Law II → Law III | Constraint, not causation | Law III's capacity ceiling determines how many Law I attractors can be actively maintained at once and how quickly Law II's resource pool must service them; Laws I and II do not feed back to alter Law III's oscillatory periods themselves, keeping the temporal clock the one truly independent axis in the system. |
This is the structural argument for exactly three Laws rather than two or four: Law I alone describes spatial topology with no account of either its metabolic cost or its temporal pacing; Law II alone describes resource conservation with no account of what shape the conserved resource takes or when it can be spent; Law III alone describes a temporal ceiling with no account of what fills the slots it creates or what it costs to fill them. None of the three, read in isolation, produces the framework's characteristic behaviours — flow, rumination, burnout — documented in §I.7 and §II.6. All three together combines to produce the previous effects.
Three specific, named gaps previously separated each retained Law's adopted score from a clean 5.0. This revision closes part of each, without pretending to close all of them: Law I's vortexT is now a live statistical proxy recomputed each frame from the field's own energy landscape rather than a single hand-set constant (§I.11), though the mixing coefficient and clamp band remain tuned, not measured; Law II's DoG surround and saccade-override gate now scale continuously with stamina rather than snapping at a fixed 30% boundary (§II.11), though the underlying drain rate itself is still constant rather than EVC-proportional (§II.9); Law III's working-memory capacity is now a live computation from named theta/gamma frequency constants rather than a bare hardcoded integer (§III.5), though it still evaluates the ratio directly rather than deriving it from simulated oscillator decoherence. None of these were trivial changes, and none is claimed to be complete — each section above states precisely what moved from "asserted" to "computed," and what remains asserted still. That precision, updated alongside the code rather than left to drift from it, is the ongoing deliverable of this document.
This reference list is organized by implementation status. Papers tagged Implemented correspond to mechanisms that are directly present in the current proj2_v58 frontend and/or the paired neuron_21_6 backend. Papers tagged Partial inform the architecture or behavior of the model but are represented in simplified form. Papers tagged Conceptual provide theoretical framing, historical context, or interpretation rather than a one-to-one code implementation.