a: Raster plots of representative trials in the expected (left) and unexpected (right) conditions in response to the same stimulus at t=0. Stimulus-selective clusters (red tick marks, spikes) activate earlier than non-selective clusters (black tick marks, spikes) in response to the stimulus when the cue precedes the stimulus. b: Comparison of activation latency of selective clusters after stimulus presentation during expected (pink) and unexpected (blue) trials (mean±s.e.m. across 20 simulated networks, two-sided t-test, p=5.1x10-7). Latency in expected trials is significantly reduced. c: The effective energy landscape and the modulation induced by stimulus and anticipatory cue on two-clustered networks, computed via mean field theory (see Methods). Left panel: after stimulus presentation the stimulus-coding state (left well in left panel) is more likely to occur than the non-coding state (right well). Right panel: barrier heights as a function of stimulus strength in expected (`cue ON’) and unexpected trials (`cue OFF’). Stronger stimuli (lighter shades of cyan) decrease the barrier height Δ separating the non-coding and the coding state. In expected trials (dashed lines), the barrier Δ is smaller than in unexpected ones (full lines), leading to a faster transition probability from non-coding to coding states compared to unexpected trials (for stimulus ≥ 4% the barrier vanishes leaving just the coding state). Panel b: *** = p < 0.001, two-sided t-test.