From homeostasis to credit assignment: a signed-XOR connectomic motif for local directional error signalling
AO_SCPLOWBSTRACTC_SCPLOWBiological neural circuits are widely thought to require local error signals that tell synapses not only that a prediction is wrong, but also in which direction to change. We previously proposed that a six-neuron XOR motif acts as a homeostatic comparator: matched sensory and predictive signals cancel locally, whereas mismatches propagate an error signal. We also showed that a shallow autoencoder can learn MNIST using a signed-XOR learning rule with local decoder errors and random feedback alignment, without gradient backpropagation. Here we introduce the signed-XOR motif, an eight-neuron, twelve-edge directed signed circuit that extends the XOR comparator with two feedback channels of opposite neurotransmitter identity. By construction, the motif can convert a binary mismatch into directional error signalling, with one pathway encoding potentiation and the other depression, while respecting Dales principle. We provide open-source tools to enumerate the motif at connectome scale and test its enrichment against degree- and sign-preserving null models. The motif is enriched 24.3x in C. elegans (Z = 52.2), significantly enriched in 59/80 FlyWire Drosophila neuropils including AVLP_L (13.9x, Z = 94.4), and strongly enriched in layers 2/3-5 of a biophysically detailed mouse primary visual cortex model (global 315x; per-pivot medians up to 852 x) while absent from layer 6. The same layer-specific pattern is found in the axon-proofread subset of the EM-reconstructed MICrONS connectome. A Brian2 leaky integrate-and-fire implementation reproduces the signed-XOR truth table, remains robust to Poisson drive, produces a graded signed error, and requires a fast-spiking parvalbumin-like pivot. These results identify signed-XOR as a recurrent connectomic pattern compatible with local homeostatic error cancellation and directional credit-assignment signals. Author SummaryHow does a brain decide which of its connections to adjust when it makes a mistake? Unlike an artificial network, it has no global error signal supplied from outside: each connection can react only to the neurons it directly touches. We ask whether a small, repeating wiring pattern could provide such a local correction signal. The pattern we study, the signed-XOR motif, compares an incoming signal with the brains own prediction of it. When the two agree, the circuit stays quiet, so already-expected activity is not relayed onward. When they disagree, it does more than flag an error: it also indicates the direction of the fix, routing it through two separate channels, one meaning "strengthen", the other "weaken", consistent with the biological rule that each neuron acts with a single sign. We provide open software to search for this pattern in three nervous systems, a worm, a fly, and a detailed model of mouse visual cortex, and find it more often than chance wiring predicts, with a striking layer-specific distribution in cortex. We also simulated the eight-cell circuit with realistic spiking neurons and confirmed that it can perform the computation, but only when its inhibitory cell is a fast-spiking type like those concentrated in the enriched layers. We do not claim that any brain uses this circuit to learn or memorize. What we provide is a specific motif that could deliver a local, directional error signal that may be useful for a neuromorphic implementation.