01 / 09·Background
Change background
5%

How does an internal model learn the true temporal structure of the world from limited samples?

So that rare events are neither ignored nor over-amplified.

Project roadmap

Motivation

Where everything starts

How brains build accurate internal models from limited experience is a central question in neuroscience.

  • One striking event, like a near-miss with a car, can reshape a child's predictions and behavior.
  • Sensory input is finite and memory bounded, so learning draws on a narrow slice of the world.
  • Rare events are sampled far less than common ones.
  • The resulting biased priors yield internal models that diverge from true causal structure.
A child chases a ball toward the crossing.

An ordinary day

A child runs after a ball. The crossing looks like every other crossing; nothing suggests danger.

A car brakes suddenly: the rare event.

Rare event happens

The child is almost hit by a rushing car.

At night the scene is replayed in a dream.

Internal simulation

At night the scene comes back. The brain replays what it saw and rehearses what it might see again.

Next time the child holds the ball and waits.

Reshaped behavior

The child holds the ball at the kerb. A single memory has changed a lifetime of predictions.

Three patterns of rare-event estimation

The same near-miss, three internal models of how likely it is to happen again.

Under-estimation

Blind to real danger

The event is filed away as a one-off. Next time the child walks out just the same.

Good estimation

Make wise decisions

The event is rare but real. It is remembered, replayed, and acted on when it matters.

Over-estimation

Everything is a threat

The event colours every scene. Ordinary streets now feel dangerous.

Task design

A Markov chain is the ground truth. The network must build an internal model of it from limited samples, and get the rare transitions right.

Hybrid cyclic structure

(A) The ground-truth (GT) Markov chain, shown at three rarity levels (N = 5, 10, 15; rare share 20%, 10%, 6.7%); common/rare events are blue/red.

Ground-truth Markov chains for clique sizes 5, 10 and 15.
Ground-truth connectivity matrices for the three chain sizes.

Connectivity matrix

(B) The GT connectivity matrix; dense diagonal blocks (blue) mark common cliques, and sparse red entries mark rare chains.

Per-event probability

(C) Per-event stationary probability, the marginal occurrence; the dashed threshold refers to GT occurrence of a rare event.

Ground-truth per-event probability, N = 5, rarity 20%Ground-truth per-event probability, N = 10, rarity 10%Ground-truth per-event probability, N = 15, rarity 6.7%

Try it live

Change the chunk size and watch the chain, its connectivity matrix and the per-event probabilities update together.

Open in the simulator

Input generation

How sequences are generated from the Markov chain, and how performance is measured.

Event raster sequence

(D) A representative input sequence, shown as an event raster.

Event raster sequence of the input stream.

Performance measurements

(E) Level-1 (marginal) occurrence: the common and rare occurrence shares are shown, with the GT rare share marked by the dashed line, and the signed occurrence deviation from the GT is displayed over time, upward red markers denoting over-representation (> 0) and downward blue markers under-representation (< 0).

(F) Level-2 (conditional) occurrence: the four transition-type occurrences are displayed for the input against the GT (translucent), and their occurrence divergence, a KL divergence, is shown over time. Definitions are given in Methods.

Level 1: marginal occurrence of common and rare events, and its deviation from ground truth over time.Level 2: conditional event-to-event occurrence and its KL divergence from ground truth over time.

Watch the stream being generated

A random walker on the ground-truth chain produces this sequence step by step, with the raster and both measurement levels updating live.

Open in the simulator

BCPNN

The internal model. A Bayesian Confidence Propagation Neural Network, biologically plausible attractor dynamics with local Hebbian / Bayesian learning. Each unit holds a support value, an intrinsic bias (log-prior), and synaptic weights that update from co-occurrences. After learning, the network runs autonomous replay driven by these parameters alone.

One cortical minicolumn, about 100 tightly interconnected neurons, is treated as one computational unit. Minicolumns group into hypercolumns, where local competition turns their activities into a probability distribution over one attribute.

Cross-section of a single neocortical minicolumn, showing layers I, II/III, IVA, IVB, IVCα, IVCβ, V, VI and VIb with excitatory and inhibitory neuron counts per layer.
The cortex is built from millions of minicolumns. Each is a vertical bundle about 40 µm wide, packing 80 to 100 tightly interconnected neurons that share response properties. We treat one minicolumn, not one neuron, as one computational unit, the abstraction used in associative memory ANNs.
3D rendering of a hexagonal array of cortical minicolumns tiling the cortical sheet, with three highlighted columns rendered in detail.
Minicolumns are grouped into larger modules called hypercolumns, about 500 µm wide. Inside one hypercolumn, the minicolumn activities are normalized by local competition, so together they form a probability distribution over the values of one attribute (for example, all edge orientations in a small patch of vision). This repeating motif appears across the neocortex and has been proposed as a canonical cortical microcircuit.

