betaFeedback

WorksAgricultural and Biological Sciences

A single inference process underlies the behavior and neural circuits of working memory

Abstract

Working memory holds past inputs online for future behavior. Despite decades of research, accounts of working memory remain divided across levels of analysis, with long-standing debates on whether its capacity reflects discrete slots or continuous resources, how attention improves recall, and whether its representations rely on persistent neural firing or activity-silent states. Here we show that MemGP, a theory that is specified at the computational, algorithmic, and circuit levels of analysis simultaneously, can explain diverse behavioral and neural phenomena in working memory. At the computational level, MemGP casts working memory as probabilistic inference over a continuous function on feature space, with a variational objective that balances memory strength against a Gaussian-process prior. At the algorithmic level, writing, storing, and reading of memories correspond to approximating this posterior with a finite set of inducing points, the resource that all items share. In simulations, MemGP reproduces load-dependent precision loss, attentional benefits during maintenance, and inter-item attraction and repulsion, in each case revealing multiple complex computational dependencies. At the circuit level, the algorithm analytically (without training) maps onto a recurrent circuit, including its architecture and dynamics. Beyond reproducing neural phenomena such as delay-dependent drift, this analytical map deduces center–surround connectivity, a property long assumed in attractor models, and a structured combination of persistent activity and synaptic weights to hold memories. Thus, a single inference objective not only jointly predicts the behavioral and neural signatures of working memory, but also addresses, across several instances and different levels of analysis, existing competing explanations.

Introduction

Human behavior often depends on information that is no longer present in the sensory input, and working memory retains this information for short periods. Despite this centrality to cognition and decades of research, multiple aspects of working memory remain debated. Set-size-dependent limits on recall have been attributed to a fixed number of discrete slots [1, 2] or a continuous resource [3, 4]. Goal-directed attention can improve recall after encoding has ended [5, 6], and this benefit has been attributed to the cued memory being strengthened [7, 8] or protected from decay [9, 10]. Retention across the delay has been attributed to persistent neural firing [11, 12] or activity-silent states [13, 14]. Harder still, these debates span the levels at which a cognitive capacity can be analyzed: the computational problem it must solve, the algorithm and representation that realize a solution, and the neural circuits that implement the algorithm [15, 16]. Existing accounts of working memory mostly address these levels separately. Studies that relate these levels [17, 18, 19, 20] generally connect only a pair and target mainly the capacity limit. A theory that connects all three levels and explains the broad phenomena of working memory beyond the capacity limit remains a challenge out of the reach of current theories.

Here we propose MemGP, a theory of working memory that addresses this challenge. We start from the computation that working memory performs and derive the algorithm and the circuit from it. At the computational level, MemGP infers a posterior distribution over a memory-strength function on a continuous feature space, using a variational objective that rewards agreement with the evidence and penalizes departure from a Gaussian-process (GP) prior [21]. This posterior stores content and uncertainty jointly [22, 23]. At the algorithmic level, a finite set of inducing points [24], the resource that all items share, approximates the posterior. Encoding (writing) and maintenance (storing) update this approximation by optimizing the objective, and retrieval (reading) samples from it. At the circuit level, the algorithm maps analytically, without training, onto a recurrent circuit, where gradient descent on the variational objective determines the dynamics of the network.

In simulations of a continuous-reproduction task [2, 3, 25], MemGP reproduces load-dependent precision loss, attentional benefits during maintenance, and inter-item attraction and repulsion. The by-construction interpretability of MemGP allowed us to localize each effect to a component of the posterior, in addition to predicting complex dependencies between task parameters and behavioral phenomena. For example, we find that goal-directed attention, implemented as a reweighting of the maintenance objective, acts mainly on the uncertainty of the cued memory: its uncertainty falls more than that of uncued memories, whereas its expected strength declines over the delay with no significant difference from uncued memories. This result provides a novel account of attention in working memory that differs from existing perspectives suggesting strengthening of the cued memory [7, 8] or protection of its strength from decay [9, 10]. In the recurrent circuit derived from MemGP, the represented feature drifts with delay, which resembles delay-dependent drift reported in prefrontal recordings [26]; moreover, center–surround connectivity, a convenient modeling choice made in attractor models [27], follows from this analytical mapping of the algorithm onto the circuit. The circuit holds a memory in a structured combination of persistent activity, which represents expected strength, and a rapidly updated state, interpretable as fast synaptic weights, which represents uncertainty. A single inference process thus connects the behavioral and neural signatures of working memory and bears on each debate: a discrete resource supports continuous precision, attention during maintenance changes mainly the uncertainty of a memory, and persistent activity and fast synaptic weights represent different components of the posterior.

MemGP framework

MemGP specifies how perceptual evidence is written into a memory, how that memory is maintained during the delay, and how it is read out for report. Encoding forms a posterior over memory-strength functions from sensory evidence, maintenance rehearses that posterior without new sensory input, and retrieval samples the posterior to generate a color report.

Memory strength and uncertainty

Memory strength is a latent function ff on the feature space (Figure 1a). Here, we consider the continuous-reproduction task (Figure 2a), in which an array of NN colored items appears briefly. After a blank delay, a location probe identifies an item whose color must be reported on a continuous wheel. So, each input to the latent memory strength function ff is a location–color pair x=(ℓ,c)\mathbf{x} = (\ell, c); the value f(x)f(\mathbf{x}) is a memory-strength field: how strongly the system holds that an item of color cc appeared at location ℓ\ell. We place a GP prior over ff with a product of periodic kernels matching each dimension’s circular geometry:

Figure 1. The MemGP framework. (a) Encoding as inference. Two colored items are observed and inferred as a GP posterior over the location ×\times color torus. Surface height is the posterior mean, with a localized peak at each item, and color indicates memory uncertainty (posterior standard deviation). (b) A finite inducing representation supports a continuous function. The schematic shows memory strength across the feature space and at M=100M = 100 inducing points. The regular grid illustrates initialization; inducing positions are updated in the behavioral simulations. Color indicates memory strength. (c) Encoding infers the posterior from perceptual evidence; maintenance uses the preceding posterior mean as rehearsal targets, with selective attention increasing the likelihood weights near the cued location and KL regularization penalizing departure from the prior; retrieval draws a joint posterior sample, divisively normalizes the probed response by the pool of all items, and reports arg⁡max⁡cr(c)\arg\max_c r(c). Grey fill: normalization pool; black curve: probed response ft+f_t^{+}; red curve: normalized readout r(c)r(c). The stage illustrations are schematic; full expressions are given in Eqs. (4)–(5) and Supplementary S1.5.

Figure 2. Capacity limits emerge from a shared finite representation. (a) Continuous-reproduction task: stimulus array, blank delay, and color-wheel probe at one location. (b–e) Human benchmark behavior. (b,c) Color error distributions and circular SD vs. set size, as in Ma et al. [4] (underlying trials from Bays et al. [3]). (d) Precision (inverse circular SD) vs. set size with power-law fit, from Bays et al. [3]. (e) Distribution of reported-minus-non-target color differences at N=4N=4, from Bays et al. [3]. (f–i) MemGP error distributions, circular SD, precision and non-target-relative reports, in the same order as the human panels. (j–l) Error vs. set size across inducing-grid sizes M∈{25,49,100,196}M \in\{25, 49, 100, 196\} (j), KL weights β∈{0,1,5,20}\beta\in\{0, 1, 5, 20\} (k), and initial kernel lengthscales λ∈{5,10,20,40}\lambda\in\{5, 10, 20, 40\} with location and color kernels set equal (l). Each changes recall error magnitude and preserves the monotonic increase in recall error with set size. (m) Misbinding rate (probability that the probe is reported as a non-target item) as a joint function of set size and target–distractor spatial distance: swap errors fall with distance and rise with load. In (g, h, j–l), points are means ± s.e.m. across 20 simulated subjects, with one item probed per trial (100 trials per set size in g,h; 50 in j–l). In (m), each cell is the misbinding rate averaged over all 20 subjects.

