Research analysis · Neural encoding

The code you spike in decides what the network finds similar

Two inputs that differ by one unit of meaning can be separated by many bits of code, or one. Davies, Aitsam, Stone, Di Nuovo and Han measure, on SpiNNaker hardware, how four input encodings for spiking networks determine which values a trained network accepts as alike, and show that a single homeostatic scaling factor sets a tolerance radius the network follows exactly in 93 percent of conditions. The conclusion is uncomfortable and useful: the similarity metric of a spiking system is fixed at the encoder, before any learning happens.

Source: Beyond the Hamming Cliff: Compact Spatial Encodings Preserving Semantic Distance in Spiking Neural Networks, arXiv:2610.22083 [cs.NE], October 2026. Primary source. Read: the full arXiv HTML version, including the formal Hamming cliff definition, the input capacity measurements on SpiNNaker and SpiNNaker2, the tolerance radius analysis, and the 1024-value extension.

What the work claims

This is a characterization study with an exhaustive hardware evaluation. The authors take a known irritation, the Hamming cliff of standard binary encoding, in which two adjacent values differ in many bits and therefore look unrelated to a network that reads inputs as bit patterns, and they ask systematically what removing the cliff does and does not buy.1 Their earlier work with Davies and colleagues showed that Gray, thermometer and Johnson encodings remove the cliff when used as input preprocessing for spiking networks; this paper adds the formal geometry and the limits.

The central claims, all measured on real SpiNNaker hardware with the network, learning rule, and protocol held constant so the encoding is the only variable: removing the cliff is necessary but not sufficient, because Gray encoding removes it yet retains almost no global distance structure, while thermometer and Johnson preserve semantic distance but at code widths that grow with the value range. The proposed hybrid codes, a coarse and fine construction in which a Gray fine field is reflected across alternate coarse blocks, contain binary, Gray, and the other schemes as exact limiting cases of one parameter, and give a sevenfold reduction in code width for a cost of one percent in the correlation between Hamming and semantic distance. Finally, the homeostatic scaling factor used in supervised STDP training sets a Hamming radius of tolerance around each trained pattern that the trained network follows exactly in 93 percent of conditions and to within one bit everywhere else, so the encoding alone determines what that tolerance means: a contiguous interval for thermometer and Johnson, a wrap-around ring for the cyclic hybrid, scattered unrelated values for binary and Gray.

How it works

The experimental rig is deliberately minimal. A dual-rail input layer presents every bit of a code word simultaneously within a single simulation timestep to a single output neuron, trained with a supervised nearest-pair STDP rule in which a teacher neuron marks the desired response, and tested with the learned weights applied as static synapses wired reciprocally so that bits on which two trained code words disagree cancel. All neurons are leaky integrate-and-fire units with delta synapses. Everything about the network is fixed; only the encoding changes.

Why encodings differ so much comes down to how Hamming distance tracks semantic distance. In thermometer encoding, a value is a run of active bits, so two values separated by d units differ in 2min(d,k) bits where k is the field width: proximity is preserved within the field and lost beyond it, and the width needed grows linearly with the range. Binary and Gray are compact, logarithmic in the range, but adjacent values can differ in many bits (the cliff for binary) or carry no consistent sense of distance at all (Gray). The hybrid codes split the value into a coarse block index and a fine position coded in Gray, reflected across blocks so that single-bit adjacency survives every block boundary, keeping most of the distance structure at a fraction of the width.

The homeostasis result is the analytical core. A supervised STDP network trained on several code words must scale its weights, a homeostatic factor, until all trained patterns are recognized; the larger the Hamming distances between trained words, the larger the factor must be, and the larger the factor, the more untrained words sneak inside the recognition radius. The authors derive the radius from the code geometry, and the trained network matches the prediction to within measurement resolution in almost every condition, meaning the code, not the learning rule, decides which untrained inputs will be accepted as similar to a trained one. They also document a hard platform constraint: first-generation SpiNNaker cores default to an incoming spike buffer of 256 slots, so at most 255 simultaneous input packets per neuron are delivered, and delivery simply stops beyond that. It is a silent software default, not a hardware property, but it bounds thermometer encoding to 256 values and Johnson to 510, while the hybrid codes still fit at 1,024 values where their parents do not.

Where a skeptic should push

The most load-bearing assumption is that single-timestep, one-shot, spatial bit patterns are a meaningful model of how spiking systems actually consume input. Real event-based pipelines carry information in time, across many timesteps, with rate or latency codes that can represent order and magnitude continuously; a scheme in which the whole code word arrives at once in a single step sidesteps the temporal capacity problem rather than solving it. The authors are candid that the rig is a characterization device, not an application benchmark, and that downstream evaluation, for instance on network-traffic classification, is future work.

Second, the acceptance criterion is a single output neuron's yes-or-no response to a single pattern. That is a classification of isolated code words, not a computation over them; nothing in the paper shows that preserving semantic distance in the input code helps a deeper network do harder tasks, and one can imagine the wide, many-active-bits codes that preserve distance also raising activity levels, energy, and cross-talk in larger systems. The 93 percent figure, impressive as it is, describes how faithfully a one-neuron classifier tracks an analytically predicted radius, which is exactly the setting in which theory and measurement should agree.

Third, scale. The main experiments use an 8-bit range, 256 values, chosen precisely because every encoding fits within SpiNNaker's default input limit there; the 1,024-value extension exists, but width still grows with range for every scheme that preserves distance, and the platforms impose hard simultaneous-input ceilings. For wide dynamic ranges the attractive codes may simply not fit, and the paper's own platform analysis is the evidence.