With Hebbian-Bayesian plasticity the same network learns spatial correlations, giving pattern completion under noise, and temporal order, letting it replay learned sequences from its own connectivity.

BCPNN spatial representation learning — Ravichandran, Lansner & Herman, Neurocomputing + Frontiers in Neuroscience.
BCPNN learns to represent spatial correlations. Stacking hypercolumn modules with Hebbian-Bayesian plasticity, the network discovers compositional features of the input space, pulling co-occurring statistics into shared minicolumn populations and pushing distinct ones apart. The hidden code that emerges supports pattern completion under noise, occlusion, and clutter.[6, 7]
BCPNN temporal sequence learning — Martinez, Lansner & Herman, PLOS ONE.
BCPNN learns to represent temporal sequences. Extended in time, the same probabilistic learning rule captures order: synapses become biased between past, current, and upcoming states. Once trained, the network autonomously replays the learned sequence by following its own connectivity matrix, so the temporal structure surfaces directly from the weights.[8]
BCPNN Mechanism 1: Local Competition
BCPNN Mechanism 2: Sequence Recall Dynamics

During training, Hebbian plasticity converts the externally driven firing sequence into directed synaptic weights between units. During recall, no external drive is needed, and one minicolumn's firing propagates through its strongest learned synapse to the next, traversing the entire chain from a single seed cue[8].

The BCPNN learns by estimating probability distributions from data, then turns those estimates into synaptic weights and biases. The six equations below specify the model.

Support — total drive into a unit (lateral input + bias + external cue + noise), low-pass filtered with time constant $\tau_s$:

$$ \tau_s \frac{ds_j}{dt} = \beta_j + \sum_i w_{ij}\, o_i - s_j + G_I\, I_j(t) + \sigma(t) $$

Output — softmax (winner-take-all) across the units of one hypercolumn, sharpness $K$:

$$ o_j = \frac{e^{K s_j}}{\sum_i e^{K s_i}} $$

Marginal probability — running estimate of how often unit $j$ is active, with slow time constant $\tau_p$:

$$ \tau_p \frac{dp_j}{dt} = o_j - p_j $$

Joint probability — running estimate of how often units $i$ and $j$ co-fire (Hebbian trace):

$$ \tau_p \frac{dP_{ij}}{dt} = o_i\, o_j - P_{ij} $$

Synaptic weight — log-ratio of joint to independent probability (pointwise mutual information):

$$ w_{ij} = \log\!\frac{P_{ij}}{p_i\, p_j} $$

Bias — log-prior probability of the unit:

$$ \beta_j = \log p_j $$

The weight rule is online and local: each synapse needs only its pre- and post-synaptic activity. The softmax enforces competition within a hypercolumn, mirroring the cortical-minicolumn picture above.

Adaptive Learning via Hebbian and Bayesian

How BCPNN learns from the limited sampled sequences — Hebbian/Bayesian updates shape functional units' weights and biases. The network dynamics can be captured at chosen training durations.

Local Learning in BCPNN
Caption box here (could be live)
The plot-a1
Firing Patterns of 3 Consecutive Units
Caption box here (could be live)
The plot-b1

Synaptic weights follow the log-ratio of joint to independent firing, so after learning they encode event-to-event transition probabilities. The intrinsic bias follows each unit's log-prior, its overall activation rate.

The plot-c1
Caption box here (could be live)
GT and Learned Representation Comparison
Ground Truth
Learned
Connectivity Matrix
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Weights (Hebbian, Joint Probability)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Per-Event Probability
Bias (Bayesian, Prior Probability)

Simulation

The internal model has been exposed to a limited set of input samples during training. After that, given a short random cue, the network begins to autonomously simulate, replaying what it has seen through its learned representation. However, this vanilla replay process has a problem. Looking at the rare-event estimation deviation, the model either over-estimates or under-estimates them. The question now becomes: how can we correct the estimation errors?

See it run

Both trial cases, over-estimation and under-estimation, replay live in your browser on the simulator page. Drag the noise knob and watch the rare-event estimate move.

Open the live simulator

Results

We evaluate the model's performance on two levels:
• estimates of event probabilities: Rare Event estimation.
• event-to-event associations: tx4 KL divergence.

Key findings
Introducing a moderate level of noise into the internal simulation process improves accuracy.
These benefits diminish when noise becomes excessive.
Moreover, moderate noise broadens the parameter regime that supports an accurate internal model, such that accurate representations become less sensitive to parameter selection. In other words, adding noise improves the tolerances of the system.
Full results

