ArXiv · 2026
Attention over noisy examples: generalization and memorization in the exponential Hopfield network ↗
In Hebbian learning from examples a Hopfield network of N neurons is not supplied with the K archetypes it has to retrieve but with M blurred examples of each, of quality r, and whether it can infer them depends on the load α=K/N (interference among them) and on the dataset entropy ρ=(1-r²)/(Mr²) (how little the examples say about them). We transfer this protocol to the exponential Hopfield model, whose zero-temperature update is a step of softmax attention with the unlabelled examples as keys. A signal-to-noise analysis gives in closed form the overlap between the output and an unseen archetype, m⁽¹⁾=rm erf(1/√(2ρ_(rm eff))): the majority-rule law of the pairwise model at small load, with ρ replaced by an attention entropy ρ_(rm eff) built from the weight the softmax gives to the correct class and the number of examples it spreads it over. Two consequences follow. First, in a window of inverse temperatures β that widens as √N the interference between archetypes is exponentially small in Nβ: the load drops out and the number of archetypes that can be learnt grows as exp(c√N). Second, learning fails differently: in the pairwise model through a spin-glass phase, in the exponential model through memorization: the softmax concentrates its weight on the training example closest to the input and returns it in place of the archetype. Seen from the input the softmax weights are those of the random energy model, and memorization is its freezing transition, at β√(N(1-r²))≃√(2ln M); it is measurable on a head whose keys are examples as the number of examples carrying weight. On MNIST the diagnostic follows the random-energy prediction; on fashion-MNIST it detects sub-clusters in the classes, and the best accuracy lies beyond the memorization threshold, where the softmax reads out a local sub-prototype.
Try inveni