OSCR

Modeling attention and binding in the brain through bidirectional recurrent gating.

Code ↔ Paper

8 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 8 matches
  1. [1] § Methods › Evaluation › Bell-curve fitting ↔ src/curves_utils.py, lines 236–271 · score 0.86 · Euclidean Distance, half width, preferred orientation, 179 deg, bell, asymptote
  2. [2] § Methods › Model ↔ src/modelv2.py, lines 182–280 · score 0.85 · AdaptiveAvgPool2d, MaxPool2d, ConvTranspose2d, Conv2d, Unflatten, Concat
  3. [3] § Methods › Model ↔ src/resatt_.py, lines 107–180 · score 0.83 · AdaptiveAvgPool2d, MaxPool2d, ConvTranspose2d, Conv2d, Unflatten, UpSample
  4. [4] § Methods › Optimization ↔ main_mmshape.py, lines 98–123 · score 0.62 · weight decay, OneCycleLR, Cosine, Adam, scheduling, optimizer
  5. [5] § Methods › Evaluation ↔ src/conductor.py, lines 328–432 · score 0.61 · cross entropy, pixel error, class weighting, validation, loss, accuracy
  6. [6] § Methods › Optimization ↔ main_stl10.py, lines 163–185 · score 0.61 · weight decay, OneCycleLR, Cosine, Adam, scheduling, optimizer
  7. [7] § Results › Neurophysiological results › Attention-invariant tuning ↔ src/curves_utils.py, lines 155–160 · score 0.55 · McAdams, orientation tuning, Maunsell, unattended, curves, attending
  8. [8] § Methods › Optimization ↔ src/conductor.py, lines 80–198 · score 0.51 · cross entropy, class weights, sum, MSE, loss, Optimization

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 310 lines · 12 KB · GPL-3.0 · 2 matches

  1. # # built-in modules
  2. import os
  3. import argparse
  4. from pprint import pformat
  5. from collections import OrderedDict
  6. import random
  7. # # Torch modules
  8. import torch
  9. # # internal imports
  10. from prelude import save_dicts, startup_folders, get_device, save_results_to_csv, load_dicts
  11. from src.composer import CurveTracing, transforms, conv2d, bezier_generator
  12. from src.model import AttentionModel
  13. from src.utils import plot_all, plot_loss_all, DataLoader
  14. from src.utils import build_loaders, get_n_parameters
  15. from src.conductor import AttentionTrain
  16. import matplotlib
  17. import numpy
  18. import math
  19. import matplotlib.pyplot as plt
  20. from matplotlib import cm
  21. from scipy.ndimage import gaussian_filter1d
  22. c = matplotlib.colormaps["tab10"]
  23. def gaussian(x, mu, std):
  24. """
  25. Gaussian normalized function
  26. """
  27. y = torch.exp( - ((x - mu) / std)**2 / 2 ) / (std * math.sqrt(2 * math.pi))
  28. return y
  29. def roll_to_mean(x):
  30. d = x.size(-1)
  31. argmean = torch.argmax(x, dim=-1).item()
  32. roll = -argmean + d//2 + d%2 - 1
  33. return torch.roll(x, roll, dims=-1), roll
  34. def try_gaussian_fit(x):
  35. d = x.numel()
  36. v = torch.arange(d)
  37. mean = torch.argmax(x).item()
  38. std = torch.argmin((torch.cumsum(x, dim=0) - 0.859 * x.sum()).square()).item() - mean
  39. return gaussian(v, mean, std)
  40. def does_it_fit(x):
  41. y = try_gaussian_fit(x)
  42. x = x / torch.linalg.norm(x)
  43. y = y / torch.linalg.norm(y)
  44. z = torch.dot(y, x)
  45. return z
  46. def parameters_of_orientation_tuning(x, k=180):
  47. a = torch.max(x).item()
  48. d = torch.argmax(x).item()
  49. b = (torch.argmin((torch.cumsum(x, dim=0) - 0.859 * x.sum()).square()).item() - d)/k
  50. c = torch.min(x).item()
  51. return a, b, c, d
  52. def scale_(x: torch.Tensor, dim=((-2, -1)), eps=1e-6):
  53. return x / (x.abs().flatten(start_dim=dim[0], end_dim=dim[1]).max(dim=-1, keepdim=True).values + eps)
  54. def gabor(h: float, w: float, sigma: float, theta: float, k: float):
  55. pi = torch.pi
  56. rh, rw = int(h//2), int(w//2)
  57. xx, yy = torch.meshgrid(torch.arange(-rh, rh), torch.arange(-rw, rw), indexing='ij')
  58. cc = torch.zeros(h, w)
  59. x = xx * math.cos(theta) + yy * math.sin(theta)
  60. y = -xx * math.sin(theta) + yy * math.cos(theta)
  61. gaussian = torch.exp(- sigma**2 / (8 * k**2) * (4 * x**2 + y**2)) * sigma**2 / (4*pi * k**2)
  62. sinusoid = torch.cos(sigma * x) * math.exp(k**2 / 2)
  63. stimulus = torch.clamp(scale_(gaussian * sinusoid), 0.0, 1.0)
  64. cc[rh-1:rh+1, rw-1:rh+1] = 1.0
  65. return stimulus.unsqueeze(0), cc.unsqueeze(0)
  66. def make_bar(h: float, w: float, theta: float, k = 19, sigma: float = 3.0):
  67. if k > 0 and sigma > 0:
  68. blur = transforms.GaussianBlur(k, sigma=(sigma, sigma))
  69. else:
  70. blur = lambda x: x
  71. p = min(h//2, w//2)
  72. pp = p//4
  73. x = torch.zeros(1, h, w)
  74. c = torch.zeros(1, h, w)
  75. x[:, p-2:p+1, pp:3*pp+p] = 1.0
  76. c[:, p-3:p+2, pp-2:pp+3] = 1.0
  77. x = transforms.functional.rotate(x, theta, interpolation=transforms.InterpolationMode.BILINEAR)
  78. c = transforms.functional.rotate(c, theta, interpolation=transforms.InterpolationMode.BILINEAR)
  79. x = blur(x)
  80. c = blur(c)
  81. x = scale_(x, dim=(-2, -1))
  82. c = scale_(c, dim=(-2, -1))
  83. return x, c
  84. def generate_bezier_rot(b: int, h: float, w: float, ds: CurveTracing):
  85. radius = 0.3
  86. bezier_order = 1
  87. resolution = ds.resolution
  88. stimulus_kernel = ds.stimulus_kernel
  89. fixate_kernel = ds.fixate_kernel
  90. saccade_kernel = ds.saccade_kernel
  91. samples = torch.zeros(3, b, 1, h, w)
  92. t_ = torch.linspace(0., 1.0, resolution) # parameter
  93. c_ = torch.rand(b, bezier_order + 1, 2, 1) # coordinates
  94. for j in range(b):
  95. c_[j, 0, 0] = 0.5 + radius * math.cos(math.pi * j / b)
  96. c_[j, 0, 1] = 0.5 + radius * math.sin(math.pi * j / b)
  97. c_[j, 1, 0] = 0.5 - radius * math.cos(math.pi * j / b)
  98. c_[j, 1, 1] = 0.5 - radius * math.sin(math.pi * j / b)
  99. for i in range(b):
  100. im_ = torch.zeros(3, 1, h, w)
  101. b_ = bezier_generator(c_[i], t_) # Bezier curve
  102. b_h, b_w = (b_[0] * h).int().tolist(), (b_[1] * w).int().tolist()
  103. im_[0, :, b_h, b_w] = 1.0
  104. im_[1, :, b_h[0], b_w[0]] = 1.0
  105. im_[2, :, b_h[-1], b_w[-1]] = 1.0
  106. im_[0] = (conv2d(im_[0], stimulus_kernel, padding='same') > 0.0)
  107. im_[1] = (conv2d(im_[1], fixate_kernel, padding='same') > 0.0)
  108. im_[2] = (conv2d(im_[2], saccade_kernel, padding='same') > 0.0)
  109. samples[:, i] = im_
  110. return samples
  111. def make_stimuli(h: int, w: int, b: int, ds:CurveTracing , bar: bool = False):
  112. assert h%4 == 0 and w%4 == 0
  113. x = torch.zeros(b, 1, h, w)
  114. xc = torch.zeros(b, 1, h, w)
  115. zc = torch.zeros(b, 1, h, w)
  116. t = torch.zeros(b, 1, h, w)
  117. theta = torch.linspace(0., 179., b)
  118. better_bars = generate_bezier_rot(b, h//2, w//2, ds)
  119. for i in range(b):
  120. if bar:
  121. xx, cc = better_bars[0, i], better_bars[1, i] # make_bar(h//2, w//2, theta[i].item())
  122. else:
  123. xx, cc = gabor(h//2, w//2, torch.pi/4, theta[i].item()*torch.pi/180.0, 2.0)
  124. x[i, :, :h//2, :w//2] = xx
  125. x[i, :, -h//2:, -w//2:] = xx
  126. xc[i, :, :h//2, :w//2] = cc
  127. zc[i, :, -h//2:, -w//2:] = cc
  128. t[i, :, :h//2, :w//2] = xx
  129. return x, xc, zc, t
  130. def parameters_of_orientation_tuning(x, n=180):
  131. a, d = x.max(dim=-1)
  132. b = (torch.argmin((torch.cumsum(x, dim=-1) - 0.859 * x.sum(dim=-1, keepdim=True)).square(), dim=-1) - d)/n
  133. c = torch.min(x, dim=-1).values
  134. mu = x.mean(dim=-1)
  135. md = x.median(dim=-1).values
  136. return a, b, c, d, mu, md
  137. def modulation_index(a: torch.Tensor, u: torch.Tensor):
  138. """
  139. attentional modulation index: (attended - unattended)/(attended + unattended)
  140. ref: McAdams and Maunsell · Effects of Attention on Orientation Tuning
  141. """
  142. return torch.nan_to_num((a - u) / (a + u), nan=0.0, posinf=0.0, neginf=0.0)
  143. def normed_mse_loss(predictions: torch.Tensor, targets: torch.Tensor, reduction: str = 'mean', donorm: bool = True) -> float:
  144. if donorm:
  145. predictions = (predictions + 1.0) / 2.0
  146. targets = (targets + 1.0) / 2.0
  147. corrects = (predictions - targets).square().sum()
  148. return corrects / targets.numel() if reduction == 'mean' else corrects * targets.size(0) / targets.numel()
  149. def roelf_accuracy(y_t: torch.Tensor, y_d: torch.Tensor, y_p: torch.Tensor):
  150. y_tp = (y_t * y_p).sum(dim=(-3, -2, -1))
  151. y_dp = (y_d * y_p).sum(dim=(-3, -2, -1))
  152. return (y_tp > y_dp).sum().item() / y_t.size(0)
  153. def get_rec_field_act(model: AttentionModel, x: torch.Tensor, e: float = 1e-3):
  154. # x is the stimulus or receptive field as (batch, channel, h, w)
  155. # get the receptive field
  156. list_ind = [[] for _ in range(model.n_convs)]
  157. base_act = [[] for _ in range(model.n_convs)]
  158. for i in range(model.n_convs):
  159. conv = model.conv_blocks[i].conv
  160. pool = model.conv_blocks[i].pool if model.conv_blocks[i].pool is not None else lambda x: x
  161. fun = model.conv_blocks[i].fun
  162. x = pool(fun(conv(x)))
  163. base_act[i] = x
  164. list_ind[i] = (x.abs() > e)
  165. return list_ind, base_act
  166. def get_activity(model: AttentionModel, x: torch.Tensor):
  167. if x.ndim == 4: # (batch, channel, h, w)
  168. x = x.unsqueeze(1) # (batch, n_iter, channel, h, w)
  169. batch_size, n_iter = x.size(0), x.size(1)
  170. all_acts = []
  171. model.eval()
  172. with torch.no_grad():
  173. model.initiate_forward(batch_size=batch_size)
  174. for i in range(n_iter):
  175. *_, act_ = model.one_forward(x[:, i])
  176. all_acts.append(act_)
  177. return all_acts
  178. def polar_plot(xt, xd, theta_res, results_folder, plotname):
  179. theta = torch.linspace(0, 2*torch.pi, 2*theta_res)
  180. fig, ax = plt.subplots(figsize=(3, 2), subplot_kw={'projection': 'polar'})
  181. r_max = max(xt.max().item(), xd.max().item())
  182. ax.plot(theta, torch.cat([xt, xt])/r_max, c='#E91EF9')
  183. ax.plot(theta, torch.cat([xd, xd])/r_max, c='#07BAFC')
  184. ax.set_rmax(1.05)
  185. # ax.set_rticks([0.25, 0.5, 0.75]) # Less radial ticks
  186. # ax.set_xticks(torch.linspace(0, 2*torch.pi, 8)) # Less radial ticks
  187. # ax.set_xticklabels(["$0^\circ$", None, "$90^\circ$", None, "$180^\circ$", None, "$270^\circ$", None]) # Less radial ticks
  188. # ax.set_xticklabels([0, 90, 180, 270]) # Less radial ticks
  189. # ax.set_yticklabels([]) # Less radial ticks
  190. # ax.set_rlabel_position(0.0) # Move radial labels away from plotted line
  191. ax.grid(True)
  192. # ax.set_title(f"Scaled response of Cell {c} Layer {i} ", va='bottom')
  193. # if argus.res_fold is not None:
  194. plt.savefig(os.path.join(results_folder, 'Tuning_Curve' + plotname + '.svg'))
  195. plt.close()
  196. def plot_curves(n_layers, curve_tar_act, curve_dis_act, results_folder = None, plotname = None):
  197. for j in range(n_layers):
  198. plt.figure(figsize=(6, 4))
  199. # mean = torch.cat([mean_tar_act[j][:2], mean_dis_act[j][:2]]).mean().cpu()
  200. plt.plot(curve_tar_act[j].detach().cpu(), color="r")
  201. plt.plot(curve_dis_act[j].detach().cpu(), color="b")
  202. plt.title(f"Layer {j}")
  203. if results_folder is None or plotname is None:
  204. plt.show()
  205. else:
  206. plt.savefig(os.path.join(results_folder, f"{plotname}_{j}.svg"), format="svg")
  207. plt.close()
  208. class FitBellCurve:
  209. def __init__(self):
  210. self.d = 180
  211. self.x = torch.linspace(0, 179, self.d)
  212. self.z = torch.ones_like(self.x) * 0.5
  213. def roll(self, y: torch.Tensor, b: int):
  214. h = self.d//2
  215. return y.roll(h - b)
  216. def normal(self, mu: float, std: float):
  217. # Normalized Gaussian function
  218. return torch.exp(-((self.x-mu)**2)/(2*std**2)) / (std * math.sqrt(2*math.pi))
  219. def mean_euc(self, y_t: torch.Tensor, y_p: torch.Tensor):
  220. # Calculate the mean euclidean distance between two curves
  221. return (y_t - y_p).square().sum().sqrt() / self.d
  222. def __call__(self, y: torch.Tensor):
  223. d = y.min().item() # Asymptote (baseline)
  224. y = y - d # Remove the asymptote
  225. a = y.max().item() # Amplitude (peak)
  226. y = y / a # Normalize the amplitude
  227. b = y.argmax().item() # Preferred orientation (peak position)
  228. y = self.roll(y, b) # center the curve on the preferred orientation
  229. idx = torch.argwhere((y - self.z).sign().diff())
  230. # Find the half width at half maximum to calculate the standard deviation
  231. if idx.numel() > 1:
  232. c = (idx[1].item() - idx[0].item()) / (2 * math.sqrt(2 * math.log(2)))
  233. else:
  234. c = self.d//2
  235. yy = self.normal(self.d//2, c) # Generate a normal curve for the given width
  236. yy = yy / yy.max() # give the fitted curve the same amplitude as the original
  237. yy = yy + d # Add same baseline to the fitted curve
  238. e = self.mean_euc(y, yy) # Calculate the mean euclidean distance between the curves
  239. return (a, b, c, d), e
  240. class Roelfsema:
  241. def __init__(self, model, tasks, logger):
  242. import matplotlib.pyplot as plt
  243. self.task_name = 'CurveTracing' if 'CurveTracing' in tasks else 'SwitchBox'
  244. self.model = model
  245. self.tasks = tasks
  246. self._loader = tasks[self.task_name]["dataloaders"][-1]
  247. self._loader.dataset.training = False
  248. self.n_samples = len(self._loader.dataset)
  249. self.logger = logger
  250. fix_attend_saccade = self.tasks[self.task_name]["params"]["fix_attend_saccade"]
  251. n_iter = sum(fix_attend_saccade)
  252. n_layers = model.n_convs
  253. n_fix, n_att, n_sac = fix_attend_saccade
  254. n_fix_att = n_fix + n_att
  255. def test_accuracy_curve(self, device):
  256. correct = 0
  257. threshold = 0.25
  258. self._loader = self.tasks[self.task_name]["dataloaders"][-1]
  259. self._loader.dataset.training = False
  260. self.model.to(device)
  261. self.model.eval()
  262. with torch.no_grad():
  263. for x, _, m, _, c in self._loader:
  264. b = x.size(0)
  265. x, m, c = x.to(device), m.to(device), c.to(device)
  266. p_m, _, _ = self.model(x, self.tasks[self.task_name]["key"])
  267. m_correct = (p_m[:, -1] * c[:, 2])
  268. m_false = (p_m[:, -1] * c[:, 5])
  269. m_correct = m_correct.view(b, -1).sum(dim=-1) / c[:, 2].view(b, -1).sum(dim=-1)
  270. m_false = m_false.view(b, -1).sum(dim=-1) / c[:, 5].view(b, -1).sum(dim=-1)
  271. correct += ((m_correct - m_false) > threshold).sum().item()
  272. self.logger.info(f"Test Final Accuracy: {correct / self.n_samples}")
  273. self._loader.dataset.training = True

curves_utils.py at commit 9c26438, under GPL-3.0 · at the source

Overview

Authors: Saeed Salehi1,2,3, Jordan Lei4, Ari S Benjamin5, Klaus-Robert Müller1,2,6,7, Konrad P Kording8,9
  1. Machine Learning Group, Technical University of Berlin, Berlin, Germany
  2. BIFOLD—Berlin Institute for the Foundations of Learning and Data, Berlin, Germany
  3. BCCN—Bernstein Center for Computational Neuroscience, Berlin, Germany
  4. New York University, New York, NY USA
  5. Cold Spring Harbor Laboratory, Cold Spring Harbor, NY USA
  6. Department of Artificial Intelligence, Korea University, Seoul, Korea
  7. Max Planck Institute for Informatics, Saarbrücken, Germany
  8. Department of Bioengineering, Department of Neuroscience, University of Pennsylvania, Philadelphia, PA USA
  9. CIFAR LMB Program, Toronto, ON Canada
Journal: Nature communications, volume 17, issue 1, article 4072
Dates: received 31 October 2024; accepted 7 April 2026; published online 5 May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-72146-9 · PMID 42086575 · PMCID PMC13144683 · OpenAlex W4402421663
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism)
Methods: Connectivity, Machine learning
Keywords: Object vision, Human behaviour, Network models
MeSH: Attention*, Brain*, Models, Neurological*, Animals, Computer Simulation, Humans, Photic Stimulation, Visual Pathways, Visual Perception (* major topic)
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Deutsche Forschungsgemeinschaft (01GQ0850, 01GQ1115, 01IS14013A-E); Bundesministerium für Bildung und Forschung; Korea University (2019-0-00079, 2022-0-00984); Ministry of Science and ICT, South Korea (2022-0- 00984, 01GQ1115, 01GQ0850, 01IS18037A, 01IS18025A, 2019-0-00079); Institute of Information & Communications Technology Planning & Evaluation (2019–0–00079, 2022, 2022-0-00984)
Citations: not cited yet (Europe PMC); 164 references in the paper

Abstract

Attention is a cornerstone of cognition and neural computation, enabling the brain to select relevant information, bind features into coherent objects, and guide behavior. However, we currently lack a unifying computational model that connects the diverse phenomena of attention, from spatial and feature-based selection to object-based binding, within a single, neurally plausible computational framework. Here, we propose a bidirectional recurrent gating mechanism integrated into a principled architecture of the ventral visual stream. In this architecture, feedforward pathways extract visual features, while top-down and lateral connections transmit context- and task-dependent modulatory signals that control information flow. We demonstrate that our model, trained on recognition and segmentation problems, successfully performs the canonical attention tasks of orienting, filtering, and visual search on complex scenes. It replicates key psychophysical phenomena, such as perceptual load and inattentional blindness, while its internal units develop neural properties consistent with primate physiology, including multiplicative gain modulation and border-ownership coding. Our work provides evidence that this diverse set of attentional and binding phenomena can emerge from error-backpropagation combined with architectural constraints upon information flow, offering a powerful tool for neuroscience and a compelling, bio-inspired alternative to standard AI architectures.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 8 matches between paragraphs and lines of code.

ssnio/bio-attention

License: GPL-3.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 9c2643861c5bf67195da3bbc5ae42ac57ed64cbc, 29 January 2026
Languages: Python (19), Jupyter (11)
Size: 268 files, 30 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, environment (requirements.txt), 11 notebooks
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: PyTorch (29 files), Matplotlib (12 files), NumPy (3 files), Pillow (3 files), SciPy (3 files), seaborn (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
32 files

Code availability

We used Python (version 3.9) as the primary programming language. The following libraries (modules) were used and are required to execute the analysis: PyTorch, NumPy, SciPy, Matplotlib, and Pillow. For the COCO experiment, the pycocotools module is necessary. The source code for all experiments and corresponding result notebooks are available on GitHub: https://github.com/ssnio/bio-attention and also upon request.

Reproduced under the paper's license (CC BY), from the paper cited above.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 30 scripts, each with its path and the digest of its content;
  • 8 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data Availability Statement

All datasets are either publicly available on their corresponding online repositories or the code to generate and compose them is on GitHub (https://github.com/ssnio/bio-attention). Shapes dataset: https://github.com/ssnio/bio-attention/tree/main/data. The MNIST dataset is publicly available on http://yann.lecun.com/exdb/. The MS-COCO dataset is publicly available on https://cocodataset.org/. The CelebA dataset is publicly available on https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html although for non-commercial research purposes only. The CIFAR datasets are publicly available on https://www.cs.toronto.edu/~kriz/cifar.html. Source data are provided with this paper.

We used Python (version 3.9) as the primary programming language. The following libraries (modules) were used and are required to execute the analysis: PyTorch, NumPy, SciPy, Matplotlib, and Pillow. For the COCO experiment, the pycocotools module is necessary. The source code for all experiments and corresponding result notebooks are available on GitHub: https://github.com/ssnio/bio-attention and also upon request.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 2, 28 September 2026

  • Funding: added Deutsche Forschungsgemeinschaft: 01GQ0850, 01GQ1115, 01IS14013A-E; Bundesministerium für Bildung und Forschung; Korea University: 2019-0-00079, 2022-0-00984; Ministry of Science and ICT, South Korea: 2022-0- 00984, 01GQ1115, 01GQ0850, 01IS18037A, 01IS18025A, 2019-0-00079; Institute for Information and Communications Technology Promotion: 2019–0–00079, 2022, 2022-0-00984

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 3 keywords, 9 MeSH terms, 118 references.

Cite

This paper

Salehi, S., Lei, J., Benjamin, A. S., Müller, K.-R., & Kording, K. P. (2026). Modeling attention and binding in the brain through bidirectional recurrent gating. Nature communications, 17(1), 4072. https://doi.org/10.1038/s41467-026-72146-9

BibTeX

@article{salehi2026modeling,
author = {Salehi, Saeed and Lei, Jordan and Benjamin, Ari S and Müller, Klaus-Robert and Kording, Konrad P},
title = {{Modeling attention and binding in the brain through bidirectional recurrent gating}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {4072},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-72146-9},
url = {https://doi.org/10.1038/s41467-026-72146-9},
pmid = {42086575},
pmcid = {PMC13144683}
}

RIS

TY - JOUR
AU - Salehi, Saeed
AU - Lei, Jordan
AU - Benjamin, Ari S
AU - Müller, Klaus-Robert
AU - Kording, Konrad P
TI - Modeling attention and binding in the brain through bidirectional recurrent gating
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/05/05
VL - 17
IS - 1
SP - 4072
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-72146-9
UR - https://doi.org/10.1038/s41467-026-72146-9
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-72146-9",
"type": "article-journal",
"title": "Modeling attention and binding in the brain through bidirectional recurrent gating",
"container-title": "Nature communications",
"author": [
{
"family": "Salehi",
"given": "Saeed"
},
{
"family": "Lei",
"given": "Jordan"
},
{
"family": "Benjamin",
"given": "Ari S"
},
{
"family": "Müller",
"given": "Klaus-Robert"
},
{
"family": "Kording",
"given": "Konrad P"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "4072",
"DOI": "10.1038/s41467-026-72146-9",
"PMID": "42086575",
"PMCID": "PMC13144683",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-72146-9",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
5
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41562-026-02414-7 [code]
Optimized feature gains explain and predict successes and failures of human selective listening.
Journal: Nature human behaviour
In common: PyTorch, seaborn, SciPy, 2 other tools, 11 references
[2] doi:10.7554/elife.105953 [code]
Top-down feedback in deep neural networks leads to functional differences during audiovisual integration.
Journal: eLife
In common: Pillow, PyTorch, seaborn, 3 other tools, 7 references
[3] doi:10.1038/s41467-026-74816-0 [code]
Hierarchical optimization predicts plasticity in the macaque inferior temporal cortex following object training.
Journal: Nature communications
In common: PyTorch, seaborn, SciPy, 2 other tools, 8 references
[4] doi:10.1038/s42003-026-10169-0 [code]
Shared representations in brains and models reveal a two-route cortical organization during scene perception.
Journal: Communications biology
In common: Pillow, PyTorch, seaborn, 3 other tools, 6 references
[5] doi:10.1038/s41467-026-76098-y [code]
A single computational objective can produce specialization of streams in visual cortex.
Journal: Nature communications
In common: Pillow, PyTorch, seaborn, 3 other tools, 5 references
[6] doi:10.1038/s41598-026-45730-8 [code]
Gestalt laws enhance the representation of figures over backgrounds in the visual cortex and influence contrast perception.
Journal: Scientific reports
In common: 8 references
[7] doi:10.1371/journal.pbio.3003707 [code]
Behavioral engagement facilitates auditory neuron responses beyond their receptive fields.
Journal: PLoS biology
In common: 8 references
[8] doi:10.1371/journal.pcbi.1014435 [code]
Predictive coding explains asymmetric connectivity in the brain: A neural network study.
Journal: PLoS computational biology
In common: Pillow, PyTorch, NumPy, 5 references
[9] doi:10.1162/imag.a.1207 [code]
Investigating the temporal dynamics and modeling of mid-level feature representations in humans.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Pillow, PyTorch, seaborn, 3 other tools, 3 references
[10] doi:10.7554/elife.109498 [code]
Neural computations in the foveal and peripheral visual fields during active search.
Journal: eLife
In common: 6 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.