f∼GP(m(x),k(x,x′))(1)f \sim\mathcal{GP}\left(m(\mathbf{x}), k(\mathbf{x},\mathbf{x}')\right) \tag*{(1)}

where m(x)m(\mathbf{x}) is a constant-valued mean function, k(x,x′)k(\mathbf{x},\mathbf{x}') is a periodic kernel with period 360° and separate lengthscale parameters for location, λl\lambda_l, and color, λc\lambda_c. Under this kernel, nearby location–color combinations have more strongly correlated memory strengths than distant combinations (Supplementary Fig. S1). Evidence about an observed color at one location can therefore inform predicted strength at nearby colors and locations. The memory representation is the GP posterior over possible strength functions (Figure 1a), which stores both the content and its uncertainty. At each location–color combination, the posterior mean specifies expected strength and the posterior variance specifies uncertainty about that strength.

Inducing points as a shared computational resource

MemGP approximates the posterior over memory-strength functions using MM inducing points, Z={(ℓm(z),cm(z))}m=1M\mathbf{Z} = \{(\ell_m^{(z)}, c_m^{(z)})\}_{m=1}^{M}, and their function values u=f(Z)\mathbf{u} = f(\mathbf{Z}). The inducing points begin on a regular grid and can move during both encoding and maintenance (Figure 1b). A mean vector m∈RM\mathbf{m} \in\mathbb{R}^{M} specifies expected memory strength at the inducing points. A covariance matrix S∈RM×M\mathbf{S} \in\mathbb{R}^{M \times M} specifies uncertainty and dependencies among these strengths. Together they define the Gaussian variational distribution [24]

q(u)=N(m,S).(2)q(\mathbf{u}) = \mathcal{N}(\mathbf{m}, \mathbf{S}). \tag*{(2)}

For a queried location–color combination x∗\mathbf{x}^{*}, the GP conditional specifies how its strength depends on the inducing values. Integrating over the uncertainty in those values gives the approximate posterior:

q(f(x∗))=∫p(f(x∗)∣u)q(u) du.(3)q(f(\mathbf{x}^{*})) = \int p(f(\mathbf{x}^{*}) \mid\mathbf{u})q(\mathbf{u})\,\mathrm{d}\mathbf{u}. \tag*{(3)}

The inducing points provide a finite resource shared by all items. Adding another item does not add inducing points, so the model must represent more location–color combinations using the same number of inducing values. Kernel interpolation predicts memory strength at feature combinations between inducing points, so remembered colors and locations need not coincide with the inducing locations. An item generally depends on several inducing points, and each inducing point can contribute to several items. The computational resource of MemGP is thus discrete while the precision of each item varies continuously.

Encoding, maintenance and retrieval

During encoding, a procedure that approximates sensory processing supplies noisy location–color observations X={xi}i=1n\mathbf{X} = \{\mathbf{x}_i\}_{i=1}^{n} and evidence strengths y={yi}i=1n\mathbf{y} = \{y_i\}_{i=1}^{n}, with larger strengths for observations closer to an item’s location and color (Figure 1c; see Methods). A Gaussian likelihood p(yi∣fi)p(y_i \mid f_i) relates this evidence to the latent memory strength fi=f(xi)f_i = f(\mathbf{x}_i). To infer the latent memory strengths from these observations, variational inference adjusts the approximate posterior by optimizing an objective called the evidence lower bound (ELBO). During encoding, MemGP minimizes its negative:

Lenc=−∑i=1nEq[log⁡p(yi∣fi)]+KL⁡(q(u)∥p(u)).(4)\mathcal{L}_{\mathrm{enc}} = - \sum_{i=1}^{n} \mathbb{E}_{q}[\log p(y_i \mid f_i)] + \operatorname{KL}(q(\mathbf{u}) \mathbin{\|} p(\mathbf{u})). \tag*{(4)}

The expected log-likelihood term rewards a posterior that predicts the observed evidence strengths. The Kullback–Leibler (KL) divergence measures how far the posterior over inducing values departs from their GP prior. Minimizing the negative ELBO therefore balances agreement with the observations against a penalty for departing from the prior. Because the posterior uses a fixed number of inducing points, all items must be represented within the same finite approximation.

During the delay, external observations are replaced by the model’s own previous predictions. The model maintains the memory representation by minimizing:

Lmaint=−1M∑m=1Ma(ℓm(z))Eq[log⁡p(y~m∣f(zm))]+βKL⁡(q(u)∥p(u))(5)\mathcal{L}_{\mathrm{maint}} = -\frac{1}{M}\sum_{m=1}^{M} a(\ell_m^{(z)})\mathbb{E}_{q}[\log p(\widetilde{y}_m \mid f(\mathbf{z}_m))] + \beta\operatorname{KL}(q(\mathbf{u}) \mathbin{\|} p(\mathbf{u})) \tag*{(5)}

where zm=(ℓm(z),cm(z))\mathbf{z}_m = (\ell_m^{(z)}, c_m^{(z)}) is the position of inducing point mm at epoch tt, and y~m=Eq[f(zm)]∣t−1\widetilde{y}_m = \mathbb{E}_{q}[f(\mathbf{z}_m)]\vert_{t-1} is the posterior mean strength at that point from the previous epoch t−1t-1, which serves as the rehearsal target. The rehearsal term favors predictions that remain close to the preceding epoch’s memory strengths. The KL term mathematically grounds forgetting over time, penalizing departure from the GP prior with relative weight β\beta (weighting the KL term is common in variational inference, e.g., in [28]). The attention weight a(ℓm(z))a(\ell_m^{(z)}) modulates the memory precision near the region ℓm(z)\ell_m^{(z)} (Eq. (7)). In the continuous-reproduction task, attentional cues are the spatial location ℓ~j\tilde{\ell}_j of a target item jj, and the weights are a Gaussian spatial gain (Figure 3b) depending only on the distance between ℓ~j\tilde{\ell}_j and the inducing point’s location ℓm(z)\ell_m^{(z)}. When no cue is presented, all weights equal 1.

Figure 3. Attention is a reweighting of the maintenance objective. (a) Continuous reproduction with a retrospective cue: array, delay, a retrocue indicating one item, delay, and probe. (b) Spatial attention gain a(ℓ)a(\ell): a Gaussian gain profile centered on the cued location, equal to GG at peak and to 1 away from the cue (Eq. (7)). Squares on the location axis mark the locations of the four items. (c–d) Human continuous-report data from Souza et al. [39]: lower absolute error for focused than neutral items at N=4N = 4 (c); cue benefit (neutral minus cued absolute recall error) increasing with set size (d). (e) Human cue-redirect pattern from van Moorselaar et al. [40], Exp. 2: Cowan’s KK for items A and B after an initial cue to A and after a mid-delay redirect to B (change-detection capacity; digitized from their Fig. 2b). (f–h) MemGP. Cued error is below neutral, and the benefit is larger at N=4N = 4 than at N=2N = 2 (f–g). After a mid-delay redirect, error rises for item A and falls for item B (h). (i–j) Recall-error distribution, neutral vs. cued, at N=2N = 2 (i) and N=4N = 4 (j): cueing concentrates the recall-error distribution more strongly around zero, with a larger effect at higher load. (k) Change in cued vs. uncued memory strength over the delay (cue at the vertical dashed line): posterior mean declines in both conditions, and the difference between their changes is not significant. (l) Change in posterior variance over the same delay, cued item versus the other items: the decrease is larger for the cued item. Bars and points in (c–h) are means ± s.e.m. In (f–h) there are 20 simulated subjects, 100 trials per condition. Traces in (k–l) are means ± s.e.m. across 100 trials.

At retrieval, MemGP draws one joint posterior sample of memory strength across colors at all occupied item locations. The sampled strength functions are first made nonnegative by subtracting their global minimum. A spatial divisive-normalization rule [29, 30] then divides the nonnegative strength function at the probed location by a baseline term plus a weighted pool of strength functions across remembered locations (Supplementary Eq. (14)). Items spatially closer to the probe contribute more to the pool (Supplementary Eq. (13)). The model reports the color with the largest normalized response, c^=arg⁡max⁡cr(c)\hat{c} = \arg\max_{c} r(c) (Supplementary S1.5, Eq. S8). Thus, encoding and maintenance determine the posterior over strength functions, while sampling and normalization convert that posterior into a color report.

Results

Shared capacity produces load-dependent errors

We first tested whether increasing the number of remembered items reduces recall precision when all items share the same inducing points. Across set sizes N∈{1,2,4,6,8}N \in\{1, 2, 4, 6, 8\}, MemGP reproduced canonical signatures of human continuous-report performance (Figure 2b–Figure 2i). As load increased, the error distributions broadened (Figure 2b,Figure 2f; [2, 3, 25]) and their circular standard deviation (SD) increased (Figure 2c,Figure 2g; [2, 3, 25]). Precision, defined as inverse circular SD, declined approximately as a power law, 1/SD∝N−α1/\mathrm{SD} \propto N^{-\alpha} (Figure 2d,Figure 2h; [3]). Reports also clustered above chance around the colors of other items in the display, producing swap errors (‘misbinding’; [3]) in which a non-target color is reported in response to the target location (Figure 2e,Figure 2i).

MemGP reproduced these patterns without assumptions about the form of the error distribution. Descriptive models [2, 3, 4, 31] specify the error distribution directly, for example as a mixture of von Mises components centered on the target and non-target colors and a uniform component [3], and they leave the mechanism that produces the errors unspecified. In MemGP, the error distribution is an outcome of inference, sampling and normalization. The results are robust to the choice of hyperparameters, which change the magnitude of recall error but not its monotonic increase with set size: a larger inducing grid MM lowered error at every set size (Figure 2j), and a larger KL weight β\beta (Figure 2k) or a wider kernel lengthscale λ\lambda (Figure 2l) raised it at every set size. Set-size effects in MemGP therefore follow from items competing for a finite set of inducing points under the inference process that governs encoding and maintenance.

Because MemGP specifies a mechanism, it can be used to examine interactions that descriptive models do not address, such as the joint dependence of swap errors on set size and target–distractor similarity. In simulations that varied both factors, the probability of misbinding the probe to a non-target decreased with target–distractor distance in the cue dimension, here spatial location, and increased with set size (Figure 2m), consistent with human reports [3, 32, 33]. A graded effect of target–distractor similarity is a signature of feature-binding errors [34, 35, 36], which population-coding models produce through dedicated binding mechanisms such as conjunction-selective units [35]. MemGP requires no separate binding rule. The kernel correlates memory strengths at nearby locations, so evidence for a neighboring item’s color enters the strength profile at the probed location

and can determine the reported color.

Encoding precision in human working memory varies across items and trials [31, 37]. The variable-precision (VP) model captures this variability by assuming that precision follows a Gamma distribution across items and trials, and it fits human data better than models with fixed precision [31]. However, the VP model does not specify why precision varies. MemGP has no parameter for precision variability, yet precision variability arises from posterior uncertainty. Following van den Berg et al. [31], we fitted uniform–von Mises mixtures [2] to MemGP’s errors at each set size. We then compared the recovered mixture weight ww and circular SD with the predictions of the item-limit, slots-plus-averaging, equal-precision and VP models, each fitted to the same errors (Supplementary Fig. S2). The VP model had the lowest Akaike information criterion (AIC) and Bayesian information criterion (BIC) in all 20 simulated subjects (Supplementary Table S2) and the lowest error on both mixture statistics (RMSEw=0.092\mathrm{RMSE}_{w} = 0.092; RMSECSD=0.141\mathrm{RMSE}_{\mathrm{CSD}} = 0.141). The trial-by-trial and item-by-item variability in MemGP’s precision therefore has a form similar to what the VP model assumes. Posterior uncertainty under capacity-limited inference is thus a candidate mechanism for the precision variability.

Selective maintenance reduces posterior variance and improves recall

Working memory is sensitive to retrospective attentional cues (retrocues) presented during the retention interval (Figure 3a), which provide benefits for the recall performance of cued items [5, 6, 38]. In MemGP, a retrospective cue increases the likelihood weights of inducing points near the cued item in the maintenance objective (Eq. (7); Figure 3b). The increased weights give memory strengths near the cued location greater influence on rehearsal. Neutral trials retain equal weights at all inducing points. A broad range of human performance patterns fall from this reweighted maintenance in MemGP: lower recall error for cued items, a larger benefit at higher load, and a transfer of the benefit when a second cue selected a different item (Figure 3c–Figure 3e; [39, 40, 41]). We describe them in turn.

Load-dependent benefit. In MemGP, cued items were recalled more accurately than neutral items at both set sizes (Figure 3f). At N=2N = 2, mean absolute error was 9.2∘9.2^\circ for cued items and 15.1∘15.1^\circ for neutral items, a benefit of 5.9∘±0.4∘5.9^\circ\pm0.4^\circ (paired t(19)=13.39t(19) = 13.39, p<0.001p < 0.001). At N=4N = 4, the corresponding errors were 23.4∘23.4^\circ and 33.4∘33.4^\circ, a benefit of 10.0∘±1.1∘10.0^\circ\pm1.1^\circ (paired t(19)=8.82t(19) = 8.82, p<0.001p < 0.001). The benefit was 4.1∘4.1^\circ larger at N=4N = 4 than at N=2N = 2 (t(38)=3.40t(38) = 3.40, p<0.001p < 0.001, one-tailed; Figure 3g). Selective maintenance in MemGP therefore had a greater effect when more items shared the representation, consistent with load-dependent cue benefits in humans [39, 41].

Flexible reallocation. When a second cue redirected attention from item A to item B during the delay, MemGP’s error rose by 12.1∘12.1^\circ for A and fell by 4.0∘4.0^\circ for B (Figure 3h). The difference between the error changes for the two items, ΔA−ΔB\Delta\mathrm{A} - \Delta\mathrm{B}, was 16.1∘16.1^\circ (95% CI [13.3, 18.8]; paired t(19)=12.24t(19) = 12.24, p<0.001p < 0.001). The loss of precision for the previously cued item and improvement for the newly cued item agree in direction with the double-cue results reported by van Moorselaar et al. [40] (Figure 3e). Their experiment measured change-detection capacity, whereas the MemGP simulations measured continuous-report error, so the comparison concerns the direction of the effect across different behavioral measures (Cowan’s KK vs. recall error).

Maintenance dynamics. Cueing concentrated the recall-error distribution more strongly around zero, with a larger change at N=4N = 4 (Figure 3i–Figure 3j). To relate this benefit to the maintained representation, we tracked the posterior mean and variance of cued and uncued items from cue onset to the end of the delay. If attention strengthened the cued memory [7], its posterior mean would increase after the cue; if attention protected the cued memory from decay [8, 9, 10], its posterior mean would decline less than that of uncued items. The posterior mean, which measures expected memory strength, declined for both cued and uncued items; the difference in their changes from cue onset to delay end was not significant (paired t(99)=1.41t(99) = 1.41, p=0.16p = 0.16; Figure 3k). In contrast, posterior variance, which measures uncertainty about memory strength, decreased more for the cued item than for the mean of the other items (paired t(99)=−7.53t(99) = -7.53, p<0.001p < 0.001; Figure 3l). In MemGP, the cue benefit therefore accompanied a selective reduction in uncertainty, without an increase in expected strength or a significant reduction in its decline. This dissociation explains why the model needs both strength and uncertainty: lower recall error can accompany reduced posterior variance even while mean strength declines (Supplementary S3.2).

Shared representations and normalization produce attraction and repulsion

When several items are held in memory, the recalled feature of one item is often biased by its neighbors: the report may shift toward a neighboring feature (attraction) [42] or away from it (repulsion) [43, 44]. These biases have been interpreted as adaptive [45]. Repulsion can keep a few confusable items distinct, and attraction can stabilize noisy estimates of individual items with information from the ensemble [42, 46, 47, 48]. Previous models produce attraction [49, 50] and, in some cases, repulsion [12, 51], but they mainly address how the bias depends on the feature distance between items. In human data, the direction and size of the bias also depend on multiple confounding factors [45]. MemGP accounts for these dependencies through its retrieval rule (Figure 4a). The sampled strength profile over color at the probed location is divided by a baseline term plus a weighted pool of the sampled profiles of all items in the display. The direction of the bias depends on where the pool lies relative to the target profile. When a neighbor’s color is close to the target’s, kernel generalization shifts the target profile toward the neighbor, and the pool, formed from the same overlapping profiles, has nearly the same shape over color as the target profile. Division by the pool therefore leaves the peak position largely unchanged, the normalized response follows the shifted profile, and the report is attracted (Figure 4a, left). When the neighbor’s color is farther away, the pool is larger on the side of the target profile that faces the neighbor, so division suppresses that side and the report is repelled (Figure 4a, right).

Figure 4. Inter-item attraction and repulsion depend on memory demands. (a) Two scenarios for the color profile at the probed location (schematic). Left: a neighbor with a similar color shifts the target profile toward the neighbor; the pool has nearly the same shape, and the readout follows that shift (teal). Right: a neighbor with a more distant color contributes an asymmetric normalization pool that shifts the readout away from the neighbor (red). Dashed curve: target profile; dotted curve: neighbor profile; grey fill: pool; bold: normalized readout. (b,c) Bias vs. color distance at low load (N=2N = 2, b) and high load (N=6N = 6, c); histograms in both panels highlight 20∘20^\circ and 105∘105^\circ. (d) A retrocue on the target modestly increases repulsion. (e) At color distance 135∘135^\circ, noisier encoding (σc=60∘\sigma_c = 60^\circ) increases repulsion relative to precise encoding (σc=10∘\sigma_c = 10^\circ), matching the Exp. 4 signature in Chunharas et al. [45]. In (b–e), points are means ±\pm s.e.m. across 20 simulated subjects, 100 trials per condition (s.e.m. between 0.8% and 1.4%, nearly invisible). Histograms show signed-error distributions (left/right shading: attraction/repulsion). (f, g) Lower circular SD predicts stronger repulsion in humans and MemGP. (f) is reproduced from Chunharas et al. [45] Exp. 4 data (24 subjects). In (g), each MemGP simulated subject (n=24n = 24) is tested at target–distractor color distances {20,40,60,80,100,120,140}∘\{20, 40, 60, 80, 100, 120, 140\}^\circ; circular SD and signed angular bias are averages across those distances.

We quantified the direction of bias using the model-free measure of Chunharas et al. [45], which counts reports rather than fitting a distribution to the errors:

bias=100×nawayntotal−50,(6)\mathrm{bias} = 100 \times\frac{n_{\mathrm{away}}}{n_{\mathrm{total}}} - 50, \tag*{(6)}

where nawayn_{\mathrm{away}} counts reports whose error points away from the non-target color, and ntotaln_{\mathrm{total}} counts all

reports. Subtracting 50 centers the measure on equal proportions of errors toward and away from the non-target. Positive values indicate repulsion and negative values indicate attraction; values are expressed in percentage points relative to 50%.

At low load (N=2N = 2), bias was near zero at the smallest color separation (2.4 ±\pm 1.0% at 20°) and increased to repulsion, peaking around 75–105° (23.8 ±\pm 1.1% at 105°; means ±\pm s.e.m. across 20 simulated subjects; Figure 4b). At high load (N=6N = 6), with distractor colors placed on the same side of the target, clustered separations produced attraction (−27.1 ±\pm 0.9% at 20°). Repulsion returned at wider separations (7.2 ±\pm 1.3% at 105°; Figure 4c). The same posterior-sampling and normalization rule therefore generated attraction or repulsion depending on memory load and the arrangement of colors, consistent with the human tendency toward attraction under high load [45].

We also tested whether retrospective attention and the noise in encoding observations change the direction or magnitude of recall bias. Cueing the target during the delay increased repulsion from 16.7 ±\pm 1.1% to 21.1 ±\pm 1.1% (Figure 4d). Noisier encoding (color sampling noise σc=60∘\sigma_c = 60^\circ) also produced greater repulsion than more precise encoding (σc=10∘\sigma_c = 10^\circ; 35.4 ±\pm 0.7% versus 13.9 ±\pm 1.4%; Figure 4e), reproducing the direction of the encoding manipulation in Chunharas et al. [45] and Lively et al. [47].

In the human data, lower circular SD was associated with greater repulsion (Pearson r=−0.81r = -0.81, 95% CI [−0.91, −0.60]; Figure 4f). We found the same strong negative correlation in the MemGP simulations (Pearson r=−0.88r = -0.88, 95% CI [−0.95, −0.75]; Figure 4g). For both human participants and MemGP simulations, repulsion biases are thus strongest when recall is more precise.

In summary, attraction and repulsion in MemGP arise from one retrieval rule applied to a shared memory representation. Feature distance, load, attention, encoding noise and recall precision each change the direction or size of the bias, as they do in human reports.

Variational inference implemented by recurrent circuit dynamics

MemGP accounts for the behavioral effects of memory load, retrospective attention and inter-item interactions. To relate the computations that produce these effects to a circuit, we derived a recurrent circuit analytically from the variational objectives, without training any connection weights. With the inducing locations, prior mean, kernel parameters and likelihood noise held fixed, a memory is specified by the two parameters of q(u)q(\mathbf{u}) (Eq. (2)): the mean m\mathbf{m} gives the expected memory strength at each inducing point, and the covariance S\mathbf{S} gives the uncertainty about these strengths and the dependencies among them. We map m\mathbf{m} to population activity, with each unit corresponding to a population tuned to a region of location–color space, and S\mathbf{S} to a separate, rapidly updated state. The encoding and maintenance objectives (Eqs. (4) and (5)) then specify how these two states change as a memory is formed and held (Figure 5a). The Gaussian variational objective is quadratic in the mean (Supplementary Eqs. (23) and (28)), and taking the gradient of this objective with respect to the mean gives a linear update consisting of recurrent interactions and an input drive (Supplementary Eqs. (24) and (29)).

Figure 5. Variational updates yield recurrent dynamics with center–surround interactions. (a) A schematic inducing grid (M=25M = 25; square color is the predictive mean) storing two items is transformed as 25 recurrent units on a ring. Circle size indicates expected strength mm; spoke length indicates marginal variance diag⁡(S)\operatorname{diag}(\mathbf{S}). Green and red arcs indicate excitation and inhibition. (b) Outgoing weights −KZZ−1-\mathbf{K}_{ZZ}^{-1} from one inducing unit (the open circle; self-coupling removed) on the 10×1010 \times10 grid (M=100M = 100), computed as −(KZZ+ϵI)−1-(\mathbf{K}_{ZZ} + \epsilon\mathbf{I})^{-1} with jitter ϵ=10−3\epsilon= 10^{-3} (Supplementary Fig. S3). Weights are scaled by their largest absolute entry; green and red indicate excitation and inhibition. (c) Expected recall error (mean absolute error over 100 posterior-sample reports) of MemGP and the recurrent circuit on matched trials. Each point is one trial in the neutral (grey) or retrocue (red) condition. Dashed line: identity. Pearson r=0.99r = 0.99 across 200 trials. (d) Absolute displacement of the posterior-mean peak from its position at delay onset in the recurrent circuit. Displacement grows with delay under KL regularization (100 trials; Spearman ρ=0.56\rho= 0.56). (e) Circular SD (over 200 posterior-sample reports) of the posterior-mean peak against the absolute error of an independent report on the recurrent circuit (100 trials at N=4N = 4; Spearman ρ=0.39\rho= 0.39). (f, g) Change in posterior mean (f) and variance (g) at the probed item on the recurrent circuit, from their values at cue onset. Each trial was encoded once and then maintained twice, with and without a retrocue (N=4N = 4, 100 trials). Lines in (d, f, g) are across-trial means; in (e), points are items and the line is a local-linear fit. Bands are bootstrap 95% intervals.

For maintenance, the resulting dynamics of the expected memory strength are τm˙=−Wm+b\tau\dot{\mathbf{m}} = -\mathbf{W}\mathbf{m} + \mathbf{b} (Supplementary Eq. (30)), where W=A/(σ2M)+βKZZ−1\mathbf{W} = \mathbf{A}/(\sigma^{2}M) + \beta\mathbf{K}_{ZZ}^{-1} is the connectivity matrix. The diagonal matrix A\mathbf{A} contains the attention gains, σ2\sigma^{2} is the likelihood noise variance, MM is the number of inducing points, and β\beta is the maintenance KL weight. The matrix KZZ\mathbf{K}_{ZZ} is the prior covariance of the inducing values, so its inverse is the prior precision. The first term of W\mathbf{W} comes from attention-weighted rehearsal and sets how strongly each unit is held to its rehearsal target; the second term comes from the KL penalty, which draws the memory toward the prior and produces forgetting. The input drive b\mathbf{b} depends on the current rehearsal target and prior mean; τ\tau sets the timescale of gradient dynamics (Supplementary S3).

The prior-precision term in W\mathbf{W}, which supplies interactions between units, remains fixed when inducing locations and kernel parameters are fixed. Because the activity equation contains −Wm-\mathbf{W}\mathbf{m}, the prior-dependent interactions have the negative signed term −KZZ−1-\mathbf{K}_{ZZ}^{-1}. The off-diagonal weights under this term exhibit local excitation and surrounding inhibition under MemGP’s prior (Figure 5b), deriving the center–surround (Mexican-hat) pattern assumed in working-memory attractor models [26, 27]. Thus, the center–surround connectivity is obtained by differentiating the inference objective (see also Supplementary S3 and Supplementary Figure S3).

Figure S3. Kernel smoothness and conditioning shape the derived connectivity. (a–c) Outgoing weights −(KZZ+εI)−1-\left(\mathbf{K}_{ZZ}+\varepsilon\mathbf{I}\right)^{-1} from the unit at the origin (open circle; self-coupling removed) on the 10×1010 \times10 inducing grid with ε=10−3\varepsilon= 10^{-3}, for an exponential kernel (a) and a Matérn-3/2 kernel (b), both with lengthscale 36∘36^\circ (one grid step), and for the periodic kernel with λ=10\lambda= 10 used in the paper (c; as in Figure 5b). Each is a product kernel over location and color. Weights are scaled by their largest absolute entry; green and red indicate excitation and inhibition. (d–f) The periodic kernel with λ=10\lambda= 10 at ε=10−6\varepsilon= 10^{-6} (d), 10−410^{-4} (e) and 10−210^{-2} (f). (g) Weights along the location axis at the source color for the periodic kernel with λ\lambda from 0.50.5 to 4040 (ε=10−3\varepsilon= 10^{-3}).

Updating mean activity alone would leave the represented uncertainty unchanged. Differentiating the same variational objective with respect to covariance gives the additional update, τS˙=−(W−βS−1)\tau\dot{\mathbf{S}} = -(\mathbf{W} - \beta\mathbf{S}^{-1}) (Supplementary Eq. (33)). The updated covariance determines uncertainty and dependencies among the expected memory strengths at retrieval. S\mathbf{S} therefore can be interpreted as fast weights, as in architectures that distinguish slow and fast connections [52, 53, 54]. The circuit thus holds a memory in two ways: mean activity, sustained during the delay by the rehearsal term, represents expected memory strength, and the covariance, interpretable as fast synaptic weights, represents uncertainty.

The circuit derivation fixes inducing locations and kernel parameters, whereas MemGP still updates them during maintenance. To assess how this difference affects recall, we compared the recurrent circuit with MemGP on matched trials. For each matched trial, the recurrent circuit and MemGP began from the same posterior obtained after encoding. During maintenance, the recurrent circuit fixed the inducing locations, kernel, and prior mean at their encoding-end values, while MemGP continued to update them. Mean absolute recall error, estimated from 100 reports per trial, agreed closely between the circuit and MemGP (Pearson r=0.987r = 0.987, 95% CI [0.983, 0.990]; 200 trials pooled across neutral and retrocue conditions; Figure 5c).

We next measured how the represented color changed during circuit maintenance. At each epoch, we reconstructed the posterior mean over color at the remembered location and tracked the position of its peak. The peak moved farther from its delay-onset position as maintenance progressed (Spearman ρ=0.56\rho= 0.56, trial-level bootstrap 95% CI [0.50, 0.62]; mean displacement 0.02∘→1.26∘0.02^{\circ} \to1.26^{\circ} over 100 epochs; 100 trials; Figure 5d). The displacement resembles the delay-dependent drift associated with recall errors in prefrontal recordings [26], although the present simulation does not fit those recordings or specify the same noise mechanism.

To test whether uncertainty in the circuit’s reports predicts error, we generated one report per

item and estimated report variability from separate samples. The circular SD of 200 additional sampled reports was associated with absolute recall error (Spearman ρ=0.39\rho= 0.39, bootstrap 95% CI [0.30, 0.46], p<0.001p < 0.001; 100 trials at N=4N = 4; Figure 5e). This association between report variability and error is consistent with evidence that neural uncertainty estimates relate to behavior in perception and working memory [23, 55].

To test whether the circuit also reproduces the MemGP’s selective reduction in uncertainty after a retrocue, we compared posterior-mean and posterior-variance trajectories in cued and neutral delays starting from the same encoded posterior. The conditions produced similar mean trajectories but different variance trajectories: cueing reduced variance at the probed item while neutral maintenance increased it (Figure 5f–Figure 5g). The circuit therefore preserves the distinction observed in MemGP: retrospective attention can reduce uncertainty about memory strength without a corresponding increase in expected strength.

Discussion

MemGP offers a unified account of working memory across the computational, algorithmic and circuit levels. At the computational level, a posterior over a memory-strength function stores content and uncertainty jointly; at the algorithmic level, a finite set of inducing points is the shared resource that approximates this posterior, and encoding, maintenance, and retrieval are operations (probabilistic transformations) on it. In the simulations, MemGP reproduced load-dependent errors, retrospective cue benefits, and inter-item attraction and repulsion, and each effect could be traced to a specific part of the model. Precision fell with load because all items share the inducing points; a retrocue reduced the variance of the cued memory more than that of the uncued memories, whereas the change in its mean did not differ significantly from theirs; and the direction of inter-item bias followed from how the sampled posterior was normalized. A recurrent circuit derived analytically from MemGP, without training, has the center–surround connectivity assumed by attractor models and agreed closely with MemGP in recall error. Its dynamics also showed delay-dependent drift of the represented color, an association between report variability and recall error, and a selective reduction in uncertainty after a retrocue.

Discrete capacity and continuous precision

MemGP reconciles slot and resource accounts of capacity. The number of inducing points is finite, while their locations and the mean and covariance of their function values vary continuously. All remembered items share these inducing points. Increasing the number of items therefore requires the same finite representation to describe more location–color combinations, reducing recall precision in the simulations. A finite number of inducing points does not imply a fixed number of stored objects: an item can depend on several inducing points, and an inducing point can contribute to several items. The model consequently combines a discrete computational resource with continuously varying precision for individual memories. Consistent with this distinction, the variable-precision model described MemGP-generated errors better than the item-limit and slots-plus-averaging models, so a finite number of inducing points did not produce the error distributions expected from a fixed item limit.

Previous models have linked discrete capacity and continuous precision through stochastic sampling, psychophysical similarity, and resource-rational allocation [19, 20, 56]. These models mainly describe either how a limited resource is allocated among items (encoding) or how a report is generated from memory signals (recall). By contrast, MemGP uses one posterior throughout a trial: the posterior is updated from sensory evidence during encoding, selectively maintained under attention, and sampled to generate a color report.

Among these models, the target confusability competition (TCC) model [20] is most directly comparable to MemGP at retrieval: both select the largest of correlated noisy strength signals for candidate colors. The models differ in the source of these correlations. In MemGP, they arise from the GP posterior, whose covariance depends on the kernel, and the sampled signals undergo spatial divisive normalization before selection. In the TCC model, they are constrained by psychophysical similarity measurements. Using measured perceptual similarity as the GP kernel would let MemGP incorporate the similarity structure of the TCC model. Whether MemGP with this kernel reproduces the error distributions predicted by the TCC model remains to be tested.

Attention during maintenance

The strengthening and protection-from-decay accounts of retrocue benefits [38] both describe the effect of attention on the strength of the memory. In MemGP, attention reweights a maintenance objective that depends on both the posterior mean and covariance, so a cue can affect expected memory strength and uncertainty differently. In the retrocue simulations, the posterior mean of the cued item declined over the delay, and its decline did not differ significantly from that of the uncued items, whereas its posterior variance decreased more. The recurrent circuit showed the same dissociation between cued and neutral delays (Figure 5f–Figure 5g). MemGP therefore improves recall of the cued item mainly by reducing its uncertainty, without strengthening it or significantly slowing its decline. This result relates MemGP to accounts of attention as the control of precision [57, 58] and to behavioral and neural evidence that attentional priority determines the precision of working-memory representations [59, 60, 61]. Experiments combining recall reports, confidence judgments and neural measurements could test whether the behavioral benefit is accompanied by the predicted reduction in uncertainty [23].

Connectivity and units of the recurrent circuit

Recurrent models of persistent activity [11, 26] assume connectivity with local excitation and surrounding inhibition, and this center–surround pattern maintains a localized bump of activity during the delay [27, 62]. In MemGP, the same pattern analytically follows from the prior. The GP kernel specifies how memory strengths covary across feature combinations under the prior. In the circuit derivation, this prior covariance determines recurrent interactions through its inverse, the prior precision matrix. For the periodic kernel used here, these interactions excite the nearest units and inhibit a surrounding ring (Figure 5b). The pattern depends on the smoothness of the kernel and on the conditioning of KZZ\mathbf{K}_{ZZ} (Supplementary S3 and Supplementary Fig. S3).

The units of the derived circuit have a candidate neural counterpart. A neuron with a memory field shows sustained delay activity when the remembered location lies within a limited region of space, and these regions differ across neurons so that together they cover the visual field [63]. In MemGP, each inducing point could correspond to the neural population whose memory fields share a region of feature space. The activity of the unit would then be the mean firing rate of this population, representing expected memory strength for that region; the rehearsal term sustains this activity during the delay, and the prior-precision term couples populations tuned to neighboring regions. Because the inducing points are defined over features (e.g., location and color) jointly, the closest counterparts are neurons with conjunctive tuning [64].

Persistent activity, fast weights and activity-silent memory

The derived circuit holds a memory in both persistent activity and a rapidly updated state, and it assigns them different components of the posterior. The mean activity represents expected memory strength, and the covariance S\mathbf{S} represents uncertainty and dependencies among inducing values. The covariance determines the variability and correlations of sampled strengths, which in turn affect the color selected at retrieval. The circuit also contains two kinds of coupling that change on different timescales. The prior-dependent part of the recurrent operator is fixed during the delay, whereas S\mathbf{S} is updated at every epoch. These two quantities are akin to the slow and fast weight architectures proposed in machine learning [52, 53]. Representing expected strength in activity and uncertainty in a rapidly updated state therefore relates the circuit to both persistent-activity accounts and theories in which short-term synaptic changes contribute to memory [13, 65].

Activity-silent theories further propose that information can remain accessible when stimulus-specific firing is weak or absent [14, 66]. The present simulations do not demonstrate storage and recovery of item identity during complete activity silence. The covariance describes uncertainty around the mean; storing the covariance alone need not retain the mean that identifies the remembered items. Demonstrating activity-silent retention would therefore require a mechanism that stores and restores item-specific information when activity ceases and resumes. The model instead motivates tests of how activity and fast synaptic variables jointly determine content and uncertainty, consistent with evidence that persistent and activity-silent processes can interact [67, 68].

Variational inference under computational constraints

In MemGP, variational inference gives encoding and maintenance the same form of optimization: preserve information while penalizing departure from a prior. During encoding, the likelihood term rewards agreement with sensory observations. During maintenance, it rewards agreement with memory strengths predicted at the preceding epoch. In both stages, the KL term penalizes departure of the inducing-value posterior from the GP prior, and the number of inducing points limits the approximation used to represent that posterior. Attention increases the maintenance likelihood weights near a cued location, giving the corresponding rehearsal targets greater influence on the update. This explicit trade-off between fidelity and regularization relates MemGP to resource-rational theories of memory [56].

The KL penalty also relates MemGP to efforts to derive neural computation from resource and energy constraints [69, 70]. In MemGP, this penalty is an information-theoretic cost on the Gaussian posterior over inducing values and does not directly measure metabolic expenditure. In Poisson variational models, by contrast, the KL term becomes proportional to the prior firing rates of model neurons, which gives it an interpretation as metabolic cost [71]. A comparable interpretation of MemGP’s Gaussian KL penalty would require a biophysical model of how neurons encode and update the posterior mean and covariance.

Future directions

The Gaussian-process formulation separates assumptions about baseline memory strength, feature similarity and computational capacity. The prior mean specifies baseline expected strength. The kernel specifies how strengths at different feature combinations covary and therefore how evidence generalizes across those combinations. The inducing points determine the finite approximation used to represent the posterior. Each component can be changed while retaining the variational inference procedure. Although GP kernels can be defined over other feature spaces, the present behavioral tests are restricted to location and color. Extending to multi-feature binding will require higher-dimensional GPs or structured kernels, in which case deep kernel learning [72] or spectral mixture kernels could allow the covariance structure to be learned from data.

The present simulations establish qualitative agreement with the tested human behavioral effects, but quantitative fits to individual participants remain to be evaluated. Fitting participant data, potentially with Bayesian optimization [73], would test whether distinct parameter settings can be distinguished from their behavioral predictions and whether MemGP predicts recall more accurately than alternative models. In a similar vein, in MemGP time is measured in optimization epochs rather than seconds; relating the dynamics to real delay intervals is important future work.

Finally, in addition to its links to perception through inference from noisy sensory observations, and to decision making through sampling from the posterior at retrieval, MemGP could be linked to long-term memory through its GP prior. Learning across trials could shape the prior mean and kernel to reflect familiar feature combinations and their relationships, consistent with evidence that learned stimulus statistics alter working-memory dynamics [74]. These changes would affect both posterior inference and the recurrent connectivity derived from the prior precision. As the posterior relaxes toward a learned, structured prior during maintenance, recall could become biased toward familiar stimuli. Retaining part of the memory state between trials could also allow the model to test serial dependence, in which a current report depends on previously presented items [68].

Methods

Full mathematical details are provided in the Supplementary Methods. Here we summarize the key components of MemGP.

Model specification

MemGP implements a sparse variational Gaussian process [24] using GPyTorch [75]. For the continuous-reproduction task in the current study, the input space is two-dimensional: each input is a pair x=(ℓ,c)\mathbf{x}=(\ell,c), with spatial location ℓ∈[−180∘,180∘)\ell\in[-180^\circ,180^\circ) and color c∈[−180∘,180∘)c \in[-180^\circ,180^\circ), both circular with period 360∘360^\circ. The GP prior mean m(x)m(\mathbf{x}) is constant across feature space, adjusted during inference. The prior covariance is a scaled product of two periodic kernels (Eq. (1)). The variational posterior over inducing values is parameterized by a mean m\mathbf{m} and a covariance S\mathbf{S}, represented through its Cholesky factor [76], at M=m2M=m^2 inducing points Z={(ℓmz,cmz)}m=1M\mathbf{Z}=\{(\ell_m^z,c_m^z)\}_{m=1}^{M} initialized on a regular grid (default m=10m=10, M=100M=100), with inducing values u=f(Z)\mathbf{u}=f(\mathbf{Z}). The inducing positions are inferred and updated during encoding and maintenance. A Gaussian likelihood p(yi∣fi)p(y_i\mid f_i) with fixed, small observation noise completes the generative model (Supplementary Table S1).

ParameterSet-sizeRetrocueBias
nobsn_{\mathrm{obs}} per item100010001000
σℓ\sigma_{\ell} (loc sampling noise)20∘20^\circ20∘20^\circ20∘20^\circ
σc\sigma_{c} (color sampling noise)20∘20^\circ20∘20^\circ20∘20^\circ
mm (inducing grid side)101010
λℓ\lambda_{\ell} (initial loc lengthscale)10.010.010.0
λc\lambda_{c} (initial color lengthscale)10.010.010.0
σn2\sigma_{n}^{2} (likelihood noise)10−410^{-4}10−410^{-4}10−410^{-4}
TencT_{\mathrm{enc}} (encoding epochs)100100100
TmaintT_{\mathrm{maint}} (maintenance epochs)1001001100
ηenc\eta_{\mathrm{enc}} (encoding LR)0.050.050.05
ηmaint\eta_{\mathrm{maint}} (maintenance LR)0.010.010.01
β\beta (KL weight)222
σs\sigma_{s} (attention spatial width)–20∘20^\circ–
GG (attended gain)–40.0–
σpool\sigma_{\mathrm{pool}} (normalization-pool spatial width)60∘60^\circ60∘60^\circ60∘60^\circ
σb\sigma_{b} (baseline fraction)0.80.80.8

Table S1. Baseline settings across behavioral experiments.

During cued maintenance, inducing point mm receives a spatial attention weight that depends only on its location coordinate. For a cue at ℓ~j\tilde{\ell}_j,

a(ℓmz)=1+(G−1)exp⁡(−d(ℓmz,ℓ~j)22σs2)(7)a(\ell_m^z)=1+(G-1)\exp\left(-\frac{d(\ell_m^z,\tilde{\ell}_j)^2}{2\sigma_s^2}\right) \tag*{(7)}

with peak gain GG, Gaussian spatial width σs\sigma_s, and d(⋅,⋅)d(\cdot,\cdot) circular distance. When no cue is presented, all weights equal 1 (uniform attention).

Simulation protocol

Stimulus generation. Unless otherwise specified, each trial used NN locations sampled without replacement from eight equally spaced positions on a circle, with a common random rotation. Colors were sampled uniformly from [−180∘,180∘)[-180^\circ,180^\circ) and converted to integer degrees. A surrogate perceptual procedure generated nobs=1000n_{\mathrm{obs}}=1000 observations per item. The location and color of each observation were drawn from Gaussian distributions centered on the item’s location and color (σℓ=σc=20∘\sigma_\ell=\sigma_c=20^\circ) and wrapped onto the circular axes. Each observation (ℓi,ci)(\ell_i,c_i) of an item (ℓ~,c~)(\tilde{\ell},\tilde{c}) was assigned the evidence-strength target yiy_i, based on Gaussian functions of its circular distances from the item (Eq. (11)). These values entered the Gaussian likelihood as regression targets. The model does not simulate the perceptual computations that would generate this evidence.

Inference. Encoding minimizes the negative ELBO (Eq. (4)) using the Adam gradient-based optimizer. Maintenance minimizes the rehearsal objective (Eq. (5)), whose target at epoch tt is the posterior means at the inducing points from epoch t−1t-1. Both stages update the inducing locations, kernel hyperparameters, prior mean, variational mean, and variational covariance. During cued maintenance, attention reweights the likelihood terms according to Eq. (7). The maintenance optimizer inherits its first- and second-moment estimates from encoding and switches to the maintenance learning rate. Epoch counts, learning rates, and the KL weight β\beta are listed in Supplementary Table S1. Kernel lengthscales in that table specify their initial values.

Retrieval. One joint sample was drawn from the latent GP posterior over 360 evenly spaced color values at every occupied item location, preserving covariance across both colors and items. Subtracting the minimum sampled strength across all locations and colors from every sampled strength made the responses nonnegative. Spatial divisive normalization [29, 30] was then applied, and the color with the maximum normalized response was reported (Supplementary S1.5). The parameters of spatial divisive normalization were consistent across the set-size, retrocue, and bias experiments. Three analyses used repeated draws from the same posterior: swap rates (100 reports per probe; Figure 2m), matched-trial recall error of the recurrent circuit (100 reports per trial; Figure 5c), and report uncertainty (200 additional reports per item; Figure 5e). All other analyses used one draw per trial.

Experiments

Set size. Load was varied over N∈{1,2,4,6,8}N \in\{1, 2, 4, 6, 8\} (20 simulated subjects, 100 trials per set size; uniform attention). As in human continuous-report tasks, one randomly located item was probed per trial, so every set size gave each subject the same number of errors. Circular SD and precision (inverse circular SD) were computed per subject and summarized as the subject mean ±\pm s.e.m. For non-target-relative errors at N=4N = 4, the probed report on each trial was compared with the color of each of the three non-target items, and the signed circular differences (report minus non-target color) were pooled across trials and subjects (Figure 2i). Hyperparameter sweeps repeated the set-size series while varying inducing-grid size M∈{25,49,100,196}M \in\{25, 49, 100, 196\}, KL weight β∈{0,1,5,20}\beta\in\{0, 1, 5, 20\}, or initial kernel lengthscale λ∈{5,10,20,40}\lambda\in\{5, 10, 20, 40\} (location and color kernels set equal).

Misbinding. Swap rates as a joint function of set size and target–distractor spatial distance used N∈{2,4,6,8}N \in\{2, 4, 6, 8\} (20 simulated subjects, 30 displays per set size). Every item in each display was probed, with 100 reports generated from independent posterior samples for each probe. A report counted as a swap toward a given non-target if it fell within 30∘30^\circ of that item’s color and outside 30∘30^\circ of the target. Each probed item and each non-target in the same display formed a target–distractor pair. Because items occupied positions spaced 45∘45^\circ apart, the circular spatial distance between the two items in a pair took one of four values, {45∘,90∘,135∘,180∘}\{45^\circ, 90^\circ, 135^\circ, 180^\circ\}. Swap rates were averaged within each combination of set size and distance (Figure 2m).

Retrocue. Neutral trials used uniform attention throughout a 100-epoch delay. Cued trials applied Eq. (7) from epoch 50, with attention weights centered on the probed item’s location. Load dependence compared N=2N = 2 and N=4N = 4 (20 simulated subjects, 100 trials per condition). Cue-flexibility trials (N=4N = 4, 200-epoch delay; 20 simulated subjects, 100 trials; Figure 3h) applied the same gain first to a randomly chosen item A (epochs 50–99) and then to a different item B (epochs 100–199). Absolute recall error for A and B was read out at the end of each cue window.

Attraction/repulsion bias. Displays used a fixed target at location 0∘0^\circ. At N=2N = 2, one distractor sat at 90°. At N=6N = 6, the six items occupied positions spaced 60° apart. The five distractors lay on the same side of the target in color, at color distances D−sD - s, D−s/2D - s/2, DD, D+s/2D + s/2 and D+sD + s from it, where DD is the nominal color distance and s=min⁡(8∘,max⁡(2∘,0.2D))s = \min(8^\circ, \max(2^\circ, 0.2D)). The nominal color distance DD was swept over {20,45,75,105,135}∘\{20, 45, 75, 105, 135\}^\circ (20 simulated subjects, 100 trials per condition). Cued vs. neutral comparisons and the encoding-noise comparison (σc=10∘\sigma_c = 10^\circ vs. 60∘60^\circ) used N=2N = 2 at 135∘135^\circ. For the precision–repulsion correlation (Figure 4g), each of 24 simulated subjects drew encoding noise from Uniform⁡[10∘,40∘]\operatorname{Uniform}[10^\circ, 40^\circ] and was tested at color distances {20,40,60,80,100,120,140}∘\{20, 40, 60, 80, 100, 120, 140\}^\circ; circular SD and the mean signed error (degrees; trials with absolute error above 40° excluded) were averaged across distances. Human subject means in Figure 4f were recomputed from Chunharas et al. [45] Exp. 4, aggregating over encoding × distance cells. Bias in Figure 4b–Figure 4e was the model-free measure in Eq. (6).

Recurrent circuit implementation. Matched-trial recall compared MemGP to the recurrent circuit on 100 displays (N=4N = 4). Each display was encoded once and then maintained under both the neutral and the cued condition, giving 200 data points that were pooled in Figure 5c. For each trial, MemGP and the recurrent circuit begin from the same posterior obtained after encoding. The recurrent circuit fixes the inducing locations, kernel and prior mean at encoding end, while MemGP continues to update them through the delay. The comparison in Figure 5c uses mean absolute error over 100 sampled reports per trial, with matched random seeds for readout. The recurrent circuit retains the encoding optimizer state and updates the variational mean and Cholesky covariance in GPyTorch’s whitened coordinates [77, 78]. Adam updates depend on the choice of coordinates, so the circuit and MemGP share one numerical update rule and differ only in which parameters are free during the delay.

Bump displacement in the recurrent circuit (Figure 5d) is the movement of the peak read out from m: the argmax, on a 0.1° color axis, of the posterior mean at the item’s location, measured from its position at delay onset (N=1N = 1, neutral maintenance, 100 trials). The argmax was taken within 45° of the peak’s position at the previous epoch, starting from the item’s color, so that a second peak elsewhere on the color axis is not read out as displacement. On the inducing grid, that mean equals m; off the grid, it is the kernel interpolation of m (Supplementary S3.2).

For Figure 5e (N=4N = 4, neutral maintenance, 100 trials), each of the four items on each trial received one sampled report from the recurrent circuit’s posterior defined by the circuit’s mean and covariance at the end of the delay; uncertainty was the circular SD of 200 additional reports from the same posterior and readout. The circular SD and the independent report error therefore used separate draws.

The mean and variance trajectories (Figure 5f,Figure 5g) were obtained by running cued and neutral maintenance in the recurrent circuit from the same encoded posterior (N=4N = 4, 100 trials), with the cue applied from epoch 50, and are plotted as the change from each trial’s value at cue onset.

Model comparison

The comparison fitted the benchmark models of van den Berg et al. [31] to MemGP’s simulated errors to assess which descriptive model best summarized those errors. The fitted models consist of Item-Limit (IL), Equal-Precision (EP), Slots-plus-Averaging (SA), and Variable-Precision (VP), which were fitted separately to each simulated subject’s signed errors (N∈{1,2,4,6,8}N \in\{1, 2, 4, 6, 8\}, 500 trials per subject) by maximum likelihood with differential evolution (following van den Berg et al. [31]). Akaike information criterion (AIC), Bayesian information criterion (BIC), and the small-sample correction to AIC (AICc) were computed per subject (Supplementary Table S2).

In addition to comparing information criteria, we assessed whether each fitted model reproduced the mixture statistics of MemGP-generated errors. This comparison (Supplementary Fig. S2) followed van den Berg et al. [31]: for each subject and model, 10 synthetic datasets of the subject’s size were generated from the maximum-likelihood parameters, the uniform–von Mises mixture was fit to each, and the estimated von Mises mixture weight ww and the circular SD of that component were averaged to give that subject’s prediction. Ribbons are ± s.e.m. of the predictions across subjects, and root mean squared error (RMSE) between predicted mixture parameters and those estimated from MemGP-generated errors was computed over all subjects and set sizes.

Statistical analysis

Error bars on behavioral simulation panels are s.e.m. across 20 simulated subjects that differ in random seed, with a few exceptions: maintenance traces (Figure 3k–Figure 3l) instead show means ± s.e.m. across 100 trials; the precision–repulsion analysis (Figure 4g) has 24 simulated subjects (matching the human experiment), each with its own encoding noise level; circuit trajectory bands are bootstrap 95% intervals as specified in Figure 5.

Retrocue benefits (Figure 3f) were paired tt-tests on subject-mean absolute error (20 subjects, 100 trials per condition; cued vs. neutral). The load comparison was an independent-samples tt-test on those subject-level benefits (one-tailed, H1H_1: greater benefit at N=4N = 4 than at N=2N = 2). The cue-reallocation test (Figure 3h) was a paired tt-test, across 20 subjects, of the trade-off Δ\DeltaA − Δ\DeltaB (error change for the abandoned item minus that for the newly cued item), computed from each subject’s mean errors over 100 trials. The maintenance-dynamics comparisons (Figure 3k–Figure 3l) were paired tt-tests of the end-of-delay change from cue onset, cued versus the mean of the uncued items, across 100 trials: predictive mean in (k) and posterior variance in (l).

Bias used Eq. (6) with the simulated subject as the unit (n=20n = 20, 100 trials per condition). Precision–repulsion correlations (Figure 4f–Figure 4g) are Pearson rr on subject means. Other correlations are Pearson rr or Spearman ρ\rho as labeled at each use, with 95% confidence intervals (Fisher zz for Pearson; bootstrap for Spearman where noted). The uncertainty–error correlation in Figure 5e uses 400 item-level observations from 100 displays; its 95% CI was obtained by resampling displays, so that the four items from each display were kept together.

Data and code availability

The code for the MemGP model, the simulations, the analyses, and the figures, together with the simulation outputs that the figures use, is available at https://github.com/Daniel-Gong/MemGP-Code. This study collected no new human data. The human data replotted in Figure 2–Figure 4 come from published studies [3, 39, 40, 45]; copies of the files used, with their sources, are provided in the data folder of the same repository.

Author contributions

Conceptualization: D.G., M.B. and I.Y. Code: D.G. Formal analysis: D.G. Investigation: D.G. Visualization: D.G. Writing (original draft): D.G. and I.Y. Writing (review & editing): D.G., M.B. and I.Y. Supervision: I.Y.

Competing interests

The authors declare no competing interests.

Mathematical formulation

Gaussian process prior

The latent memory-strength function f:X→Rf:\mathcal{X}\to\mathbb{R} assigns a strength to each location–color combination, where X=[−180,180)2\mathcal{X}=[-180,180)^2 is the circular location–color space and each input is a pair x=(ℓ,c)\mathbf{x}=(\ell,c). The GP prior (Eq. (1)) is

f∼GP(m(x),k(x,x′))f\sim\mathcal{GP}\bigl(m(\mathbf{x}),k(\mathbf{x},\mathbf{x}')\bigr)

where m(x)m(\mathbf{x}) is the prior mean, constant across feature space, initialized at 0 and adjusted during inference. The prior covariance between two location–color combinations is

k(x,x′)=σf2⋅kper(ℓ,ℓ′;λℓ,P)⋅kper(c,c′;λc,P)(8)k(\mathbf{x},\mathbf{x}')=\sigma_f^2\cdot k_{\mathrm{per}}(\ell,\ell';\lambda_\ell,P)\cdot k_{\mathrm{per}}(c,c';\lambda_c,P) \tag*{(8)}

The covariance is the product of a location kernel and a color kernel, multiplied by the output scale σf2\sigma_f^2. Each periodic kernel is

kper(x,x′;λ,P)=exp⁡(−2sin⁡2(π∣x−x′∣/P)λ)(9)k_{\mathrm{per}}(x,x';\lambda,P)=\exp\left(-\frac{2\sin^2\left(\pi\lvert x-x'\rvert/P\right)}{\lambda}\right) \tag*{(9)}

with period P=360∘P=360^\circ for both dimensions. The denominator follows the GPyTorch PeriodicKernel convention: it contains λ\lambda, not its square. The parameter λ\lambda determines how covariance changes with distance along the circular dimension. The output scale σf2\sigma_f^2 is updated as part of a ScaleKernel wrapper. Figure S1 shows independent draws of ff from GP(0,k)\mathcal{GP}(0,k).

Figure S1. The GP prior is a distribution over smooth random functions on the circular location–color torus. (a–c) Independent zero-mean draws f∼GP(0,k)f\sim\mathcal{GP}(0,k), each a map [−180,180)2→R[-180,180)^2\to\mathbb{R}.

Sparse variational approximation

An observation consists of a location–color combination xi\mathbf{x}_i and an evidence strength yiy_i. The Gaussian likelihood p(yi∣fi)p(y_i \mid f_i) relates the observed strength to the latent function value fi=f(xi)f_i = f(\mathbf{x}_i). The exact posterior at a query location x∗\mathbf{x}^{*} is p(f∗∣X,y,x∗)p(f^{*} \mid\mathbf{X}, \mathbf{y}, \mathbf{x}^{*}), f∗=f(x∗)f^{*} = f(\mathbf{x}^{*}). We approximate it using MM inducing points Z={(ℓmz,cmz)}m=1M\mathbf{Z} = \{(\ell_m^z, c_m^z)\}_{m=1}^{M}, Z∈RM×2\mathbf{Z} \in\mathbb{R}^{M \times2}. The inducing values are u=f(Z)\mathbf{u} = f(\mathbf{Z}). The variational mean m∈RM\mathbf{m} \in\mathbb{R}^{M} and covariance S∈RM×M\mathbf{S} \in\mathbb{R}^{M \times M} describe the distribution of these inducing values. The diagonal entries of S\mathbf{S} are marginal variances; off-diagonal entries are covariances between inducing values. The implementation parameterizes S\mathbf{S} through a Cholesky factor, whose product with its transpose gives the covariance (CholeskyVariationalDistribution). The variational distribution (Eq. (2)) is

q(u)=N(u;m,S).q(\mathbf{u}) = \mathcal{N}(\mathbf{u}; \mathbf{m}, \mathbf{S}).

To predict strength at a queried location–color combination, the model integrates the GP conditional over the distribution of inducing values. This gives the approximate posterior predictive distribution:

q(f(x∗))=N(μ0+k∗TKZZ−1(m−μ01), k∗∗−k∗TKZZ−1(KZZ−S)KZZ−1k∗)(10)q(f(\mathbf{x}^{*})) = \mathcal{N}\left(\mu_0 + \mathbf{k}_{*}^{\mathsf{T}}\mathbf{K}_{ZZ}^{-1}(\mathbf{m} - \mu_0\mathbf{1}),\ k_{**} - \mathbf{k}_{*}^{\mathsf{T}}\mathbf{K}_{ZZ}^{-1}(\mathbf{K}_{ZZ} - \mathbf{S})\mathbf{K}_{ZZ}^{-1}\mathbf{k}_{*}\right) \tag*{(10)}

Here μ0\mu_0 is the constant prior mean. The vector k∗=k(Z,x∗)\mathbf{k}_{*} = k(\mathbf{Z}, \mathbf{x}^{*}) contains prior covariances between the queried combination and the inducing points; k∗∗=k(x∗,x∗)k_{**} = k(\mathbf{x}^{*}, \mathbf{x}^{*}) is the prior variance at the query. The matrix KZZ=k(Z,Z)\mathbf{K}_{ZZ} = k(\mathbf{Z}, \mathbf{Z}) contains prior covariances among the inducing values. The first argument of the Gaussian is the predicted mean strength, and the second is its variance.

Inducing points are initialized on a regular m×mm \times m grid (m=10m = 10 by default, M=100M = 100) with centers offset by half the bin width to ensure uniform coverage. Their positions are inferred during optimization (learn_inducing_locations = True).

Encoding objective

Given NN items {(ℓ~i,c~i)}i=1N\{(\tilde{\ell}_i, \tilde{c}_i)\}_{i=1}^{N}, the surrogate perceptual procedure generates nobsn_{\mathrm{obs}} observations per item xij=(ℓ~i+ϵℓ,c~i+ϵc)\mathbf{x}_{ij} = (\tilde{\ell}_i + \epsilon_{\ell}, \tilde{c}_i + \epsilon_c) with ϵℓ∼N(0,σℓ2)\epsilon_{\ell} \sim\mathcal{N}(0, \sigma_{\ell}^{2}), ϵc∼N(0,σc2)\epsilon_c \sim\mathcal{N}(0, \sigma_c^{2}), wrapped to [−180,180)[-180, 180). The evidence-strength targets yij=wijy_{ij} = w_{ij} are

wij=exp⁡(−d(ℓij,ℓ~i)22σℓ2)⋅exp⁡(−d(cij,c~i)22σc2),(11)w_{ij} = \exp\left(-\frac{d(\ell_{ij}, \tilde{\ell}_i)^2}{2\sigma_{\ell}^{2}}\right) \cdot\exp\left(-\frac{d(c_{ij}, \tilde{c}_i)^2}{2\sigma_c^{2}}\right), \tag*{(11)}

where d(⋅,⋅)d(\cdot,\cdot) is circular distance.

The encoding ELBO is maximized using Adam with learning rate ηenc=0.05\eta_{\mathrm{enc}} = 0.05 for Tenc=100T_{\mathrm{enc}} = 100 epochs. The Gaussian likelihood noise variance is fixed (not inferred; Table S1).

Maintenance objective

During maintenance, the model uses its preceding predictions as observations in the variational objective. The likelihood is evaluated at the current inducing locations Z(t)={zm(t)}m=1M\mathbf{Z}^{(t)} = \{\mathbf{z}_m^{(t)}\}_{m=1}^{M}. Selfrehearsal targets are initialized at the end of encoding as the posterior mean of inducing values and then updated after each epoch from the current posterior mean,

y~m(0)=Eq(f)[f(zm)]∣t=Tenc,y~m(t)=Eq(f)[f(zm(t))]∣t−1.(12)\tilde{y}_{m}^{(0)} = \mathbb{E}_{q(f)}[f(\mathbf{z}_{m})]\big|_{t=T_{\mathrm{enc}}}, \qquad\tilde{y}_{m}^{(t)} = \mathbb{E}_{q(f)}[f(\mathbf{z}_{m}^{(t)})]\big|_{t-1}. \tag*{(12)}

The maintenance objective (Eq. (5)) is optimized with Adam (learning rates and epoch counts in Table S1). The KL coefficient β\beta controls regularization toward the prior and is set to β=2\beta= 2 in the baseline configurations. The effect of KL regularization on posterior variance depends on the rehearsal term, the attention weights and the learned prior; it does not require variance to increase at every point on every update. Before cue onset (epoch tcuet_{\mathrm{cue}}), attention weights are uniform (a(ℓmz)=1a(\ell_m^z) = 1). After cue onset, the spatial gain function (Eq. (7)) with parameters GG (attended gain) and σs\sigma_s (spatial width) is applied; because the inducing locations move during the delay, the gains are recomputed at the current locations in every epoch.

Retrieval

A single joint sample f∼N(μ,Σ)\mathbf{f} \sim\mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma}) is drawn from the GP posterior predictive over 360 evenly spaced color values at every occupied item location, preserving inter-color and inter-item covariance. Let fi(c)=f(ℓ~i,c)f_i(c) = f(\tilde{\ell}_i,c) denote the sampled memory-strength profile over color at the location ℓ~i\tilde{\ell}_i of item ii, and let ft(c)=f(ℓprobe,c)f_t(c) = f(\ell_{\mathrm{probe}},c) denote the profile at the probed location. The probed profile is divisively normalized by a pool of all item profiles from the same sample. To make all responses nonnegative, the same minimum sampled strength is subtracted from every value, fi+(c)=fi(c)−min⁡ff_i^+(c) = f_i(c) - \min f (and likewise ft+f_t^+), where the minimum is taken over every item location and color. Unlike rectification, which would set negative strengths to zero, this common shift keeps the color profile of every item in the pool, including items with little evidence. Each item enters the pool with a spatial surround weight

wi=exp⁡(−d(ℓ~i,ℓprobe)22σpool2).(13)w_i = \exp\left(-\frac{d(\tilde{\ell}_i,\ell_{\mathrm{probe}})^2}{2\sigma_{\mathrm{pool}}^2}\right). \tag*{(13)}

The probed item has zero distance from the probe and therefore has w=1w = 1. The pool is the weighted sum of shifted profiles,

pool⁡(c)=∑iwifi+(c).(14)\operatorname{pool}(c) = \sum_i w_i f_i^+(c). \tag*{(14)}

For each candidate color, the probed item’s shifted strength is divided by this pool plus a baseline term. The normalized response and the selected report are

r(c)=ft+(c)σb⋅max⁡cft+(c)+pool⁡(c),c^=arg⁡max⁡c r(c),(15)r(c) = \frac{f_t^+(c)}{\sigma_b \cdot\max_c f_t^+(c) + \operatorname{pool}(c)}, \qquad\hat{c} = \underset{c}{\arg\max}\ r(c), \tag*{(15)}

where σb\sigma_b is the baseline (semi-saturation) fraction. Two parameters govern the readout: the normalization-pool spatial width σpool\sigma_{\mathrm{pool}}, which determines how rapidly each item’s weight wiw_i decreases with distance from the probe, and the baseline fraction σb\sigma_b, which scales the maximum target response in the denominator (Table S1). The baseline term scales with the maximum shifted response of the probed item rather than being a fixed constant as in the standard normalization equation [30]; this makes the readout invariant to the overall scale of the sampled strengths, which decline during the delay.

Inducing positions, kernel lengthscales, and prior mean are updated during inference. Bias trials with a target cue use the retrocue attention settings.

Information-theoretic model comparison

Following van den Berg et al. [31], we compared descriptive models fitted to MemGP errors. For each descriptive model M\mathcal{M}, we estimated kk free parameters by maximum likelihood estimation (MLE) from nn recall errors. We compared fits using Akaike information criterion (AIC), Bayesian information criterion (BIC), and the small-sample correction to AIC (AICc):

AIC=2k−2ln⁡L^(16)\mathrm{AIC} = 2k - 2\ln\hat{L} \tag*{(16)}
BIC=kln⁡n−2ln⁡L^(17)\mathrm{BIC} = k\ln n - 2\ln\hat{L} \tag*{(17)}
AICc=AIC+2k(k+1)n−k−1(18)\mathrm{AICc} = \mathrm{AIC} + \frac{2k(k+1)}{n-k-1} \tag*{(18)}

Here L^\hat{L} is the maximized likelihood. Each criterion combines a term measuring fit with a penalty for the number of fitted parameters. Lower AIC/BIC indicates a preferred model under the corresponding criterion (see Table S2). Parameter counts: IL (k=3k = 3: KK, κmem\kappa_{\mathrm{mem}}, κr\kappa_{r}), SA (k=3k = 3: KK, J1J_{1}, κr\kappa_{r}), EP (k=3k = 3: J1J_{1}, α\alpha, κr\kappa_{r}), VP (k=4k = 4: Jˉ1\bar{J}_{1}, α\alpha, τ\tau, κr\kappa_{r}).

ModelkkΔ\DeltaAICΔ\DeltaBICBest (AIC)
VP40.0±0.00.0 \pm0.00.0±0.00.0 \pm0.020/20
IL389.0±3.589.0 \pm3.584.8±3.584.8 \pm3.50/20
SA391.7±7.291.7 \pm7.287.5±7.287.5 \pm7.20/20
EP3131.8±8.7131.8 \pm8.7127.6±8.7127.6 \pm8.70/20

Table S2. Information-theoretic model comparison. Mean Δ\DeltaAIC and Δ\DeltaBIC (±\pm s.e.m.) across 20 simulated subjects. Each model was fit by MLE to that subject’s signed errors (n=500n = 500: 100 trials ×\times set sizes 1, 2, 4, 6, 8). For each subject, Δ\DeltaAIC and Δ\DeltaBIC are computed relative to the model with the lowest value of that criterion; positive values indicate a worse fit. VP had the lowest AIC and BIC in all 20 simulated subjects. These criteria compare descriptive models fitted to MemGP-generated recall errors.

Figure S2. Formal model comparison. Uniform–von Mises mixture statistics extracted from MemGP simulation errors (open squares, mean ±\pm s.e.m. across 20 simulated subjects) compared with predictions from four benchmark models fit by maximum likelihood to each subject’s errors (N∈{1,2,4,6,8}N \in\{1, 2, 4, 6, 8\}, 100 trials each). Top row: mixture weight ww (probability of non-guess response). Bottom row: circular SD of the von Mises component. Colored lines show mean model predictions across subjects; shaded ribbons are ±\pm s.e.m. across subjects. RMSE, computed over all subjects and set sizes between each subject’s prediction and statistics, quantifies goodness of fit; ★ marks the lowest RMSE. VP had the lowest RMSE for both mixture statistics and the lowest AIC and BIC (Supplementary Table S2).

Recurrent circuit implementation of MemGP

To derive recurrent equations, we hold the inducing locations, kernel parameters, likelihood noise, and prior mean fixed. Only the variational mean and covariance are updated in the derivation. We express the variational objective in terms of the mean m\mathbf{m} and covariance S\mathbf{S} of the inducing values u=f(Z)\mathbf{u}=f(\mathbf{Z}). The inverse prior covariance, or prior precision, determines interactions between units that remain fixed under these assumptions, while S\mathbf{S} is a rapidly updated covariance state. Attention changes diagonal gains in the effective operator W\mathbf{W}. If m\mathbf{m} is read as mean activity and S\mathbf{S} as fast synaptic weights, the resulting equations describe a recurrent circuit implementation of MemGP.

The derivation starts from closed-form expressions for the two terms of the variational objective: the expected log-likelihood and the KL divergence. The likelihood is Gaussian, p(y∣f)=N(y;f,σ2)p(\mathbf{y}\mid f)=\mathcal{N}(\mathbf{y};f,\sigma^{2}), and the prior on the inducing values is p(u)=N(μ01,KZZ)p(\mathbf{u})=\mathcal{N}(\mu_{0}\mathbf{1},\mathbf{K}_{ZZ}), with μ0\mu_{0} the constant prior mean. The variational posterior is q(u)=N(m,S)q(\mathbf{u})=\mathcal{N}(\mathbf{m},\mathbf{S}). Let q(fi)=N(μi,vi)q(f_i)=\mathcal{N}(\mu_i,v_i) denote the marginal posterior of one latent strength fif_i, with mean μi\mu_i and variance viv_i. Averaging the log-likelihood over this posterior gives

Eq[log⁡p(yi∣fi)]=−12log⁡(2πσ2)−(yi−μi)2+vi2σ2.(19)\mathbb{E}_{q}[\log p(y_i\mid f_i)]=-\frac{1}{2}\log(2\pi\sigma^{2})-\frac{(y_i-\mu_i)^{2}+v_i}{2\sigma^{2}}. \tag*{(19)}

The KL divergence measures the departure of the Gaussian posterior q(u)q(\mathbf{u}) from the Gaussian prior p(u)p(\mathbf{u}). Its closed-form expression is

KL⁡(q(u)∥p(u))=12(m−μ01)TKZZ−1(m−μ01)+12tr⁡(KZZ−1S)−12log⁡∣S∣+12log⁡∣KZZ∣−M2.(20)\operatorname{KL}(q(\mathbf{u})\mathbin{\|}p(\mathbf{u}))=\frac{1}{2}(\mathbf{m}-\mu_{0}\mathbf{1})^{\mathsf{T}}\mathbf{K}_{ZZ}^{-1}(\mathbf{m}-\mu_{0}\mathbf{1})+\frac{1}{2}\operatorname{tr}(\mathbf{K}_{ZZ}^{-1}\mathbf{S}) -\frac{1}{2}\log\lvert\mathbf{S}\rvert+\frac{1}{2}\log\lvert\mathbf{K}_{ZZ}\rvert-\frac{M}{2}. \tag*{(20)}

Encoding

For nn perceptual observations, Eq. (19) gives the negative expected log-likelihood in Eq. (4):

−∑i=1nEq[log⁡p(yi∣fi)]=n2log⁡(2πσ2)+12σ2∥y−μ∥2+12σ2∑i=1nvi.(21)-\sum_{i=1}^{n}\mathbb{E}_{q}[\log p(y_i\mid f_i)]=\frac{n}{2}\log(2\pi\sigma^{2})+\frac{1}{2\sigma^{2}}\lVert\mathbf{y}-\boldsymbol{\mu}\rVert^{2}+\frac{1}{2\sigma^{2}}\sum_{i=1}^{n}v_i. \tag*{(21)}

To differentiate the encoding objective with respect to the inducing mean m\mathbf{m}, we first determine how the two data terms in Eq. (21) depend on m\mathbf{m}: the squared residual depends on m\mathbf{m} through the predictive mean μ\boldsymbol{\mu}, and the variance sum ∑ivi\sum_i v_i does not depend on m\mathbf{m}. Let Φ=KXZKZZ−1\boldsymbol{\Phi}=\mathbf{K}_{XZ}\mathbf{K}_{ZZ}^{-1}, where KXZ\mathbf{K}_{XZ} contains prior covariances between observation locations and inducing points. Multiplying by Φ\boldsymbol{\Phi} maps inducing-value deviations from the prior mean to predicted deviations at the observation locations. For a constant prior mean, the predictive mean in Eq. (10) is μ=μ01n+Φ(m−μ01M)\boldsymbol{\mu}=\mu_{0}\mathbf{1}_{n}+\boldsymbol{\Phi}(\mathbf{m}-\mu_{0}\mathbf{1}_{M}), which is linear in m\mathbf{m}. Collecting the terms that do not contain m\mathbf{m} into the adjusted observation vector yc=y−μ01n+Φμ01M\mathbf{y}_{c}=\mathbf{y}-\mu_{0}\mathbf{1}_{n}+\boldsymbol{\Phi}\mu_{0}\mathbf{1}_{M} gives the residual y−μ=yc−Φm\mathbf{y}-\boldsymbol{\mu}=\mathbf{y}_{c}-\boldsymbol{\Phi}\mathbf{m}. The predictive variance at xi\mathbf{x}_{i} is

vi=k(xi,xi)−kiTKZZ−1ki+kiTKZZ−1SKZZ−1ki,(22)v_i=k(\mathbf{x}_i,\mathbf{x}_i)-\mathbf{k}_i^{\mathsf{T}}\mathbf{K}_{ZZ}^{-1}\mathbf{k}_i+\mathbf{k}_i^{\mathsf{T}}\mathbf{K}_{ZZ}^{-1}\mathbf{S}\mathbf{K}_{ZZ}^{-1}\mathbf{k}_i, \tag*{(22)}

where ki\mathbf{k}_i is the vector of prior covariances between observation xi\mathbf{x}_i and the inducing points. This expression contains S\mathbf{S} and kernel terms but not m\mathbf{m}, so ∑ivi\sum_i v_i is constant with respect to m\mathbf{m}.

Define Lˉenc=1nLenc\bar{\mathcal{L}}_{\mathrm{enc}}=\frac{1}{n}\mathcal{L}_{\mathrm{enc}}, substitute (S14) and (S13) into (4), and keep the terms that contain m\mathbf{m}:

Lˉenc(m)=1n(12σ2∥yc−Φm∥2+12(m−μ01)TKZZ−1(m−μ01))+const=12σ2n∥yc−Φm∥2+12n(m−μ01)TKZZ−1(m−μ01)+const.(23)\begin{aligned} \bar{\mathcal{L}}_{\mathrm{enc}}(\mathbf{m}) &= \frac{1}{n}\left(\frac{1}{2\sigma^2}\lVert\mathbf{y}_c-\boldsymbol{\Phi}\mathbf{m}\rVert^2+\frac{1}{2}(\mathbf{m}-\mu_0\mathbf{1})^\mathsf{T}\mathbf{K}_{ZZ}^{-1}(\mathbf{m}-\mu_0\mathbf{1})\right)+\mathrm{const}\\ &= \frac{1}{2\sigma^2 n}\lVert\mathbf{y}_c-\boldsymbol{\Phi}\mathbf{m}\rVert^2+\frac{1}{2n}(\mathbf{m}-\mu_0\mathbf{1})^\mathsf{T}\mathbf{K}_{ZZ}^{-1}(\mathbf{m}-\mu_0\mathbf{1})+\mathrm{const}. \tag*{(23)} \end{aligned}

where the constant collects everything independent of m\mathbf{m}, including ∑ivi\sum_i v_i, tr⁡(KZZ−1S)\operatorname{tr}(\mathbf{K}_{ZZ}^{-1}\mathbf{S}), and log⁡∣S∣\log\lvert\mathbf{S}\rvert.

Differentiating (S16) with respect to m\mathbf{m},

∇mLˉenc=1σ2nΦT(Φm−yc)+1nKZZ−1(m−μ01)=Wencm−benc,(24)\nabla_{\mathbf{m}}\bar{\mathcal{L}}_{\mathrm{enc}}=\frac{1}{\sigma^2 n}\boldsymbol{\Phi}^{\mathsf{T}}(\boldsymbol{\Phi}\mathbf{m}-\mathbf{y}_c)+\frac{1}{n}\mathbf{K}_{ZZ}^{-1}(\mathbf{m}-\mu_0\mathbf{1})=\mathbf{W}_{\mathrm{enc}}\mathbf{m}-\mathbf{b}_{\mathrm{enc}}, \tag*{(24)}

where

Wenc=1σ2nΦTΦ+1nKZZ−1,benc=1σ2nΦTyc+1nKZZ−1μ01.(25)\mathbf{W}_{\mathrm{enc}}=\frac{1}{\sigma^2 n}\boldsymbol{\Phi}^{\mathsf{T}}\boldsymbol{\Phi}+\frac{1}{n}\mathbf{K}_{ZZ}^{-1},\qquad\mathbf{b}_{\mathrm{enc}}=\frac{1}{\sigma^2 n}\boldsymbol{\Phi}^{\mathsf{T}}\mathbf{y}_c+\frac{1}{n}\mathbf{K}_{ZZ}^{-1}\mu_0\mathbf{1}. \tag*{(25)}

Gradient flow on Eq. (23) gives τm˙=−Wencm+benc\tau\dot{\mathbf{m}}=-\mathbf{W}_{\mathrm{enc}}\mathbf{m}+\mathbf{b}_{\mathrm{enc}} in the recurrent circuit. The input drive includes ΦTyc\boldsymbol{\Phi}^{\mathsf{T}}\mathbf{y}_c, which projects the adjusted observations onto the inducing units. The recurrent operator contains a likelihood term determined by ΦTΦ\boldsymbol{\Phi}^{\mathsf{T}}\boldsymbol{\Phi} and a prior term determined by the precision matrix. Because ΦTΦ\boldsymbol{\Phi}^{\mathsf{T}}\boldsymbol{\Phi} is positive semidefinite and KZZ−1\mathbf{K}_{ZZ}^{-1} is positive definite, Wenc≻0\mathbf{W}_{\mathrm{enc}}\succ0, and m\mathbf{m} converges to the unique minimizer of (S16) from every initial value. This convergence statement assumes a fixed objective and applies to the ideal gradient flow; finite Adam updates need not reach its equilibrium.

Maintenance

During maintenance, the encoding observations are replaced by the network’s preceding predictions. The maintenance objective (Eq. (5)) therefore weights the expected log-likelihood of the network’s own previous posterior means by the attention gains, and multiplies the KL by β\beta. The rehearsal targets t=y~\mathbf{t}=\tilde{\mathbf{y}} are the posterior mean strengths from the preceding epoch. Each epoch holds these targets fixed while updating the variational mean and covariance, then replaces the targets with the updated predicted means. The maintenance likelihood is evaluated at the inducing points, where the predictive moments are m\mathbf{m} and S\mathbf{S}. Let A=diag⁡a(ℓm(2))\mathbf{A}=\operatorname{diag}a(\ell_m^{(2)}) be the diagonal matrix of attention gains, with one gain for each inducing point.

The Gaussian likelihood treats the rehearsal targets at different inducing points as conditionally independent given their function values. Its expected log-likelihood therefore depends on S\mathbf{S} only through the marginal variances SmmS_{mm}. Weighting Eq. (19) by the attention gains gives

∑ma(ℓmz)Smm=tr⁡(AS) and\sum_m a(\ell_m^z)S_{mm}=\operatorname{tr}(\mathbf{A}\mathbf{S})\ \text{and}
−1M∑m=1Ma(ℓmz)Eq[log⁡p(tm∣f(zm))]=12σ2M(m−t)⊤A(m−t)+12σ2Mtr⁡(AS)+const.(26)-\frac{1}{M}\sum_{m=1}^{M}a(\ell_m^z)\mathbb{E}_{q}\left[\log p(t_m\mid f(z_m))\right] =\frac{1}{2\sigma^2M}(\mathbf{m}-\mathbf{t})^\top\mathbf{A}(\mathbf{m}-\mathbf{t}) +\frac{1}{2\sigma^2M}\operatorname{tr}(\mathbf{A}\mathbf{S})+\text{const.} \tag*{(26)}

The KL term of Eq. (5) is β\beta times Eq. (20),

βKL⁡(q(u)∥p(u))=β2(m−μ01)⊤KZZ−1(m−μ01)+β2tr⁡(KZZ−1S)−β2log⁡∣S∣+const.(27)\beta\operatorname{KL}(q(\mathbf{u})\parallel p(\mathbf{u})) =\frac{\beta}{2}(\mathbf{m}-\mu_0\mathbf{1})^\top\mathbf{K}_{ZZ}^{-1}(\mathbf{m}-\mu_0\mathbf{1}) +\frac{\beta}{2}\operatorname{tr}(\mathbf{K}_{ZZ}^{-1}\mathbf{S}) -\frac{\beta}{2}\log|\mathbf{S}|+\text{const.} \tag*{(27)}

With the rehearsal target t\mathbf{t} held fixed, the sum of (S19) and (S20) separates into terms involving the mean m\mathbf{m} and terms involving the covariance S\mathbf{S}. We can therefore differentiate the objective with respect to each quantity separately. The mean-dependent terms are

Lmaint(m)=12σ2M(m−t)⊤A(m−t)+β2(m−μ01)⊤KZZ−1(m−μ01)+const.(28)\mathcal{L}_{\mathrm{maint}}(\mathbf{m}) =\frac{1}{2\sigma^2M}(\mathbf{m}-\mathbf{t})^\top\mathbf{A}(\mathbf{m}-\mathbf{t}) +\frac{\beta}{2}(\mathbf{m}-\mu_0\mathbf{1})^\top\mathbf{K}_{ZZ}^{-1}(\mathbf{m}-\mu_0\mathbf{1}) +\text{const.} \tag*{(28)}

Differentiating the mean-dependent objective with respect to m\mathbf{m} gives

∇mLmaint=1σ2MA(m−t)+βKZZ−1(m−μ01)=Wm−b,(29)\nabla_{\mathbf{m}}\mathcal{L}_{\mathrm{maint}} =\frac{1}{\sigma^2M}\mathbf{A}(\mathbf{m}-\mathbf{t}) +\beta\mathbf{K}_{ZZ}^{-1}(\mathbf{m}-\mu_0\mathbf{1}) =\mathbf{Wm}-\mathbf{b}, \tag*{(29)}

Updating the mean in the direction of the negative gradient gives the recurrent equation:

τm˙=−Wm+b,W=1σ2MA+βKZZ−1,b=1σ2MAt+βKZZ−1μ01.(30)\tau\dot{\mathbf{m}}=-\mathbf{Wm}+\mathbf{b},\qquad \mathbf{W}=\frac{1}{\sigma^2M}\mathbf{A}+\beta\mathbf{K}_{ZZ}^{-1},\qquad \mathbf{b}=\frac{1}{\sigma^2M}\mathbf{A}\mathbf{t}+\beta\mathbf{K}_{ZZ}^{-1}\mu_0\mathbf{1}. \tag*{(30)}

Here A=diag⁡a(ℓmz)\mathbf{A}=\operatorname{diag}a(\ell_m^z) is the diagonal gain matrix from Eq. (7); W\mathbf{W} determines recurrent interactions, and b\mathbf{b} is the drive from rehearsal targets and the prior mean. The rehearsal target is refreshed after each step, t←Eq[f(Z)]\mathbf{t}\leftarrow\mathbb{E}_{q}[f(\mathbf{Z})], and the derivative (S22) treats t\mathbf{t} as constant.

The covariance-dependent terms do not depend on the rehearsal target t\mathbf{t}. Adding the variance term of (S19) to the terms in (S20) that depend on S\mathbf{S} gives

Lmaint(S)=12σ2Mtr⁡(AS)+β2tr⁡(KZZ−1S)−β2log⁡∣S∣=12tr⁡((1σ2MA+βKZZ−1)S)−β2log⁡∣S∣=12tr⁡(WS)−β2log⁡∣S∣,(31)\begin{aligned} \mathcal{L}_{\mathrm{maint}}(\mathbf{S}) =\frac{1}{2\sigma^2M}\operatorname{tr}(\mathbf{A}\mathbf{S}) +\frac{\beta}{2}\operatorname{tr}(\mathbf{K}_{ZZ}^{-1}\mathbf{S}) -\frac{\beta}{2}\log|\mathbf{S}| \\ &=\frac{1}{2}\operatorname{tr}\left(\left(\frac{1}{\sigma^2M}\mathbf{A}+\beta\mathbf{K}_{ZZ}^{-1}\right)\mathbf{S}\right) -\frac{\beta}{2}\log|\mathbf{S}| \\ &=\frac{1}{2}\operatorname{tr}(\mathbf{W}\mathbf{S})-\frac{\beta}{2}\log|\mathbf{S}|, \tag*{(31)} \end{aligned}

with the same W\mathbf{W} as in (S23). Encoding and maintenance have related quadratic forms, but their likelihood projections, normalization factors, and KL coefficients differ. For symmetric W\mathbf{W} and S\mathbf{S}, the derivative is

∂Lmaint∂S=12W−β2S−1.(32)\frac{\partial\mathcal{L}_{\mathrm{maint}}}{\partial\mathbf{S}} = \frac{1}{2}\mathbf{W} - \frac{\beta}{2}\mathbf{S}^{-1}. \tag*{(32)}

Setting the covariance gradient to zero yields the stationary covariance S∗=βW−1\mathbf{S}^{*} = \beta\mathbf{W}^{-1}. Gradient descent on (S24) follows this derivative. The common factor of one half in the gradient can be absorbed into the time constant τ\tau. The resulting continuous-time gradient update is

τS˙=−(W−βS−1),S∗=βW−1.(33)\tau\dot{\mathbf{S}} = -(\mathbf{W} - \beta\mathbf{S}^{-1}), \qquad\mathbf{S}^{*} = \beta\mathbf{W}^{-1}. \tag*{(33)}

Increasing the diagonal entries of A\mathbf{A} near the cue increases the corresponding diagonal entries of W\mathbf{W} and reduces the corresponding stationary marginal variances in S∗\mathbf{S}^{*} when the other quantities are fixed. The simulated finite delay need not reach this stationary covariance.

The mean and covariance can respond differently to a cue. When the rehearsal target equals the current mean, t=m\mathbf{t} = \mathbf{m}, the attention-weighted rehearsal term contributes nothing to the mean gradient (Eq. (29)), which then contains only the prior-dependent term. Attention still enters the covariance update through W\mathbf{W} (Eq. (33)). A cue can therefore reduce the variance of the cued strengths without changing their mean, consistent with the simulated dissociation between posterior mean and variance (Figure 3k,Figure 3l).

Retrieval

The maintained mean and covariance (m,S)(\mathbf{m}, \mathbf{S}) define a posterior over memory strengths. The circuit uses the same retrieval rule as the behavioral simulations: draw strengths jointly across colors and occupied locations, subtract the global sampled minimum to obtain nonnegative responses, and apply spatial divisive normalization as specified in S1.5. The report is c^=arg max⁡cr(c)\hat{c} = \operatorname*{arg\,max}_{c} r(c). Sampling and normalization are specified readout operations; they are not derived as additional recurrent dynamics from the variational objective.

Dependence of the recurrent weights on the kernel

The prior-dependent recurrent weights are the off-diagonal entries of −KZZ−1-\mathbf{K}_{ZZ}^{-1}, so their pattern depends on the kernel (Supplementary Figure S3). Each panel of the figure shows the weights from one unit to all other units on the 10×1010 \times10 inducing grid of Figure 5b. Numerical inversion of KZZ\mathbf{K}_{ZZ} requires a small jitter ε\varepsilon on its diagonal, so the panels show −(KZZ+εI)−1-(\mathbf{K}_{ZZ} + \varepsilon\mathbf{I})^{-1}, with the self-coupling removed and weights scaled by their largest absolute entry.

The weight pattern also depends on ε\varepsilon when KZZ\mathbf{K}_{ZZ} is nearly singular. The periodic kernel used in the paper (λ=10\lambda= 10) is nearly singular on this grid: the smallest eigenvalue of its one-dimensional kernel matrix is 5×10−85 \times10^{-8}. Components of KZZ\mathbf{K}_{ZZ} with eigenvalues below ε\varepsilon are set by the jitter, so the weights change with ε\varepsilon (Supplementary Figure S3–Figure S3). Figure 5b uses ε=10−3\varepsilon= 10^{-3}.

References

  1. [1]Steven J. Luck and Edward K. Vogel. The capacity of visual working memory for features and conjunctions. Nature, 390(6657):279–281, November 1997. ISSN 1476-4687. doi: 10.1038/36846.DOI
  2. [2]Weiwei Zhang and Steven J. Luck. Discrete fixed-resolution representations in visual working memory. Nature, 453(7192):233–235, May 2008. ISSN 1476-4687. doi: 10.1038/nature06860.DOI
  3. [3]Paul M. Bays, Raquel F. G. Cataloa, and Masud Husain. The precision of visual working memory is set by allocation of a shared resource. Journal of Vision, 9(10):7, September 2009. ISSN 1534-7362. doi: 10.1167/9.10.7.DOI
  4. [4]Wei Ji Ma, Masud Husain, and Paul M. Bays. Changing concepts of working memory. Nature Neuroscience, 17(3):347–356, March 2014. ISSN 1546-1726. doi: 10.1038/nn.3655.DOI
  5. [5]Ivan C. Griffin and Anna C. Nobre. Orienting Attention to Locations in Internal Rep-resentations. Journal of Cognitive Neuroscience, 15(8):1176–1194, November 2003. doi: 10.1162/089892903322598139.DOI
  6. [6]Freek Van Ede and Anna C Nobre. Turning attention inside out: How working memory serves behavior. Annual review of psychology, 74(1):137–165, 2023.
  7. [7]Dongwei Li, Yiqing Hu, Mengdi Qi, Chenguang Zhao, Ole Jensen, Jing Huang, and Yan Song. Prioritizing flexible working memory representations through retrospective attentional strengthening. NeuroImage, 269:119902, April 2023. doi: 10.1016/j.neuroimage.2023.119902.DOI
  8. [8]Paul M. Bays and Robert Taylor. A neural model of retrospective attention in visual working memory. Cognitive Psychology, 100:43–52, February 2018. ISSN 00100285. doi: 10.1016/j.cogpsych.2017.12.001.DOI
  9. [9]Michi Matsukura, Steven J. Luck, and Shaun P. Vecera. Attention effects during visual short-term memory maintenance: Protection or prioritization? Perception & Psychophysics, 69(8):1422–1434, 2007. doi: 10.3758/BF03192957.DOI
  10. [10]Yoni Pertzov, Paul M. Bays, Sabine Joseph, and Masud Husain. Rapid forgetting prevented by retrospective attention cues. Journal of Experimental Psychology: Human Perception and Performance, 39(5):1224–1231, 2013. doi: 10.1037/a0030947.DOI
  11. [11]Xiao-Jing Wang. Synaptic reverberation underlying mnemonic persistent activity. Trends in neurosciences, 24(8):455–463, 2001.pubmed.ncbi.nlm.nih.gov/11476885
  12. [12]Flora Bouchacourt and Timothy J Buschman. A flexible model of working memory. Neuron, 103(1):147–160, 2019.
  13. [13]Gianluigi Mongillo, Omri Barak, and Misha Tsodyks. Synaptic theory of working memory. Science, 319(5869):1543–1546, 2008. doi: 10.1126/science.1150769.DOI
  14. [14]Michael J. Wolff, Janina Jochim, Elkan G. Akyürek, and Mark G. Stokes. Dynamic hidden states underlying working-memory-guided behavior. Nature Neuroscience, 20(6):864–871, 2017. doi: 10.1038/nn.4546.DOI
  15. [15]David Marr. Vision: A Computational Investigation into the Human Representation and Processing of Visual Information. W. H. Freeman, San Francisco, 1982.
  16. [16]Peter Dayan, Laurence F Abbott, et al. Theoretical neuroscience. Taylor & Francis, 2005.
  17. [17]Ziqiang Wei, Xiao-Jing Wang, and Da-Hui Wang. From distributed resources to limited slots in multiple-item working memory: A spiking network model with normalization. Journal of Neuroscience, 32(33):11228–11240, 2012. doi: 10.1523/JNEUROSCI.0735-12.2012.DOI
  18. [18]Paul M. Bays. Noise in Neural Populations Accounts for Errors in Working Memory. Journal of Neuroscience, 34(10):3632–3645, March 2014. ISSN 0270-6474, 1529-2401. doi: 10.1523/JNEUROSCI.3204-13.2014.DOI
  19. [19]Sebastian Schneegans, Robert Taylor, and Paul M. Bays. Stochastic sampling provides a unifying account of visual working memory limits. Proceedings of the National Academy of Sciences, 117(34):20959–20968, August 2020. ISSN 0027-8424, 1091-6490. doi: 10.1073/pnas.2004306117.DOI
  20. [20]Mark W. Schurgin, John T. Wixted, and Timothy F. Brady. Psychophysical scaling reveals a unified theory of visual memory strength. Nature Human Behaviour, 4(11):1156–1172, November 2020. ISSN 2397-3374. doi: 10.1038/s41562-020-00938-0.DOI
  21. [21]Christopher KI Williams and Carl Edward Rasmussen. Gaussian processes for machine learning, volume 2. MIT press, Cambridge, MA, 2006.DOI
  22. [22]David C. Knill and Alexandre Pouget. The Bayesian brain: The role of uncertainty in neural coding and computation. Trends in Neurosciences, 27(12):712–719, December 2004. ISSN 01662236. doi: 10.1016/j.tins.2004.10.007.DOI
  23. [23]Hsin-Hung Li, Thomas C. Sprague, Aspen H. Yoo, Wei Ji Ma, and Clayton E. Curtis. Joint representation of working memory and uncertainty in human cortex. Neuron, 109(22):3699–3712.e6, November 2021. ISSN 0896-6273. doi: 10.1016/j.neuron.2021.08.022.DOI
  24. [24]Michalis K. Titsias. Variational learning of inducing variables in sparse gaussian processes. In David van Dyk and Max Welling, editors, Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics, volume 5 of Proceedings of Machine Learning Research, pages 567–574, Clearwater Beach, Florida, USA, 2009. PMLR. URL https://proceedings.mlr.press/v5/titsias09a.html.
  25. [25]Patrick Wilken and Wei Ji Ma. A detection theory account of change detection. Journal of Vision, 4(12):1120–1135, December 2004. ISSN 1534-7362. doi: 10.1167/4.12.11.DOI
  26. [26]Klaus Wimmer, Duane Q. Nykamp, Christos Constantinidis, and Albert Compte. Bump attractor dynamics in prefrontal cortex explains behavioral precision in spatial working memory. Nature Neuroscience, 17(3):431–439, March 2014. ISSN 1546-1726. doi: 10.1038/nn.3645.DOI
  27. [27]Albert Compte, Nicolas Brunel, Patricia S. Goldman-Rakic, and Xiao-Jing Wang. Synaptic mechanisms and network dynamics underlying spatial working memory in a cortical network model. Cerebral Cortex, 10(9):910–923, 2000. doi: 10.1093/cercor/10.9.910.DOI
  28. [28]Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In International conference on learning representations, 2017.
  29. [29]Matteo Carandini and David J. Heeger. Summation and Division by Neurons in Primate Visual Cortex. Science, 264(5163):1333–1336, May 1994. doi: 10.1126/science.8191289.DOI
  30. [30]Matteo Carandini and David J. Heeger. Normalization as a canonical neural computation. Nature Reviews Neuroscience, 13(1):51–62, 2012. doi: 10.1038/nrn3136.DOI
  31. [31]Ronald van den Berg, Hongsup Shin, Wen-Chuang Chou, Ryan George, and Wei Ji Ma. Variability in encoding precision accounts for visual short-term memory limitations. Proceedings of the National Academy of Sciences, 109(22):8780–8785, May 2012. doi: 10.1073/pnas.1117465109.DOI
  32. [32]Stephen M. Emrich and Susanne Ferber. Competition increases binding errors in visual working memory. Journal of Vision, 12(4):12, April 2012. ISSN 1534-7362. doi: 10.1167/12.4.12.DOI
  33. [33]Laura Rerko, Klaus Oberauer, and Hsuan-Yu Lin. Spatial transposition gradients in visual working memory. Quarterly Journal of Experimental Psychology, 67(1):3–15, January 2014. ISSN 1747-0226. doi: 10.1080/17470218.2013.789543.DOI
  34. [34]Paul M. Bays. Evaluating and excluding swap errors in analogue tests of working memory. Scientific Reports, 6(1):19203, January 2016. ISSN 2045-2322. doi: 10.1038/srep19203.DOI
  35. [35]Sebastian Schneegans and Paul M. Bays. Neural Architecture for Feature Binding in Visual Working Memory. The Journal of Neuroscience, 37(14):3913–3925, April 2017. ISSN 0270-6474, 1529-2401. doi: 10.1523/JNEUROSCI.3493-16.2017.DOI
  36. [36]Jessica M. V. McMaster, Ivan Tomić, Sebastian Schneegans, and Paul M. Bays. Swap errors in visual working memory are fully explained by cue-feature variability. Cognitive Psychology, 137:101493, September 2022. ISSN 0010-0285. doi: 10.1016/j.cogpsych.2022.101493.DOI
  37. [37]Daryl Fougnie, Jordan W. Suchow, and George A. Alvarez. Variability in the quality of visual working memory. Nature Communications, 3(1):1229, November 2012. ISSN 2041-1723. doi: 10.1038/ncomms2237.DOI
  38. [38]Alessandra S. Souza and Klaus Oberauer. In search of the focus of attention in working memory: 13 years of the retro-cue effect. Attention, Perception, & Psychophysics, 78(7):1839–1860, 2016. doi: 10.3758/s13414-016-1108-5.DOI
  39. [39]Alessandra S. Souza, Laura Rerko, Hsuan-Yu Lin, and Klaus Oberauer. Focused attention improves working memory: Implications for flexible-resource and discrete-capacity models. Attention, Perception, & Psychophysics, 76(7):2085–2104, 2014. doi: 10.3758/s13414-014-0687-2.DOI
  40. [40]Dirk van Moorselaar, Christian N. L. Olivers, Jan Theeuwes, Victor A. F. Lamme, and Ilja G. Sligte. Forgotten but not gone: Retro-cue costs and benefits in a double-cueing paradigm suggest multiple states in visual short-term memory. Journal of Experimental Psychology: Learning, Memory, and Cognition, 41(6):1755–1763, 2015. doi: 10.1037/xlm0000124.DOI
  41. [41]Yiqing Hu, Xuye Yuan, Yiwen Li, Yuanjun Kong, Jing Huang, Yan Song, and Dongwei Li. Load-Dependent Retrospective Attentional Benefits During Visual Working Memory. Neuroscience Bulletin, December 2025. ISSN 1995-8218. doi: 10.1007/s12264-025-01556-4.DOI
  42. [42]Timothy F. Brady and George A. Alvarez. Hierarchical encoding in visual working memory: Ensemble statistics bias memory for individual items. Psychological Science, 22(3):384–392, 2011. doi: 10.1177/0956797610397956.DOI
  43. [43]Gi-Yeul Bae and Steven J. Luck. Interactions between visual working memory representations. Attention, Perception, & Psychophysics, 79(8):2376–2395, August 2017. ISSN 1943-393X. doi: 10.3758/s13414-017-1404-8.DOI
  44. [44]Paul S. Scotti, Yoolim Hong, Andrew B. Leber, and Julie D. Golomb. Visual working memory items drift apart due to active, not passive, maintenance. Journal of Experimental Psychology: General, 150(12):2506–2524, 2021. doi: 10.1037/xge0000890.DOI
  45. [45]Chaipat Chunharas, Rosanne L. Rademaker, Timothy F. Brady, and John T. Serences. An adaptive perspective on visual working memory distortions. Journal of Experimental Psychology: General, 151(10):2300–2323, 2022. ISSN 1939-2222. doi: 10.1037/xge0001191.DOI
  46. [46]Igor S. Utochkin and Timothy F. Brady. Individual representations in visual working memory inherit ensemble properties. Journal of Experimental Psychology: Human Perception and Performance, 46(5):458–473, 2020. doi: 10.1037/xhp0000727.DOI
  47. [47]Zachary Lively, Maria M. Robinson, and Aaron S. Benjamin. Memory fidelity reveals qualitative changes in interactions between items in visual working memory. Psychological Science, 32(9):1426–1441, 2021. doi: 10.1177/0956797621997367.DOI
  48. [48]Anxin Miao, Timothy F. Brady, and Maria M. Robinson. Bridging Bayesian and representational theories of memory to predict memory bias. Journal of Experimental Psychology: General, 155(11):2631–2644, 2026. ISSN 1939-2222. doi: 10.1037/xge0001945.DOI
  49. [49]Garrett Swan and Brad Wyble. The binding pool: A model of shared neural resources for distinct items in visual working memory. Attention, Perception, & Psychophysics, 76(7):2136–2157, October 2014. ISSN 1943-393X. doi: 10.3758/s13414-014-0633-3.DOI
  50. [50]Klaus Oberauer and Hsuan-Yu Lin. An interference model of visual working memory. Psychological Review, 124(1):21–59, 2017. ISSN 1939-1471. doi: 10.1037/rev0000044.DOI
  51. [51]Rita Almeida, João Barbosa, and Albert Compte. Neural circuit basis of visuo-spatial working memory precision: a computational and behavioral study. Journal of neurophysiology, 114(3):1806–1818, 2015.DOI
  52. [52]Geoffrey E. Hinton and David C. Plaut. Using fast weights to deblur old memories. In Proceedings of the 9th Annual Conference of the Cognitive Science Society, pages 177–186, Hillsdale, NJ, 1987. Lawrence Erlbaum Associates.
  53. [53]Jürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992.DOI
  54. [54]Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. Linear transformers are secretly fast weight programmers. In International conference on machine learning, pages 9355–9366. PMLR, 2021.arxiv.org/abs/2102.11174
  55. [55]Ruben S. van Bergen, Wei Ji Ma, Michael S. Pratte, and Janneke F. M. Jehee. Sensory uncertainty decoded from visual cortex predicts behavior. Nature Neuroscience, 18(12):1728–1730, December 2015. ISSN 1546-1726. doi: 10.1038/nn.4150.DOI
  56. [56]Ronald van den Berg and Wei Ji Ma. A resource-rational theory of set size effects in human visual working memory. eLife, 7:e34963, August 2018. ISSN 2050-084X. doi: 10.7554/eLife.34963.DOI
  57. [57]Harriet Feldman and Karl J. Friston. Attention, uncertainty, and free-energy. Frontiers in Human Neuroscience, 4:215, 2010. doi: 10.3389/fnhum.2010.00215.DOI
  58. [58]Thomas Parr and Karl J. Friston. Working memory, attention, and salience in active inference. Scientific Reports, 7(1):14678, November 2017. ISSN 2045-2322. doi: 10.1038/s41598-017-15249-0.DOI
  59. [59]Paul M. Bays and Masud Husain. Dynamic Shifts of Limited Working Memory Resources in Human Vision. Science, 321(5890):851–854, August 2008. doi: 10.1126/science.1158023.DOI
  60. [60]Stephen M. Emrich, Holly A. Lockhart, and Naseem Al-Aidroos. Attention mediates the flexible allocation of visual working memory resources. Journal of Experimental Psychology: Human Perception and Performance, 43(7):1454–1465, July 2017. ISSN 1939-1277, 0096-1523. doi: 10.1037/xhp0000398.DOI
  61. [61]Hsin-Hung Li, Thomas C. Sprague, Aspen H. Yoo, Wei Ji Ma, and Clayton E. Curtis. Neural mechanisms of resource allocation in working memory. Science Advances, 11(15):eadr8015, April 2025. doi: 10.1126/sciadv.adr8015.DOI
  62. [62]Shun-ichi Amari. Dynamics of pattern formation in lateral-inhibition type neural fields. Biological Cybernetics, 27(2):77–87, 1977. doi: 10.1007/BF00337259.DOI
  63. [63]Shintaro Funahashi, Charles J. Bruce, and Patricia S. Goldman-Rakic. Mnemonic coding of visual space in the monkey’s dorsolateral prefrontal cortex. Journal of Neurophysiology, 61(2):331–349, February 1989. ISSN 0022-3077. doi: 10.1152/jn.1989.61.2.331.DOI
  64. [64]S. Chenchal Rao, Gregor Rainer, and Earl K. Miller. Integration of what and where in the primate prefrontal cortex. Science, 276(5313):821–824, May 1997. ISSN 1095-9203. doi: 10.1126/science.276.5313.821.DOI
  65. [65]Omri Barak and Misha Tsodyks. Persistent activity in neural networks with dynamic synapses. PLoS Computational Biology, 3(2):e35, 2007. doi: 10.1371/journal.pcbi.0030035.
  66. [66]Mark G. Stokes. ‘Activity-silent’ working memory in prefrontal cortex: A dynamic coding framework. Trends in Cognitive Sciences, 19(7):394–405, July 2015. ISSN 1364-6613. doi: 10.1016/j.tics.2015.05.004.DOI
  67. [67]Nicolas Y. Masse, Guangyu R. Yang, H. Francis Song, Xiao-Jing Wang, and David J. Freedman. Circuit mechanisms for the maintenance and manipulation of information in working memory. Nature Neuroscience, 22(7):1159–1167, 2019. doi: 10.1038/s41593-019-0414-3.DOI
  68. [68]Joao Barbosa, Heike Stein, Rebecca L. Martinez, Adria Galan-Gadea, Sihai Li, Josep Dalmau, Kirsten C. S. Adam, Josep Valls-Solé, Christos Constantinidis, and Albert Compte. Interplay between persistent activity and activity-silent dynamics in the prefrontal cortex underlies serial biases in working memory. Nature Neuroscience, 23(8):1016–1024, 2020. doi: 10.1038/s41593-020-0644-4.DOI
  69. [69]Samuel J Gershman and Jeffrey M Beck. Complex probabilistic inference: From cognition to neural computation. Computational models of brain and behavior, pages 453–466, 2017.
  70. [70]Hadi Vafaii, Dekel Galor, and Jacob Yates. Brain-like variational inference. Advances in Neural Information Processing Systems, 38:163700–163778, 2026.pubmed.ncbi.nlm.nih.gov/40463688
  71. [71]Hadi Vafaii and Jacob L. Yates. Metabolic cost of information processing in Poisson variational autoencoders. In Proceedings of Cognitive Computational Neuroscience 2026, New York City, 2026. Cognitive Computational Neuroscience. doi: 10.32470/6ff31r0.DOI
  72. [72]Jochen Görtler, Rebecca Kehlbeck, and Oliver Deussen. A Visual Exploration of Gaussian Processes. Distill, 4(4):e17, April 2019. ISSN 2476-0757. doi: 10.23915/distill.00017.DOI
  73. [73]Jasper Snoek, Hugo Larochelle, and Ryan Adams. Practical bayesian optimization of machine learning algorithms. Advances in neural information processing systems, 25, 2012.arxiv.org/abs/1206.2944
  74. [74]Matthew F. Panichello, Brian DePasquale, Jonathan W. Pillow, and Timothy J. Buschman. Error-correcting dynamics in visual working memory. Nature Communications, 10:3366, 2019. doi: 10.1038/s41467-019-11298-3.DOI
  75. [75]Jacob R. Gardner, Geoff Pleiss, Kilian Q. Weinberger, David Bindel, and Andrew Gordon Wilson. GPyTorch: Blackbox matrix-matrix Gaussian process inference with GPU acceleration. In Advances in Neural Information Processing Systems, volume 31, 2018.arxiv.org/abs/1809.11165
  76. [76]James Hensman, Alexander G. de G. Matthews, and Zoubin Ghahramani. Scalable variational Gaussian process classification. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, volume 38 of Proceedings of Machine Learning Research, pages 351–360. PMLR, 2015. URL https://proceedings.mlr.press/v38/hensman15.html.arxiv.org/abs/1411.2005
  77. [77]James Hensman, Alexander G. de G. Matthews, Maurizio Filippone, and Zoubin Ghahramani. MCMC for variationally sparse Gaussian processes. In Advances in Neural Information Processing Systems, volume 28, pages 1648–1656, 2015.arxiv.org/abs/1506.04000
  78. [78]Alexander G. de G. Matthews. Scalable Gaussian Process Inference Using Variational Methods. PhD thesis, University of Cambridge, 2016.DOI

Paper details

vlnc:W_gq4vw6g7
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 7

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Agricultural and Biological Sciences

Not recorded for this paper

View statement
Looking for related papers…
Contents