Moderate noise widens the tolerant regime for four mechanistically different parameters. Each block (τp, gβ, gbayesian, gI) maps the noise level σ (x-axis) against the parameter value (y-axis) at three rarities (N = 5, 10, 15; columns). The top row shows the Level-1 signed deviation on a diverging scale, where white means accurate; the bottom row shows the Level-2 KL divergence on a log scale, where pale means accurate. The hatched area on each Level-2 panel marks the 5% most accurate zone. For all four gains a band of moderate σ minimises both measures, and that accurate zone survives across rarities, so the noise correction does not hinge on any single dial.

Mechanism plots
Input
Groundtruth
Input
Groundtruth
No noise
Optimal noise
Excessive noise

Biological counterparts

Neural computation is noisy, so a mechanism that uses noise invites a biological reading: its sources, the neuromodulators that set the dials, and the diseases that move them.

Neural noise

Where σ comes from and why a moderate amount helps.

01

Neurons are inherently noisy

Vesicle release, channel gating and network fluctuations combine into one effective noise with a single amplitude [21]. That amplitude is our σ, applied to each unit's activation as in an earlier BCPNN sequence network [8].

02

Stochastic resonance

Our inverted U is the signature of stochastic resonance: moderate noise lifts a weak signal, excessive noise drowns it [22]. The same optimum appears in single neurons, network synchrony, tinnitus and other internal-simulation models.

03

Noise rises with age

Cortical 1/f noise rises with age and tracks working-memory decline [18]; it is elevated in Parkinson's disease [19], and imprecise firing alone causes ataxia [26]. Noise that drifts upward slides off the optimum.

A bounded, nonzero amount of replay noise is what keeps rare events in the replay.
TOLERANT BAND σ = 0deterministic replay: rare edges lost moderate σrare-event fidelity recovered excessive σlearned structure dissolves replay noise σ rare-event fidelity
Neural noise across levels of organization
Aspect of σ
Cellular & molecular
Circuit & network
Systems & behavioural
Sources
channel gating, vesicle release
network-state fluctuations
trial-to-trial variability
Function
stochastic resonance in single neurons
network gamma synchrony
perceptual and clinical stochastic resonance
Pathology
channelopathy: irregular firing
flatter 1/f slope
disease-level broadband noise

Neuromodulation through a shared mechanism

The model's parameters read as facets of one mechanism, each modulator distinct through its own receptors [27].

DA

Dopamine

touches gβ and τp

Tonic dopamine sharpens the weight placed on the stored prior, the precision on priors [28, 29, 30], which maps onto gβ. It also sets how long the plasticity window stays open [31, 32], which maps onto τp.

ACh

Acetylcholine

touches gw (inside gbayesian), gI and ga

High cholinergic tone drives encoding from input; low tone releases the recurrent replay our simulation runs on [33]. One switch lowers gw, raises gI and relieves ga, but too little tone during learning corrupts training.

NE

Noradrenaline

touches σ · the most tentative edge

Arousal plausibly sets the noise level, with detection best at intermediate arousal [34]. Noradrenaline is the candidate driver, and it may share a source with dopamine [35, 36].

Parameters mapped to neuromodulators and disease; each row is a testable hypothesis.
ParameterRole in BCPNNModulatorHypothesisPredictionDisease
τpprobability-trace timescaleDAgates the plasticity windowslower timescale, slower learningPD
gβprior belief (bias)DAintrinsic excitabilityless DA, weaker priorPD
gbayesianinternal-model precisionDA AChprior × evidence gainmoderate gain bestPD
gaspike-frequency adaptationACh NEsuppresses sAHP and M-currenthigh ga frees stuck attractorsAD
gIinput / cue gainACh NEgain on afferent inputlow gain corrupts trainingADHD, AD
σreplay-noise amplitudeNEstochastic resonance from arousal-linked variabilityfidelity peaks at moderate arousalPD, ADHD

Disease models

Push the gains or the noise out of the tolerant band and rare events are mishandled.

Parkinson's disease as a convergent test

Dopamine loss weakens the prior (gβ, τp): patients learn the odds yet fail to use them, over-weighting the rare [20], while subthalamic broadband noise rises with severity [19].

Cholinergic loss [37, 38] lowers gw and gbayesian, and blocking acetylcholine likewise over-weights rare locations [39]. Both push the simulation to over-represent rare events.

Left: model prediction, Level-2 divergence over noise level against the dopaminergic timescale and the cholinergic-linked precision, with arrows showing where disease carries the operating point out of the tolerant zone. Right: hypothesis, dopamine and acetylcholine fall and noise rises until the trajectory exits the tolerant range.
Left, model prediction: arrows show where disease carries the operating point out of the tolerant zone. Right, hypothesis: dopamine and acetylcholine fall and σ rises until the trajectory exits the tolerant range.

References