Local Learning Beyond Global Objectives
This is a blog form of a ten-minute talk I gave at the Brains, Minds and Machines summer school in August 2026. The two demos below rerun the talk’s simulations in your browser.
In Waiting for Newton I postulated that loss function minimization may be our Kepler’s laws: a good description of what intelligence does, but not the mechanism that makes it happen. If that is right, it suggests a different way to build learning machines. Most of machine learning starts from the global description: specify an objective, then construct a system that optimizes it. But if optimization is an emergent description rather than the underlying mechanism, perhaps we should start from the other end. We can ask what simple processes, available locally to parts that never see the whole, might collectively produce behavior that looks like optimization from the outside.
This post is about one candidate: homeostasis at the scale of a neuron, and how it connects to homeostasis at the scale of a whole organism. I’ll lay out the idea, and then show my own implementations of two demonstrations from a wonderful paper by Falandays, Yoshimi, Warren and Spivey.Falandays, J. B., Yoshimi, J., Warren, W. H., & Spivey, M. J. (2024). A potential mechanism for Gibsonian resonance: behavioral entrainment emerges from local homeostasis in an unsupervised reservoir network. Cognitive Neurodynamics, 18, 1811–1834.
Local learning needs a new first principle
Almost every proposal for biologically plausible learning asks the same question: how closely can a local rule approximate the gradient of a global loss? Feedback alignment, predictive coding, target propagation, equilibrium propagation, and many othersTwo reviews: Backpropagation and the brain and Theories of error back-propagation in the brain. The originals: feedback alignment, predictive coding, target propagation, equilibrium propagation. are very different mechanisms, some more biologically plausible than others, but all follow the same first principle. A designer specifies an objective, and the problem is to deliver useful credit to each synapse so that the objective goes down. That is also how we build modern AI, and for good reason: nonconvex optimization has no general method, and at the scale of billions of parameters the only methods we know how to make work are the ones that follow the gradient.Stochastic gradient descent and its descendants: momentum, per-parameter step sizes as in Adam, and preconditioners that approximate curvature, such as K-FAC and Shampoo. None of them promises more than a good local minimum, and derivative-free alternatives need a number of function evaluations that grows with the number of parameters, which rules them out at this scale. Judged by that criterion, backpropagation should always win, because backpropagation is the gradient, and everything else is an approximation to it.
So let’s ask a different question. Can intelligent behavior arise from mechanisms that never have access to a task objective at all? One candidate primitive is homeostasis: many local components, each trying only to keep itself viable.
Local learning as usually posed: approximate gradient descent.
Local learning as posed here: stay viable, and see what happens.
One neuron’s rule
Let’s begin with a simple model of a homeostatic neuron. At each time step it does three things. It integrates: it adds up the synaptic weights of the neighbors that spiked on the previous step, plus the input from any sensors it is connected to, and it leaks a small fraction of its potential. It fires: when its potential crosses a threshold it sends a spike to the neurons it connects to, and its own potential drops by the threshold. And it adjusts: it compares its current potential with a target potential, the level of potential it “likes” to hold, and moves its incoming weights and its target in the direction that would have reduced the difference. Too high, and it raises its target and decreases the weights from the neighbors that just spiked. Too low, and it lowers its target, never below a floor, and increases those weights.
With the potential after any spike, the target, and the error,
for each of the neighbors that just spiked. Nothing in this rule refers to a global objective, or to any information outside the neuron. There is no externally given error signal and no reward.In form this is a two-factor rule, presynaptic spike times postsynaptic error, and the error is the neuron’s own distance from its target. That is what separates it from three-factor rules, where a third signal such as a neuromodulator carries reward or error to the synapse, and from the schemes above, where an error computed elsewhere is delivered to the neuron as an input. The whole “learning system” is each neuron’s attempt to keep its own potential in a comfortable range.
Two loops
Why might we suspect that homeostasis at the scale of a neuron and homeostasis at the scale of an organism are connected? One keeps a membrane potential in range; the other keeps a whole animal fed, safe and oriented in its world. They meet at an interface: neural activity. The short loop is the textbook picture of local homeostasis: neural activity determines a local error, the error updates the thresholds and weights, and the new thresholds and weights steer future activity back toward a viable regime. The longer loop runs out through the agent and its environment: neural activity drives the agent’s actions, the actions change where the agent stands in relation to its world, that relation determines what the sensors will report next, and what they report perturbs activity. Importantly, both loops can return neural activity to a viable regime. The short loop does it by changing the neuron itself; the long one does it by changing the stimuli the neuron has to live with.
Internal adaptation alone cannot eliminate perturbations that keep changing. The weights can move a little each step, so they can cancel a drive that holds still or drifts slowly. However, a sensory stream that changes faster than that outruns them, and no setting of the weights makes it comfortable.Could a neuron not simply turn its weights down to zero and ignore the stream? Two things stop it. The weights from the sensors are fixed; only the weights between neurons adapt. And zero is not comfortable: a neuron receiving nothing sits at a potential of zero, below the floor its target can never go under, so the rule turns the weights back up. Silence is as uncomfortable as flooding. For inputs like these, homeostasis at the level of the neuron is not enough. The agent has to act on its environment to keep the incoming stimulus stable enough that local homeostasis can do the rest. Attractive behaviors are the ones that make the sensory stream regular enough for the local neural dynamics to stabilize.
Embed a network of homeostatic neurons in a closed sensorimotor loop, and action becomes a second route by which their local errors can be controlled. Behaviors that put the network in easier-to-regulate conditions are therefore selectively stabilized, and the organism’s behavior comes to look goal-directed although nothing in it represents or optimizes that goal. Once the agent stumbles on activity that produces an easy-to-stabilize sensory stream, the local homeostatic loop settles: the error falls, the weights stop moving, and the activity that produced the stream persists — not because anything rewarded it, but because nothing in the network is pushing to change it. Activity that produces an irregular stream does the opposite: it keeps the error alive, which keeps the weights moving, which keeps the behavior changing, until the network stumbles on something it can stabilize.
None of this makes an arbitrary task solvable. The “task” the agent ends up performing is whatever behavior sits at the intersection of its sensor geometry and its world’s regularities. Tracking is a task only because a bearing-sensing body in a periodic world has a comfortable fixed point that happens to look like tracking. Where the world offers nothing the network can hold still, there is no task, and no reward the agent is chasing.
An embodied agent
Now let’s consider this kind of network in an embodied agent. Give the agent an “eye”: an array of sensors, each responsive to a stimulus in the direction it points. Each sensor is wired at random to a small fraction of a few hundred spiking neurons, and each neuron is wired at random to the others at a few percent density. The wiring is fixed at initialization. Two effectors, turn left and turn right, are each read out as the fraction of the randomly chosen neurons feeding them that spiked this step. The network is recurrent, with no layers, no trained readout, and no task, error or reward signal. The entire learning system is each neuron adjusting its own weights and target from purely local information.
Following a stimulus
A stimulus circles the agent at an irregular speed, reversing at random, and within a few hundred steps the agent begins tracking it. Here the agent has two eyes with a little overlap between them. Quite quickly after initialization it begins tracking the moving stimulus. Why? An agent that tracks the stimulus keeps its sensory stream nearly steady: the stimulus sits at roughly the same spot in its field of view. An agent that sits still, or does not track, is perturbed over and over as the stimulus passes through its whole field of view and out of it.
We can see this in action by clicking Hold still, which disables the agent’s turning effectors. The network keeps learning, but it can no longer control the agent’s behavior. The discomfort trace, the mean distance of each neuron from its target level, rises above the tracking baseline, and rises most while the stimulus is out of the agent’s view: the neurons then receive no input at all, and no adjustment of their weights can make up for that.
The stimulus circles the agent at an irregular speed and reverses at random. Left, the world: the ticks around the agent are its 62 sensors, the longer and darker the more active. Right, what the neurons receive: one row per sensor over time, the left eye above the right, then the network’s discomfort, then the spikes of 64 of its 300 neurons. After the first few hundred steps the agent begins tracking the stimulus and holds it nearly straight ahead. Steady moves the stimulus at a constant speed instead. Hold still stops the agent from acting, so you can watch the discomfort when the stimulus cannot be held in place. By chance alone the stimulus would sit within 45° of the heading a quarter of the time.
Playing Pong
Change the body and the same network plays Pong. Give the paddle a single eye of 46 sensors that report the ball’s bearing, and let the network move the paddle up and down. Every time the paddle misses, the ball is re-served from the far side at a random height, at one of two angles. Over time the hit rate settles to about 71%.A paddle a fifth of the field’s height, held still, returns a ball served at a random height one time in five. This network returns about 71% of them over a few hundred balls.
The paddle only moves up and down; 46 sensors report the ball’s bearing from the paddle, with the one sensor that sees the ball drawn as a ray. The tally records hits as ticks and misses as crosses, with the running hit rate against the dashed chance line. At right, the sensors over time, the network’s discomfort, and the spikes of 64 of its 700 neurons.
Returning the ball keeps the sensory stream stable, while missing it causes a jump in discomfort: the ball leaves the sensors’ view behind the paddle, then reappears at a new height and angle. Over time the agent’s behavior settles into returning the ball, because that is the behavior that keeps its input stream stable. Hold the paddle and the ball sweeps through the whole sensor array on every crossing and jumps at every serve; the discomfort never settles, because no adjustment of the weights can absorb a stream like that.
An outlook: from homeostasis to intelligence
These demos show that task-competent behavior can emerge in a locally learning system with no global objective. They do not show that homeostasis can solve any task. There is no loss function, no reward function and no task specification anywhere in the system, so there is nothing to point the agent at a task with. That changes what it means to make such an agent do something useful: instead of specifying an objective, one designs the agent and its environment together, so that the behavior one wants is a behavior the agent can be comfortable in.There’s something oddly humane about this idea… Actions change the future disturbances the neurons receive, so patterns of behavior compatible with local stability persist and the others do not. The task is implicit in the relationship between agent and environment.
The environments here are simple enough that reacting alone is likely sufficient. Organism-scale homeostasis in a richer world needs more than that: staying viable there means acting before disturbances arrive, not after. Perhaps intelligence is what homeostasis becomes when staying viable requires prediction.
If loss minimization is our Kepler’s laws, homeostasis is a candidate for the kind of thing a Newton would start from: a local law with no view of the ellipse.