Brown University crest
CPSY 1291 Computational Methods for Mind, Brain & Behavior
Lecture 19 · Theme 3: Dynamics, sequences & world models

World models in brains and machines

Tuesday, November 24 · Fall 2026

Reader-friendly version — lecture content with figure descriptions

The circuit: near excitation, far inhibition

Reproduced from Mély, Linsley and Serre 2018, Fig. 1A: cortical columns in perspective, each with three pyramidal neurons. The center column (red) holds the recorded unit; a green column nearby sends tuned excitation, a blue column farther away tuned inhibition; rings on the floor mark center, near surround and far surround. An electrode records the population, read out by an ideal neural observer as an orientation. Legend: weakly tuned excitation and untuned inhibition within the receptive field (red), tuned excitation from the near surround (green), tuned inhibition from the far surround (blue)
  • Thursday ended on horizontal connections inside V1; this is our model of them
  • Excitation from near units, added; inhibition from far units, scaled by the unit's own activity
  • XX: image input; H(1),H(2)H^{(1)}, H^{(2)}: two stages of each unit
  • Stepped in time, a recurrent network

η H˙(1)+ϵ2H(1)=[ ξX−(αH(1)+μ) WI∗H(2)]+\eta\,\dot{H}^{(1)} + \epsilon^2 H^{(1)} = \Big[\,\xi X - \big(\alpha H^{(1)} + \mu\big)\,\textcolor{#3E6D8E}{W_I * H^{(2)}}\Big]_+

τ H˙(2)+σ2H(2)=[ γ WE∗H(1)]+\tau\,\dot{H}^{(2)} + \sigma^2 H^{(2)} = \Big[\,\gamma\,\textcolor{#3F7A6B}{W_E * H^{(1)}}\Big]_+

One circuit explains contextual illusions

Contextual illusions. Left column, tilt illusion: a central disc of vertical black and white stripes inside a ring of stripes tilted slightly from vertical in the top row and close to horizontal in the bottom row. Middle column, color induction: an identical gray center on a pink ring in the top row and on a gray ring in the bottom row. Right column, ring induction: concentric rings of green, purple and orange around a white center, in two versions

The two centers in each column are physically identical

  • Human perception. Tilt illusion: a tilted surround shifts the perceived orientation of the center
  • Color induction: the same gray center looks different on a pink and on a gray surround
  • Model: the same circuit, one set of parameters, reproduces these shifts in orientation, color, motion and depth
  • If illusions are side effects of linking fragments into objects, tasks that require grouping should need this circuit

Pathfinder: curve tracing for networks

Reproduced from Linsley et al. 2018, Fig. 1b: two Pathfinder images, white dashed curves on black, each with two white dots. In the left image one long dashed path joins the two dots; in the right image the dots sit on different paths
  • Prediction from the illusions: a grouping task should need this circuit
  • Pathfinder: are the two dots joined by one dashed path? People answer quickly and accurately
  • Each unit sees only a small patch of the image (its receptive field), while the path can wander anywhere
  • hGRU (horizontal gated recurrent unit, our lab): the same circuit with learned weights and gates; horizontal connections pass activity from dash to dash

Recurrence vs. depth on Pathfinder

Reproduced from Linsley et al. 2018, Fig. 3c: accuracy on the longest Pathfinder paths, 0.5 to 1, against the number of free parameters relative to the hGRU, log axis 1 to 1000. The hGRU reaches 0.99 at 1 times. Feedforward networks with 1, 3 or 5 layers stay between 0.5 and 0.93 at 1.4 to 9.5 times. Only large networks such as FCN, U-Net, SegNet and ResNet-152 reach 0.98 to 0.99, at about 230 to 900 times the parameters; ResNet-50 and ResNet-18 stay near chance

  • hGRU model: a recurrent circuit with GRU-like gates; Whh\mathbf{W}_{hh} is a convolution (each unit connected to its neighbors in space).
  • Feedforward CNNs match it only with 200 to 900 times more parameters; ResNet-18 and ResNet-50 stay at chance
  • Activity propagates from dash to dash, one step at a time

Follow-up: transformers fail on long Pathfinder

Reproduced from Tay et al. 2021, Long Range Arena results table: eleven transformer variants on six tasks. On Pathfinder they score 66 to 77 percent; on Path-X, the long version of Pathfinder, every one is marked FAIL

  • Long Range Arena (Google, 2021): every transformer variant fails Path-X, the long Pathfinder
  • Later state-space models (S4) and task-pretrained transformers do better: benchmark claims need a date

Grouping time follows human reaction times

Left: a black and white outline of two animals, one fixation dot labeled Fix, and probe dots A, B and C on the fixated animal at increasing distance along its body, and three probe dots D on the other animal. Middle, humans: reaction time in milliseconds rises from about 708 at A to 741 at B, 761 at C and 767 at D. Right, recurrent circuit: model reaction time in recurrent steps rises in the same order, from about 2.5 at A to 5.5 at B, 10 at C and 17 at D

  • Human behavior: reaction time rises from A to C, longest on the other object (D)
  • Model: the hGRU (horizontal connections only), trained to group, never fit to these data: more steps in the same order

Grouping spreads along a curve in V1

Reproduced from Pooresmaeili and Roelfsema 2014, Fig. 4A, two panels. Above each, two small displays with the same curves and the same receptive field (a square) far along a curve: in one display that curve is connected to the fixation point (attention in RF, red), in the other it is not (attention outside RF, blue). Below, the average V1 response over time (N = 34 recording sites): both traces share the first peak, then the red trace stays higher. The difference starts at 164 ms when the distractor is far (large gap, left) and at 240 ms when it passes close (small gap, right)
  • Monkey V1 (primary visual cortex), single neurons: the monkey looks to the end of the curve that starts at fixation; the receptive field (square) sees the same curve either way
  • On the target curve (red) neurons fire more than on the distractor (blue): an enhancement, after the first response
  • Far along the curve it starts at 164 ms; when the distractor passes close, at 240 ms
  • It spreads ~50 ms per step, more slowly where the distractor is close

Horizontal vs. top-down connections

Reproduced from Kim et al. 2020, Figs. 4a and 5a. Top, Pathfinder: example images with a yes and a no answer, and accuracy for four circuits against human accuracy near 96 percent. Horizontal plus top-down and horizontal only reach about 96 percent, top-down only about 63 percent, no recurrence 50 percent. Bottom, cABC, where the two marked points are on the same letter or not: horizontal plus top-down about 88 percent, top-down only about 87 percent, horizontal only about 54 percent, no recurrence 50 percent, human accuracy about 84 percent

  • Models (human accuracy as reference). cABC (cluttered ABC): are the two marked points on the same letter? The letters overlap, so local continuation of a line is no longer enough
  • Horizontal alone: Pathfinder, not cABC; top-down alone: the reverse → line continuation needs horizontal links, letter shape needs top-down links
  • Both together reach human accuracy on both tasks; without recurrence, accuracy stays at chance
Kim et al. ICLR 2020 · Serre Annu Rev Vis Sci 2027

Grouping fills in an object over steps

Animation, photograph of a baby at a laptop: colored object masks start in a few places and spread over the recurrent steps until each object is filled Animation, photograph of soccer players on a field: colored object masks start in a few places and spread over the recurrent steps until each object is filled Animation, photograph of two dancers: colored object masks start in a few places and spread over the recurrent steps until each object is filled Animation, photograph of two dogs: colored object masks start in a few places and spread over the recurrent steps until each object is filled
  • At image scale: a horizontal recurrent circuit added to a feedforward network improves panoptic segmentation (label every pixel by category and separate individual objects), with fewer parameters
  • Activity starts in a few places and spreads until each object is filled; the spreading is learned from the task

Why transformers replaced RNNs

Time per training step in milliseconds, log scale, against sequence length from 64 to 4,096 steps, measured on a laptop GPU. GRU stepped one step at a time (red) rises from about 20 ms to about 1,100 ms. One transformer layer (blue) rises from about 2 ms to about 100 ms. A state-space model, a linear recurrence computed in parallel (green), stays between about 1 and 6 ms
  • Grouping circuits are recurrent. Why did transformers win?
  • Slow to train: an RNN computes step tt after step t−1t-1; a transformer computes all positions at once
  • Long memories are hard: gradients vanish over many steps
  • The fix: a state-space model (SSM), a linear recurrence computed for all steps at once (green); our sCSSM is one (next)
Timing measured on a laptop GPU, one layer each

Our recurrent model on Pathfinder

A Pathfinder image, path length 14: white dashed curves on black; two white dots joined by one long dashed path Two scatter plots of Pathfinder accuracy, 50 to 90 percent, with human accuracy marked at about 89 percent. Left, against training step time in milliseconds, log scale; right, against number of parameters, log scale. The sCSSM models (blue) form an upper front reaching about 91 percent, at or above human accuracy; Mamba-2 reaches about 84 percent; transformers stay near 50 to 55 percent, close to chance, as do sCSSM versions without the recurrence over steps or without spatial kernels
  • Task: are the two dots joined by one dashed path? (longest paths, 14 dashes)
  • Models: our lab's sCSSM, a recurrent layer that trains in parallel, with a 2-D state laid over the image, reaches human accuracy; transformers stay near chance
Tay et al. ICLR 2021 · Linsley, Dhimoïla, Karkada Ashok, Kim & Serre in submission

PathTracker: Pathfinder in time

Animation of the PathTracker task: a dot moves among identical distractor dots on a black background, from a red start marker; the question is whether it ends on the blue goal marker Two scatter plots of PathTracker accuracy, 50 to 100 percent, with human accuracy marked at 90 percent. Left, against training step time in milliseconds, log scale; right, against number of parameters, log scale. The sCSSM models form an upper front near 80 to 85 percent; Mamba-2, Gated DeltaNet and ConvS5 reach about 70 percent; transformers and S4ND stay near 50 percent, as do sCSSM versions without the temporal recurrence or without spatial kernels
  • Task: does the moving dot end on the blue marker? Needs a state carried over time
  • Models: our sCSSM is more accurate than Mamba; transformers stay at chance
Linsley et al. NeurIPS 2021 · Linsley, Dhimoïla, Karkada Ashok, Kim & Serre in submission

From learning representations to manipulating them

So far: learning representations Today: manipulating them
Question What is there? What happens next? What would it look like from there?
Examples Features, geometry; grouping by recurrence over space Run a fall forward (Planko); move to another viewpoint (perspective taking)
How Trained networks, read out Simulation: steps over an internal model, a world model

Networks learn representations well. Can they manipulate them?

From grouping to simulation

A Planko board: a light blue ball at the top, ten black planks placed at random, and two catcher baskets at the bottom

Grouping took steps. So does predicting a fall. Drop the ball. Which basket does it land in?

Planko: which basket will the ball land in?

Reproduced from Ahuja et al. 2024, Fig. 1A: six example Planko boards, each a gray square with a light blue ball at the top, randomly placed black planks, and two catcher baskets at the bottom
  • Task (humans, monkeys, models): a ball is dropped from the top, bounces off the planks and lands in the left or the right catcher
  • Report the catcher before the ball falls; the board changes every trial, so no template works
  • Boards range from one plank to ten: more planks, longer simulation
  • Monkeys learn the task gradually, and shift to a simulation-based strategy as the boards get harder

Brains simulate: monkey fMRI

Reproduced from Ahuja et al. 2024: three pairs of axial fMRI slices with the motion-sensitive areas MT, MST and V4d circled. Left, a standard motion localizer, motion versus flicker. Middle, watching the ball fall versus a control. Right, mentally simulating the fall, with the ball hidden, versus a control. The same motion-sensitive areas are active in all three

  • Where does the brain run the fall? Monkey fMRI during Planko: predicting the landing (right) recruits motion-sensitive areas (MT, MST, V4d), as watching the fall does (middle)
  • Human fMRI: a "physics engine" network that overlaps areas for action planning (Fischer et al. 2016)

Model: what the recurrent network does

Reproduced from Ashok et al. 2022: four Planko boards with the ball's start position varied from left to right (top row), the recurrent network's hidden-state maps (middle row, bright where the network is active), and the ball path decoded from that state (blue dots) lying on the true simulated path (red dots) (bottom row)
  • What does a network need to run it? Model: a recurrent network trained on Planko (the same boards as the monkeys)
  • Its state changes with the ball's start position, step by step
  • Decode the ball's position from the state at each step: the decoded path (blue) lies on the simulated path (red)
  • Nobody told the network to track the ball

Recurrence learns simulation; feedforward does not

Accuracy bars on four Planko datasets: the recurrent model (blue) stays near human accuracy on all four, while a baseline CNN, AlexNet and a 12-layer CNN fall toward chance when both ball and basket positions move
  • Models: a recurrent network and matched feedforward CNNs, trained on four Planko datasets, from fixed ball and basket to both positions moving
  • The RNN (blue) stays near human accuracy on all four
  • The feedforward CNNs fall to chance once both positions move
  • Same pattern as Pathfinder: feedforward fails once the answer needs steps
  • Project question: does a video-prediction network's state contain the ball's path?

Settling time predicts reaction times

Reproduced from Goetschalckx et al. 2023, Fig. 4, the Planko task: two example boards, a ball at the top, planks, and two baskets; in which basket will the ball land, left or right?

  • Task: in which basket will the ball land?

Settling time predicts reaction times

Reproduced from Goetschalckx et al. 2023, Fig. 4, the Planko task: two example boards, a ball at the top, planks, and two baskets; in which basket will the ball land, left or right? Next to it, a scatter: each dot is one board, human reaction time in seconds (0 to 6) against the model's settling time (0 to 30), with a rising line, r = .31

  • Task: in which basket will the ball land?
  • Model: a recurrent network trained on the task. Settling time: how long its answer stays unsure
  • Human behavior: boards with a longer settling time take people longer → r = .31

Perspective taking: seeing through someone else's eyes

Schematic: a tree, a flower in front of it and a bag behind it, seen by two people, ME in front and THEM to the side. Level 1 visual perspective taking: from their perspective the bag is not visible. Level 2: from their perspective the flower is on the right of the tree
  • Knowing what another person can see is a first step of theory of mind: reasoning about other minds
  • Level 1: can they see it? Level 2: how does it look to them? Children master Level 1 first
  • Vision-language models pass theory-of-mind and mental-rotation tests separately, and fail when a task needs both
  • Our test asks the Level 1 question with real scenes

The 3D Perception Challenge

A laptop open on a small wooden table on wet concrete, seen from above. A green camera icon sits at the lower left and a red ball at the lower right of the table
The same laptop and table from another viewpoint. The green camera is now in front of the table and the red ball is behind the laptop
A red car on a driveway, with a green camera icon at the top and a red ball just above the car
The same red car from the side. The green camera icon is at the car's front wheel and the red ball is behind it on the right
  • Depth order: is the green camera closer to us than the red ball?
  • Visual perspective taking (VPT): can the green camera see the red ball?
  • Same object, two viewpoints: the answers flip

Models match people on depth, fail on perspective

Depth-order accuracy against ImageNet accuracy for 318 vision models, three vision-language models and the lab's autoregressive models; the best networks reach the human band near 75 percent Perspective-taking accuracy against ImageNet accuracy: every vision model, vision-language model and the lab's autoregressive models sit near the 50 percent chance line, far below the human band near 87 percent
  • Models: 300+ networks (a linear probe on each), three vision-language models; people: 75% depth, 87% perspective
  • Depth order: the best networks reach the people. Perspective taking: every model sits near chance
  • A reasoning gap: models read depth but cannot take another viewpoint

People mentally move to the other viewpoint

Top-down sketch: you at the bottom, and another person seated at 40, 80, 120 and 160 degrees around a table; reaction times rise from 750 to 1030 milliseconds Reaction time in milliseconds against angular disparity from 40 to 160 degrees: rising from about 750 to 1000, faster when the body orientation is congruent with the rotation than when it is incongruent
  • Human behavior: judge left or right from another person's seat at a table; reaction time grows with the angle to that person
  • A congruent body posture speeds the judgment
  • An embodied transformation: people act as if they emulate the movement that would take them there

A frontier model: partly there on perspective taking

Camera view of a simulated room: a human avatar stands among cubes and cones

The same scene rendered from the avatar's viewpoint: cubes and cones seen from the human's position

  • Does a frontier model do it? GPT-6 Astra, a vision-language model, on scenes from the lab's simulator
  • Task: is the object left or right, in front or behind, from the person's view or the camera's?
  • Half full: from the person's own view, and for front versus behind from any view, it is now close to right
  • Half empty: left versus right from another viewpoint, the judgment that flips when you move, is still often wrong
Linsley et al. ICLR 2025 · Fenner, Karkada Ashok, Linsley, Tellex & Serre unpublished

What Planko and perspective taking show

  • Networks learn representations of depth, objects, the board
  • They fail when the task needs to manipulate them: run the ball forward, turn the scene to another viewpoint
  • Brains, and our recurrent models, do it by simulation: steps run over an internal model
  • A model of the world you can run forward and act on is a world model

Perspective taking needs a world model

An agent's view at the start: a cone on a gray floor in front of a salmon wall
now
→ a →
The agent's view after turning: a cone and a dark X-shaped block against the wall
next
→ a →
The agent's view after moving on: a larger cone in front, a red ball and the X-shaped block behind
next

view⟨t+1⟩=F(view⟨t⟩, a⟨t⟩)\text{view}^{\langle t+1\rangle} = F\big(\text{view}^{\langle t\rangle},\, \mathbf{a}^{\langle t\rangle}\big)

  • Models have 3D representations but cannot manipulate them; people simulate moving there
  • A world model predicts the next view from the view and an action; chained, it can simulate moving to another viewpoint
Agent views: Alekh Karkada Ashok, ongoing work · Linsley et al. ICLR 2025

From next-token to next-frame prediction

  • Language models (Lectures 16–17): predict the next token from all the tokens so far; trained on web text, they learn grammar, facts and some reasoning without labels
  • Vision: the same objective on video: predict the next frame from the frames so far
  • Add the action you take, and the model predicts what your action will do: a world model
  • Video generators, later today, are next-frame predictors trained at scale

What is a world model?

  • A driver imagines a turn: the state is what I see and remember, the action is turning the wheel, the next state is what I will see

h^⟨t+1⟩=F(h⟨t⟩, a⟨t⟩)\textcolor{#3F7A6B}{\hat{\mathbf{h}}^{\langle t+1\rangle}} = F\big(\textcolor{#3F7A6B}{\mathbf{h}^{\langle t\rangle}},\, \textcolor{#3E6D8E}{\mathbf{a}^{\langle t\rangle}}\big)

  • FF is the transition map, a whole network; h\mathbf{h} is a latent (a compressed internal summary of the scene, not the raw pixels), the recurrent state of the last lecture
  • Planning = a rollout: run FF forward several steps without acting, then pick the action whose imagined outcome is best
  • JEPA: predict the next latent instead of the next frame's pixels

Video world models

Genie 3 (DeepMind 2025): a world you steer in real time
Sora 2 (OpenAI 2025): realistic video from a text prompt
GAIA-2 (Wayve 2025): driving scenes generated on demand
Dreamer 4 (2025): an agent learns Minecraft inside its world model
  • Generated video can look like film, and some models let you act inside the world they generate
  • Realistic pixels do not guarantee correct physics

Robot planning with a world model

  • V-JEPA 2 (Meta 2025): a fixed camera watches the robot arm; the model predicts the next frame (as features) given the arm's action
  • Planning: given a goal image, imagine the outcome of candidate actions and pick the one that lands closest: run the model forward
  • Do the first step, look again, replan; pick-and-place in labs it was never trained in

Embodiment: learning by moving

  • Active vision: an agent learns by moving and seeing what changes
  • It chooses its actions and sees their consequences, so it can learn an action-conditioned model of the world, then use it to simulate another viewpoint
  • Driven by intrinsic rewards (curiosity, learning progress, surprise), without labels
  • With developmental psychologists: which rewards drive infants' exploration, and does the same reward produce the same learning in the agent?
Active exploration: Alekh Karkada Ashok and collaborators, ongoing work

What to keep

Theme Summary Open question
1 Describing representations are points in a space; comparing them is a choice which geometry matters?
2 Learning stacked, trained units; CNNs untangle like the ventral stream same geometry, same computation?
3 Sequences & state attention, LLMs, recurrence; a world model predicts the next state can video teach a model to run the world forward?
Today learning a representation is not enough: simulation needs to manipulate it can a world model learned by acting close the gap?

What happens next: exam and final project

  • Tue 12/1: Exam 2, in class, Lectures 9–19; study guide on Ed
  • Thu 12/3: project work sessions begin; from then on, class meetings are work sessions
  • Sun 12/6, 11:59 PM: proposal due, one page per team (moved from Wed 12/2); feedback at the Tue 12/8 session
  • Mon 12/21, 9:00 AM: poster session (open to the public) and the two-page CCN-format report
  • AI is allowed on the project, with disclosure: one agent writes, a separate one critiques, as taught in the project-clinic recitation; run smoke tests before spending compute

Starting points for a project

  • Data ready to use: the THINGS 100 bundle (human fMRI of IT, monkey V1/V4/IT recordings, odd-one-out similarity judgments, ResNet-18 features; download the images yourself from OSF, project jum2f) · Michael Lee's collection of about 50 classic similarity data sets
  • Benchmarks from our lab: the 3D-PC stimuli and code, the Planko boards, the ClickMe maps and harmonization code
  • AI for neuroscience: predictive models of neural data
  • World models: does the state of a network trained to predict video contain the ball's path? Released tests: IntPhys 2, Physics-IQ
  • Benchmarking AI against people: run a psychology test on a model, with the human baseline in the same study

Further reading

Optional: for going deeper, or as a starting point for the final project.

Minute paper

Submit on Canvas → Minute papers → Minute Paper 20 (access code read out in class).

Write three brief points in your own words:

  1. The same horizontal circuit that groups a curve also produces illusions. Are illusions a bug or a feature
    of a visual system, and what would a network that never shows them be missing?
  2. Something you do not yet understand, or a question still open
  3. Another idea you found interesting, and why it matters for brains, behavior or AI

Credit for a thoughtful attempt, not for being correct.

- Figure: cortical columns; the red column holds the unit we record. Green neighbors excite it (near surround); blue units farther away inhibit it (far surround). Both are tuned: they act most between units that prefer similar features - Equations: H(1) is the input stage, H(2) the output stage; X is the feedforward drive from the image; [·]+ is a ReLU; η, ε, τ, σ are time constants - Blue term: inhibition from the far surround, W_I convolved with the output stage. It enters multiplied by (αH(1) + μ): the more active the unit, the stronger the inhibition. That is divisive (shunting) inhibition - Green term: excitation from the near surround, W_E convolved with the input stage, added - The kernels W_E and W_I were set from anatomy in Mély 2018; one set of parameters reproduces the illusions on the next slide - Discretize the equations in time (Euler steps) and they become a recurrent network: the hGRU, which learns W_E, W_I and adds gates like the GRU from Thursday - Linsley, D., Kim, J., Veerabadran, V., Windolf, C., & Serre, T. (2018). Learning long-range spatial dependencies with horizontal gated recurrent units. NeurIPS (Serre lab)

- With those connections, one circuit reproduces a family of illusions - Figure: three columns of contextual illusions. Tilt illusion: a center disc of vertical stripes inside a ring tilted slightly (top) or near horizontal (bottom). Color induction: an identical gray center on a pink ring (top) and a gray ring (bottom). Ring induction: concentric green, purple and orange rings around a white center, in two versions - The two centers in each column are physically identical; the surround changes what you see - Tilt illusion: repulsion (perceived tilt away from the surround) at small angle differences and attraction at large ones. The model reproduces this transition - The model's prediction that stimulating one excitatory neuron excites close neighbors and suppresses more distant, similarly tuned ones was later found consistent with single-neuron stimulation in mouse V1 (Chettih & Harvey 2019) - Next: a task that demands grouping - Mély, D. A., Linsley, D., & Serre, T. (2018). Complementary surrounds explain diverse contextual phenomena across visual modalities. Psychological Review (Serre lab)

- A visual task whose answer must pass across the image - Figure: two Pathfinder images, white dashed curves on black, each with two white dots. In the left image one long dashed path joins the two dots; in the right image the dots sit on different paths - Each unit in a convolutional layer sees only a small patch of the image, while the path can wander anywhere. Horizontal connections between neighboring units can pass a signal from dash to dash, one step at a time, until it reaches the other dot - hGRU stands for horizontal gated recurrent unit: the gated unit from Thursday, with its units laid out over the image and wired to their neighbors. The Serre lab introduced it for this task - Transformers also struggle: on the Long Range Arena benchmark (Tay et al. 2021), which feeds Pathfinder images one pixel at a time, the models tested reach about 70% on the standard version and stay at chance on its longest version - Linsley, D., Kim, J., Veerabadran, V., Windolf, C., & Serre, T. (2018). Learning long-range spatial dependencies with horizontal gated-recurrent units. NeurIPS

- If grouping is what the circuit is for, a grouping task should need it - Figure: accuracy on the longest Pathfinder paths (0.5 to 1) against the number of free parameters relative to the hGRU, on a log axis from 1 to 1000. Each dot is one network. The hGRU reaches 0.99 at 1 times. Feedforward networks with 1, 3 or 5 layers stay between 0.5 and 0.93 at 1.4 to 9.5 times. FCN, U-Net, SegNet and ResNet-152 reach 0.98 to 0.99 at about 230 to 900 times the parameters; ResNet-50 and ResNet-18 stay near chance - FCN, U-Net and SegNet are large networks built to label every pixel; they succeed at hundreds of times the hGRU's size. "Multiplicative lesion" is an hGRU with one interaction term removed; it still solves the task - In the paper's other panels the hGRU stays near 99% as paths grow from 6 to 14 dashes, while a version allowed only 4 time steps falls to near chance: the loop needs time to run - Linsley, D., Kim, J., Veerabadran, V., Windolf, C., & Serre, T. (2018). Learning long-range spatial dependencies with horizontal gated-recurrent units. NeurIPS (Serre lab)

- Long Range Arena feeds the Pathfinder image to the model one pixel at a time, as a long sequence; Path-X is the 128 x 128 version (16,384 steps) - On standard Pathfinder the transformers reach 66 to 77%; on Path-X every one fails to learn the task (chance) - Pathfinder comes from our lab (Linsley et al. 2018) - Gu et al. (2022, S4) were first to solve Path-X; Amos et al. (2024): with self-supervised pretraining on the task data, ordinary transformers close most of the gap

- If grouping takes steps, farther points should take longer, for people and for the model - Figure: left, an outline of two animals with a fixation dot (Fix), probes A, B, C on the fixated animal at increasing distance along its body, and probes D on the other animal. Middle, humans: reaction time rises from about 708 ms at A to 741 at B, 761 at C and 767 at D. Right, model: reaction time in recurrent steps rises in the same order, about 2.5 at A, 5.5 at B, 10 at C and 17 at D - Human data are from Experiment 2 of Jeurissen et al. A "no" answer for D needs the whole fixated object filled in first - The model's reaction time is the number of recurrent steps it stays uncertain, defined two slides later. The axes are scaled independently and the model times are in steps, not milliseconds - Jeurissen, D., Self, M. W., & Roelfsema, P. R. (2016). Serial grouping of 2D-image regions with object-based attention in humans. eLife - Goetschalckx, L., Govindarajan, L. N., Karkada Ashok, A., Ahuja, A., Sheinberg, D. L., & Serre, T. (2023). Computing a human-like reaction time metric from stable recurrent vision models. NeurIPS (Serre lab)

- Figure: Pooresmaeili & Roelfsema (2014), Fig. 4A, receptive fields far along the curve. Left: large gap between the curves. Right: small gap. Same display in the receptive field in both traces of a panel; red when that curve is the target, blue when it is the distractor - The first ~100 ms are identical: the feedforward response sees the same pixels. The enhancement comes later, and later still when the distractor is close - The monkey was rewarded for an eye movement to the end of the curve connected to the fixation point - Pooresmaeili, A., & Roelfsema, P. R. (2014). A growth-cone model for the spread of object-based attention during contour grouping. Current Biology - A step is not a fixed distance: it is one shift of a circle that grows as large as possible without touching the other curve. Far from the distractor, larger receptive fields can join in, so one step covers more of the curve - In raw distance along the curve, onset barely follows (R² = 4% in the paper); in growth-cone steps it does (R² = 27%, slope 50 ms per step)

- Which connections matter? Remove each kind and compare - Figure, from Kim et al. (2020), Figs. 4a and 5a. Top, Pathfinder: example images and accuracy for four circuits against human accuracy (about 96%). Horizontal plus top-down and horizontal only reach about 96%; top-down only about 63%; no recurrence 50%. Bottom, cABC, two marked points on the same letter or not: horizontal plus top-down about 88%, top-down only about 87%, horizontal only about 54%, no recurrence 50%, humans about 84%. Hardest level of each task; dotted line: chance - In Pathfinder, good continuation links the dashes. In cABC the shape of each letter has to guide grouping, which takes information from a higher stage about what the object is - Bars are best validation accuracy of 20 runs. This pattern is a double dissociation: each circuit succeeds where the other fails - Replotted from the original data for Serre (2027), From scaling laws to neural laws: AI and the search for a theory of vision, Annual Review of Vision Science (in press) - Kim, J., Linsley, D., Thakkar, K., & Serre, T. (2020). Disentangling neural mechanisms for perceptual grouping. ICLR (Serre lab)

- The same idea at the scale of natural photographs - Four animations (a baby at a laptop, soccer players, two dancers, two dogs). Each color marks one object the network separates; each frame is one recurrent step. Activity starts in a few places and spreads until each object is filled - Panoptic segmentation labels every pixel by category and separates individual objects - The recurrent circuit adds horizontal connections to a feedforward network, with fewer parameters, and the spreading is learned from the task. Trained on short contours, the same circuits also segmented longer ones better than feedforward and unconstrained recurrent controls - Linsley, D., Karkada Ashok, A., Govindarajan, L. N., Liu, R., & Serre, T. (2020). Stable and expressive recurrent vision models. NeurIPS (Serre lab)

- Why spend a lecture on RNNs if transformers won? The reasons they lost are engineering reasons - Slow to train: in the code slide, the for loop runs one step after another. A transformer's positions do not depend on each other within a layer, so a GPU computes them all together - Figure, measured on a laptop GPU for this lecture: one training step (forward, loss, backward) of one layer, width 128, batch 8. Red: a GRU stepped in a Python loop, as in the PyTorch code of last lecture; time grows in proportion to the length. Blue: one causal transformer layer; every position at once, but the attention cost grows with the square of the length, visible past 1,000 steps. Green: a linear recurrence h_t = a_t h_(t-1) + b_t computed for all steps at once (the minGRU and Mamba trick, also used by our sCSSM). Script: figures/make_L19_rnn_runtime.py - Long memories: the vanishing-gradient slide. Gates (LSTM, GRU) help but do not remove the problem over thousands of steps - Fixed-size state: a transformer keeps every earlier word, so it can copy or look up any of them exactly

- Figure, from our lab's sCSSM work (in submission): accuracy on Pathfinder (path length 14) against training step time (left) and number of parameters (right). Each dot is one trained model; large dots mark the best of each family. Human accuracy is about 89% - The sCSSM family (blue) forms the upper front, up to about 91%. Mamba-2 reaches about 84%. Transformers stay at 50 to 55%. Removing the recurrence over steps (NoTime) or the spatial kernels (NoSpace) drops sCSSM to 57 to 63% - Long Range Arena (Tay et al., 2021): a benchmark for long-range reasoning in which the hardest task, Path-X, is the full-size Pathfinder. Every transformer variant failed to learn it: chance - Next slide: the same model on PathTracker, Pathfinder in time

- A task where the state must be carried over time and space together - Left: PathTracker, a dot moves among 15 identical distractor dots for 32 frames from a red start marker; does it end on the blue goal marker? No single frame holds the answer, so it has to be in the state. It is Pathfinder in time - Right, two scatter plots of accuracy (50 to 100%): against training step time (log scale) and against number of parameters (log scale). Each dot is one trained model; human accuracy is 90% - The sCSSM models form an upper front near 80 to 85%; Mamba-2, Gated DeltaNet and ConvS5 reach about 70%; transformers and S4ND stay near 50%, as do the sCSSM versions without the temporal recurrence (NoTime) or without spatial kernels (NoSpace) - Linsley, D., Malik, G., Kim, J., Govindarajan, L. N., Mingolla, E., & Serre, T. (2021). Tracking without re-recognition in humans and machines. NeurIPS (Serre lab) - Transformers on Pathfinder: in the Long Range Arena benchmark (Tay et al. 2021), which feeds Pathfinder images one pixel at a time, every transformer tested stays at chance on the longest version (Path-X) - sCSSM: Linsley, Dhimoïla, Karkada Ashok, Kim & Serre, in submission (Serre lab)

- Themes 1 to 3: describing and learning representations; the first part of today showed recurrence grouping an image step by step over space - The rest of today: two of our lab's tasks where the representation has to be manipulated, not only read out: run the ball forward in time, take another person's viewpoint - Both need a simulation: steps over an internal model. A model you can run forward, and act on, is what AI calls a world model

- Grouping took steps: the network passes information along the curve, one neighborhood per step - Here too you answer before the ball moves: you run the fall forward, step by step, in your head - Today: what kind of model of the world makes that possible, whether networks and video generators have one, and where the lab's own work fits

- Six of the boards used in the study. Planks are placed at random; the ball always starts at the top - A trial: fixation point, board appears, the monkey reports the catcher, then the ball falls and lands - Human judgments of this kind are well fit by a noisy physics engine run in the head (Battaglia, Hamrick & Tenenbaum, PNAS 2013) - The training curves are in the paper (Fig. 2)

- A: a standard motion localizer marks the motion-sensitive areas. B: watching the ball fall. C: imagining the fall with the ball hidden. The same areas light up in B and C - Evidence for forward models in cortex, next to the feedforward classification of the earlier lectures - Fischer et al. (2016): the regions selective for physical inference overlap the multiple-demand system

- Rows: the board with the ball's start position varied; the network's hidden state; the path read out of that state (blue) against the path a physics simulation gives (red) - The readout is trained after the network, on its states - Unrolling a recurrent state is running a world model forward

- Chance is 50%: two baskets - The CNN versus RNN comparison is Fig. 4 of Ahuja et al. (2024) - Next: taking someone else's view also needs a simulation. Can networks do it?

- Same logic as grouping time earlier today: more steps to settle, a slower answer - Goetschalckx, Govindarajan, Karkada Ashok, Ahuja, Sheinberg & Serre (2023), Computing a human-like reaction time metric from stable recurrent vision models (Serre lab)

- Same logic as grouping time earlier today: more steps to settle, a slower answer - Settling time: the network reports, at each time step, how sure it is of its answer; adding up its uncertainty over the steps gives one number per board - Each dot is one board: people answer more slowly on boards that keep the model unsure longer

- Planko asked what happens next in a scene; perspective taking asks what the scene looks like from somewhere else - Figure: ME in front of a tree, THEM to the side. Level 1: from their position the bag behind the tree is not visible. Level 2: from their position the flower is on the right of the tree - Piaget and Inhelder's three-mountain task (1956) started the field: young children described their own view when asked for someone else's - Flavell and colleagues separated Level 1 (whether an object is visible to someone) from Level 2 (how it appears to them); Level 1 comes earlier in development - Wang et al. (2026): vision-language models pass theory-of-mind and mental-rotation controls on their own and fail when the two must be combined; in about three quarters of errors they report the camera's own view (egocentric bias) - The 3D Perception Challenge next: "can the green camera see the red ball?" is a Level 1 question - Flavell, J. H., Everett, B. A., Croft, K., & Flavell, E. R. (1981). Young children's knowledge about visual perception. Developmental Psychology. Wang, M., et al. (2026). Egocentric bias in vision-language models. CogSci

- Each image has a green camera (the observer) and a red ball; the same image gets both questions - In the first laptop image the camera is farther away and sees the ball; in the second it is closer and cannot see it - Depth is the 3D layout you see; perspective taking is what someone else would see from where they stand - The challenge also has VPT-Strategy, a version that blocks shortcut strategies - The marker has a thin white outline for legibility; the images are otherwise unchanged

- Each dot is a vision model; x is its ImageNet accuracy; depth order improves with ImageNet accuracy (rho = 0.65) - Vision-language models were prompted with 20 labeled examples before each test image - Humans: 75% on depth order, 87% on VPT-basic - The models fail at manipulation - Fine-tuning on VPT-basic gets close to people, and falls back to chance on VPT-Strategy - Given an explicit mental-imagery step, vision-language models solve it (Lee et al., ICCV 2025, arXiv 2504.17207) - The stimuli and code are released, so the benchmark can be reused in a project

- Task: an avatar sits at a table at some angle from your own viewpoint, and you judge which side an object is on from the avatar's position - Reaction time rises from about 750 ms at 40 degrees to about a second at 160, as if you rotate yourself into position - With the body oriented congruently with the rotation people are faster - Perspective taking looks like a simulation of self-motion - Reaction times on the sketch are the mean of the two posture conditions, digitized from Fig. 8A (Experiment 4)

- Left image: the camera's view of the room with the avatar; right image: the same scene through the avatar's eyes - n = 800 scenes. Human's view vs camera view: overall 98.2% vs 77.8%; left/right 99.5% vs 59.5%; front/behind 97.0% vs 96.0% - Tested in October 2026 on scenes the model had never seen in training - A new frontier model arrives every few months; the question is whether the manipulation step is solved - Glass half full, half empty: some perspective-taking judgments are starting to work in the newest models, not all; the one that needs the scene mentally turned (left versus right) still fails often

- Planko: the feedforward network represents the board but cannot run the fall; the recurrent network settles over steps, and its settling time follows people's reaction times - 3D-PC: models read depth off the image, but fail when they must take another viewpoint; people mentally move to that viewpoint - This is the motivation for world models: a learned simulator you can run forward

- Frames from an agent moving through one of the lab's simulated rooms (Alekh Karkada Ashok, ongoing work) - A collaborative robot must take a person's point of view: hand over a tool they can reach, not hide it where they cannot see - Chain the predictions to reach another viewpoint, then read off what is visible from there - The equation is the transition map of the first slides, with a view as the state and a as the action - The failure on the previous slides fits a missing manipulation step

- Callback to the GPT lectures: one objective, predict the next token, and a lot of structure comes for free - In vision the token becomes a frame (or a patch of a frame, or a latent summary of it) - To predict the next frame well, a model has to capture how objects move and interact: physics, occlusion, viewpoint - The action is what turns a predictor into something you can plan with: imagine "if I do this, what will I see?"

- A world model is a learned simulator: state in, action in, predicted next state out - $\mathbf{h}$ is the hidden state of the recurrent-networks lecture; the action is $\mathbf{a}$ here because bold $\mathbf{u}$ was the gate of the GRU - Forward models are a classic idea in motor control: an efference copy (a copy of the motor command) lets the brain predict the consequences of its own movement - Model-based reinforcement learning plans with a learned model of the environment; model-free learning only learns which actions paid off - JEPA stands for joint-embedding predictive architecture (LeCun 2022): the prediction error is computed in a learned feature space

- Four clips, no details - Genie 3: a world model generates the next frames from the keys a person presses, in real time; the scenery stays consistent when you come back. Announced as a blog post, no paper - Sora 2: text to video with sound; a system card, no paper - GAIA-2: generates driving scenarios (weather, traffic, cut-ins) to train and test self-driving cars - Dreamer 4: learns from offline Minecraft video, then trains its agent entirely inside the world model and collects diamonds - Physics-IQ (Motamed et al. 2025) found that video generators that look real often get physics wrong

- Same idea as Planko and perspective taking: simulate before you act - The predictor works in a learned feature space (JEPA), not in pixels. Pretrained on internet video, then about 62 hours of unlabeled robot video from the Droid dataset; one fixed side camera (exocentric) sees the arm, so the robot sees the outcome of its own actions - Planning searches over action sequences (cross-entropy method), executes only the first action, observes, and replans (model-predictive control) - Meta reports 65 to 80% success on pick-and-place in new environments, from goal images - Other robot systems (Gemini Robotics, Physical Intelligence) mostly map images and instructions straight to actions

- The agent's own view, early in training, so it wanders back and forth - An intrinsic reward is a reward the agent gives itself, for example for what it has just learned - Open question, and project-sized: which intrinsic reward gives the most useful world model?

- A world model is a transition map: state and action in, next state out; an agent can imagine and plan with it - Brains simulate: monkeys solve Planko with motion areas engaged, and recurrent networks, not feedforward ones, learn the same strategy - Current AI breaks on perspective taking

- Disclosure means saying what you asked for, what you kept, what you rejected and why - No project deliverable is due over Thanksgiving recess

- Harmonization code and ClickMe maps: https://serre-lab.github.io/Harmonization - The THINGS images may not be redistributed, so the bundle comes without them; ask the teaching staff for the bundle and fetch the images from OSF - Sandrone (2024) reviews digital twins in neuroscience, models fitted to one brain's data - Open questions on today's slides (Planko-style prediction in video models, the predictive-objective test) are project-sized

- Hafner et al. builds an agent in a learned simulator; Motamed, Bordes, Garrido and Vafa et al. ask whether prediction produces a model - Jensen et al. show an RNN of the kind built in the recurrence lecture whose imagined rollouts match rat hippocampal replay - Further world-model reading: Micheli, Alonso & Fleuret (ICLR 2023), a transformer world model; Carvalho et al. (Neural Comput 2024), predictive representations - Mineault et al. argue that AI's uneven profile comes from brain functions no benchmark measures - Two essays in The Transmitter are a good entry point before a paper: Brunton & Tuthill (2025) on embodiment, Zador (2024) on what the brain can teach artificial networks

- Submitted on Canvas (Minute papers → Minute Paper 20); credit for a thoughtful attempt