cd /news/machine-learning/representational-drift-in-neural-net… · home topics machine-learning article
[ARTICLE · art-83249] src=pub.towardsai.net ↗ pub= topic=machine-learning verified=true sentiment=· neutral

Representational Drift in Neural Networks: What Backpropagation and Hebbian Learning Reveal

A study by an independent researcher found that neural networks trained with backpropagation and a hybrid Hebbian rule develop divergent internal representations despite achieving similar accuracy, with representational similarity dropping from 0.98 at pooling layers to 0.79 at the output layer. The research, which used MLP, CNN, and Kolmogorov-Arnold Network architectures, suggests that learning rules influence how networks encode information, with implications for understanding representational drift in both artificial and biological systems.

read8 min views2 publishedAug 1, 2026

A rat runs the same maze for weeks. Its performance stops changing on day three. But if you record the same place cells on day three and day twenty, a surprising number of them have quietly swapped jobs. The behavior is frozen. The underlying code is not. Neuroscientists call this representational drift, and it raises an uncomfortable question for anyone who thinks of a trained brain as a fixed lookup table: if the map keeps changing, what is actually being preserved?

I wanted to ask a narrower version of that question inside something I could fully control. Not a rat, not a cortex, just a small neural network trained to tell 0s from 1s. Once it stopped getting better at that job, would its internal representations stop changing too? And if the answer was no, would how it learned, backpropagation versus something closer to what real synapses do, change how much drift showed up, and what kind?

Backpropagation is the standard. It computes an error at the output, then pushes that error backward through every layer, adjusting weights so the whole network shares the blame for every mistake. It is precise, it is fast, and there is no serious evidence the brain does anything quite like it, mainly because it would require neurons to send information backward along the same wires they use to send it forward.

Hebbian learning is older and much closer to biology. The rule is local: if two neurons fire together, strengthen the connection between them. No error signal has to travel backward. No neuron needs to know what happened three layers downstream. It is the kind of rule you could actually build out of real synapses.

I built three architectures, an MLP, a CNN, and a Kolmogorov-Arnold Network, and trained each one two ways: pure backpropagation, and a hybrid rule where the hidden layer updates itself with a Hebbian term while the output layer still gets a normal gradient signal. Same data, same starting weights, same fixed set of validation images shown to every model at every epoch so that any change I measured later was a change in the model, not a change in what it was looking at.

All six models eventually solved the task. But watching them get there told a story on its own. Backpropagation was almost boring. The MLP hit 99 percent validation accuracy by epoch two and stayed there. The CNN reached a perfect 100 percent by epoch fifteen. Clean, monotonic, no drama.

The hybrid Hebbian models were a different animal. The MLP’s validation accuracy actually dropped from 92 percent to 62 percent in the middle of training before recovering and climbing past 98 percent. The CNN wobbled early too. Both eventually landed close to where backpropagation ended up, within a percentage point or two, but they took a rockier road to get there.

That was expected, roughly. What I did not expect was what happened once both models had already arrived.

I froze a set of 200 validation images and, after training, pushed them through the final backprop CNN and the final Hebbian CNN. Then I compared how similar the internal representations were at every layer, using representational similarity analysis, which essentially asks: do these two networks think two images are alike to the same degree?

At the pooling layers, right after the convolutions, the two networks agreed almost completely. A similarity score of 0.98 out of a possible 1.0. That makes sense. Pooling layers have no weights of their own; they just compress whatever the convolutional layers hand them, and the early convolutional features were nearly identical between the two learning rules.

Then I hit the first fully connected layer, the first place where a decision actually starts to get made, and the agreement dropped to 0.80. It never recovered. By the output layer, it had fallen further, to 0.79.

That 0.18 drop between the last pooling layer and the first decision layer is not something you’d expect from noise. It is a genuine cliff.

The two networks, in other words, look at the same digit and build almost the same low-level picture of it. Then they completely disagree about what to do with that picture. Backprop carves the visual space into two sharply separated regions, one for each digit. Hebbian barely bothers.

I made this concrete by plotting the actual dissimilarity matrix, essentially a grid where every cell shows how different two images looked to the network. The backprop version had rich structure: clear blocks where 0s looked like 0s and 1s looked like 1s, and a strong signal in the off-diagonal, exactly where digit-versus-digit comparisons live. The Hebbian version was almost uniformly flat, a dark, undifferentiated block. All 200 images, regardless of digit, produced nearly identical internal activations. The Hebbian convolutional layers had learned to see, technically, but not to tell 0 from 1 with anything like the confidence backprop had.