The similarity contract at the tissue interface

Every proposal for organoid intelligence rests on an unstated assumption: that if you stimulate a neural culture with a pattern representing input A and then with a pattern representing nearby input B, the tissue's internal states for A and B will also be nearby, so that whatever the culture learned about A transfers to B. Nobody designs this. This paper shows that in the silicon version of the same problem, the transfer behavior is not a property of the learning tissue or the learning rule at all; it is a property of the code, fixed before learning, quantifiable, and settable by an engineer. For hybrid living systems that is the whole game: the encoding is the one part of the stack that is entirely in silicon and entirely under design control.

The non-obvious implication is that code geometry is a governance surface, not just an engineering one. The homeostasis result says a trained system accepts untrained inputs inside a tolerance radius, and that the encoding alone decides whether that radius is a contiguous interval, a ring, or a scatter of unrelated values. In an organoid system, where the "training set" is a handful of stimulation protocols and the environment keeps presenting novel inputs, the encoding determines which novel stimulations the culture will treat as familiar. Choose a thermometer-like code and the system generalizes to near neighbors only; choose the wrong code and two inputs that behave identically in the world land far apart in stimulation space and are learned as unrelated, silently doubling the training burden. No amount of biological sophistication downstream repairs a bad similarity contract at the front end.

The threat has two edges. The first is the tolerance radius itself: any input that falls inside it is absorbed, which for a deployed hybrid system means distinct conditions with similar codes get merged into one behavior, and unlike in the one-neuron rig, nobody can enumerate which inputs those are. The second edge is platform fragility of exactly the kind the paper documents: electrode arrays have hard simultaneous-stimulation limits, buffer limits, and crosstalk ceilings, and the codes that best preserve semantic distance are the widest and most simultaneous. The encoding that is theoretically right may be electrically impossible on a 60-electrode array, and the practical optimum will be set by the interface, not by the mathematics.

The opportunity is equally concrete. The paper's hybrid construction, with its single parameter sweeping between Gray-like compactness and thermometer-like distance preservation, is a template for designing stimulation codes under an electrode budget, and its radius prediction tells you, before any experiment on living tissue, what generalization footprint a chosen protocol will have. That converts an expensive biology question, how will this culture generalize, into a cheap silicon question, what does our encoding's tolerance geometry look like. The field should treat the stimulation encoder of an organoid computer the way this paper treats its bit patterns: as the component that quietly decides everything.

The bottom line

Established, on SpiNNaker and SpiNNaker2 hardware: input encoding geometry, quantified through Hamming structure and a homeostatic tolerance radius, determines which untrained inputs a supervised STDP network accepts as similar, the trained network matches the predicted radius almost exactly, and a hybrid coarse-fine code preserves semantic distance at a seventh of the width for a one percent correlation cost. Not established: that these codes help temporal, multi-step, or deep spiking systems on real tasks, that the distance-preserving codes scale to wide dynamic ranges within platform input limits, or that anything here carries over to rate or latency coded inputs. The claim breaks at the moment real temporal codes make simultaneous-bit geometry irrelevant; it is confirmed if hybrid encodings measurably improve generalization on a downstream task, which the authors themselves list as the needed next step.

Frequently asked questions

What is the Hamming cliff?

In standard binary encoding, adjacent values can differ in many bits: 7 is 0111 and 8 is 1000, four bits apart despite being one unit apart in meaning. A system that reads inputs as bit patterns therefore sees neighbors as unrelated. Gray, thermometer, and Johnson encodings remove the cliff but differ in whether they preserve global distance structure.

Why is removing the cliff not enough?

Gray encoding makes every adjacent pair differ in exactly one bit, so the cliff is gone, but its bit distances carry no consistent global sense of how far apart two values are. The network can recognize neighbors without knowing anything about separation, so generalization is unstructured. Preserving semantic distance requires the wider thermometer, Johnson, or hybrid codes.

What does homeostatic scaling do here?

Supervised STDP training scales all learned weights by a factor large enough that every trained code word is recognized. That factor sets a radius of tolerance in Hamming space around each trained pattern, and untrained patterns inside the radius are accepted too. The paper shows the network follows the analytically predicted radius exactly in 93 percent of conditions and within one bit otherwise.

What is the practical advantage of the hybrid codes?

They split a value into a coarse block index and a Gray-coded fine position, reflected across blocks so single-bit adjacency survives block boundaries. A sevenfold reduction in code width costs one percent of the correlation between Hamming and semantic distance, and at 1,024 values the hybrids still fit within SpiNNaker's default input limits where thermometer and Johnson codes no longer do.

Why does this matter for organoid intelligence?

The stimulation patterns an electrode array delivers to neural tissue define, before any learning, which inputs the culture will treat as similar. This paper quantifies that contract for silicon and shows it is designable: the encoding sets the generalization footprint. That makes the silicon encoder, not the biology, the first place to engineer similarity behavior in a hybrid living system.

What are the limits of the study?

All experiments use single-timestep, whole-word spatial patterns and a single output neuron, on an 8-bit range for the main results. Temporal codes, deep networks, and downstream applications are explicitly future work, so the transfer of these conclusions to realistic spiking pipelines remains to be demonstrated.

References

  1. S. Davies, M. Aitsam, M.-T. Stone, A. Di Nuovo and L. Han. Beyond the Hamming Cliff: Compact Spatial Encodings Preserving Semantic Distance in Spiking Neural Networks. arXiv:2610.22083 [cs.NE]. 2026. https://arxiv.org/abs/2610.22083. Accessed 2026-10-17.