That was the picture at the end of training. But the real question was about drift, so I went back and tracked the same layer, epoch by epoch, measuring how similar each snapshot was to where the network started.

The pooling layer stayed almost perfectly stable across all fifteen epochs for both learning rules, which made sense given it has no weights to move.

The first fully connected layer told a completely different story depending on the rule. Under backpropagation, the representation shifted hard in the very first epoch, dropping to about 0.83 similarity with its starting point, and then kept sliding slowly for the rest of training, down to roughly 0.80 by epoch fifteen. It was still changing when I stopped looking. Under the hybrid rule, that same layer sat at a flat 1.0 similarity for all fifteen epochs. It had not moved at all, not because the rule prevented drift exactly, but because the layer feeding it barely changed either, since the Hebbian learning rate upstream was deliberately tiny.

Put together, backpropagation never really stops refining. Hebbian, at least in this configuration, never really starts, once you get past the earliest layers.

The comparison above still had a confound: the two rules didn’t necessarily reach stable accuracy at the same epoch, so “drift during training” was mixing learning with drift. I reran a cleaner version of the core experiment, an MLP only this time, using matched starting weights and matched batch order for both rules, and defining “stable” strictly, meaning accuracy had to stay within a tight band for three consecutive epochs and stay within an even tighter band for five epochs after that. Only once a run passed that bar did I start measuring drift from that point forward.

Across three seeds, both rules reached a genuinely stable point. Backpropagation typically stabilized fast, by epoch three. The hybrid rule took much longer, anywhere from epoch seventeen to thirty, which is itself a small finding: local learning rules seem to need more time to find a quiet equilibrium, not less.

Once both were stable, I asked the three questions the project was built around.

Do the two rules produce different representations? Yes, clearly. Comparing the two networks’ final hidden layers directly, the representational dissimilarity matrices differed by 0.14 on average; the two networks agreed on overall structure at a CKA score of 0.89, but the actual axis they used to separate the two digit classes was rotated by an average of 73.7 degrees between the rules. That is a long way from parallel. Two networks can solve the identical task and still be pointing their internal “0 versus 1” axis in almost orthogonal directions.

Does drift continue after performance stabilizes? Yes, for both rules, but not by much and not equally. Backpropagation showed a small but consistent amount of continued drift after its stable point, averaging 0.003 on the RSA-drift measure. The hybrid rule showed less, about 0.0008.

Which rule allows more drift while still preserving what the network can do? Backpropagation. In every one of the three matched seeds, backprop’s representations drifted more after stability than the hybrid rule’s did, while both kept a decoder trained on the early stable representations working almost perfectly on later ones; backprop’s decoder accuracy stayed at a full 1.0, the hybrid’s dipped only slightly to 0.997. So the extra drift backprop shows isn’t sloppiness. The representation keeps moving, and a simple linear readout trained early can still tell the classes apart late, which is close to the definition of “useful drift” that the original hypothesis was reaching for.

Going in, I’d half expected the Hebbian rule to be the noisier, drifting one, on the reasoning that its updates are local and less coordinated, so surely they’d wobble more. The opposite happened. The biologically inspired rule was the calmer one at the representational level, almost suspiciously so, in the sense that a layer that barely moves has arguably stopped learning anything new about the world rather than found a stable, efficient encoding of it. Backpropagation, precise and globally coordinated as it is, was the one that stayed restless, still quietly reshaping its internal code for a task it had already mastered.

That reframes the original question for me. Representational drift after learning stops might not be a flaw the brain has to tolerate. It might be closer to a signature of a learning rule that never fully commits to one solution, one that keeps a little slack in reserve even after the behavior looks finished. Whether that slack is useful, wasteful, or just an accounting quirk of how gradients happen to be computed is still open. But it is no longer obvious to me that “stop moving once you’re right” is what a good learning rule should even try to do.

Thank you for reading! If you enjoyed this story, please consider giving it a clap, leaving a comment to share your thoughts, and passing it along to friends or colleagues who might benefit. Your support and feedback help me create more valuable content for everyone.

Representational Drift in Neural Networks: What Backpropagation and Hebbian Learning Reveal was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

── more in #machine-learning 4 stories · sorted by recency
── more on @mlp 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/representational-dri…] indexed:0 read:8min 2026-08-01 ·