What changed between revision 1 and revision 3, compared over the article's markdown source with its frontmatter — so a change to status, evidence or reversibility shows up as the edit it is.
Older · revision 1
Import· initial corpus import, not an edit
Initial import of content/neural-decoding.md — the filesystem corpus, unchanged. Not an edit.
11.8 kB
Revision 1
Revision 3
lines 6–13 → 6–135 unchanged lines not shown
horizon: "present"horizon: "present"categories: ["cybernetics", "minds"]categories: ["cybernetics", "minds"]tags: ["bci", "neural decoding", "machine learning", "fmri", "neural manifolds", "mental privacy"]tags: ["bci", "neural decoding", "machine learning", "fmri", "neural manifolds", "mental privacy"]summary: "The inference of a stimulus, intention, or mental state from measured neural activity, and the statistical machinery that makes brain–computer interfaces work."summary: "The inference of a stimulus, intention, or mental state from measured neural activity, and the statistical machinery that makes brain-computer interfaces work."updated: "2026-07-27"updated: "2026-10-29"issues: ["Image reconstruction from fMRI with diffusion models is discussed without a citation."]issues: ["Image reconstruction from fMRI with diffusion models is discussed without a citation."]------ lines 25–159 → 25–15811 unchanged lines not shown
}}`````` **Neural decoding** is the inference of something outside the brain — a stimulus, a movement, a**Neural decoding** is the inference of something outside the brain, such as a stimulus, a movement,word, a state — from measurements of activity inside it. It is the statistical half of everya word or a state, from measurements of activity inside it. It is the statistical half of every[[brain-computer-interface]], and the half where most recent progress has come from. Decoding is[[brain-computer-interface]], and the half where most recent progress has come from. Decoding isformally the inverse of encoding, which asks how a neuron or population responds to a given input;formally the inverse of encoding. Encoding asks how a neuron or population responds to a givendecoding asks what input or intention best explains an observed response.input; decoding asks what input or intention best explains an observed response. The word "decoding" invites a misleading picture of a fixed cipher waiting to be broken. InThe word "decoding" suggests a fixed cipher waiting to be broken, and the picture misleads. Inpractice a decoder is a model fitted to one person's brain, on one day, for one task, and itspractice a decoder is a model fitted to one person's brain, on one day, for one task, and itsperformance degrades as any of those conditions changes. What decoding recovers is what variedperformance degrades as any of those conditions changes. Decoding recovers only what variedsystematically in the data it was trained on, and nothing else.systematically in the data it was trained on. ## Origins## Origins Motor decoding began with the observation that neurons in primary motor cortex are broadly tuned toMotor decoding began with the observation that neurons in primary motor cortex are broadly tuned tothe direction of arm movement, each firing most for a preferred direction and less for others. Nothe direction of arm movement, each firing most for a preferred direction and less for others. Nosingle cell specifies direction, but a weighted vector sum across a population does — the populationsingle cell specifies direction, but a weighted vector sum across a population does. This populationvector, described in the mid-1980s.[^georgopoulos1986] That result established both the possibilityvector was described in the mid-1980s.[^georgopoulos1986] The result showed that a continuousof extracting a continuous variable from spike counts and the population-level framing the fieldvariable could be extracted from spike counts, and it set up the population-level framing the fieldstill uses.still uses. Sensory decoding developed in parallel in human neuroimaging. Pattern-classification methods appliedSensory decoding developed in parallel in human neuroimaging. Pattern-classification methods appliedto functional MRI showed that the category of an object a person was viewing could be read fromto functional MRI showed that the category of an object a person was viewing could be read fromdistributed activity in ventral temporal cortex,[^haxby2001] and later that the orientation of andistributed activity in ventral temporal cortex.[^haxby2001] Later work classified the orientationattended grating and even the content of binocular rivalry could be classified from voxelof an attended grating, and even the content of binocular rivalry, from voxelpatterns.[^kamitani2005] These demonstrations are the ancestors of every subsequent "mind-reading"patterns.[^kamitani2005] These demonstrations are the ancestors of every subsequent "mind-reading"headline.headline. ## From spikes to intent## From spikes to intent Early [[utah-array]] decoders used linear filters mapping binned firing rates to cursor velocity.Early [[utah-array]] decoders used linear filters mapping binned firing rates to cursor velocity.The Kalman filter improved on this by treating the intended movement as a hidden state evolvingThe Kalman filter improved on this by treating the intended movement as a hidden state evolving overover time, with the neural data as noisy observations. A further gain came from recognising thattime, with the neural data as noisy observations. A further gain came from recognising that thethe training data are themselves flawed: during calibration the user is trying to correct thetraining data are themselves flawed. During calibration the user is trying to correct the cursor, socursor, so the true intention points toward the target rather than along the observed trajectory.the true intention points toward the target rather than along the observed trajectory. RetrainingRetraining with that assumption produced a marked improvement in closed-loopwith that assumption produced a marked improvement in closed-loop control.[^gilja2012]control.[^gilja2012] Modern decoders are recurrent or transformer-based networks trained on many hours of data, oftenModern decoders are recurrent or transformer-based networks trained on many hours of data, oftenpooled across sessions. For [[speech-neuroprosthesis]] systems they emit phoneme sequences that apooled across sessions. For [[speech-neuroprosthesis]] systems they emit phoneme sequences that alanguage model then resolves into text. For surface recordings in [[ecog-interfaces]] the input[language model](https://aiwiki.ai/wiki/large_language_model) then resolves into text. For surfacefeatures differ but the architecture does not. At the opposite extreme, a sixteen-electroderecordings in [[ecog-interfaces]] the input features differ but the architecture does not. At theendovascular device such as the [[stentrode]] supports only a binary classifier, and the decodingother extreme, a sixteen-electrode endovascular device such as the [[stentrode]] supports only aproblem shrinks accordingly — the design of a decoder is inseparable from the sensor feeding it.binary classifier, and the decoding problem shrinks accordingly. A decoder's design cannot beseparated from the sensor feeding it. Decoding is not confined to movement and speech. Closed-loop [[deep-brain-stimulation]] systemsDecoding is not confined to movement and speech. Closed-loop [[deep-brain-stimulation]] systemsdecode a physiological marker of symptom state and adjust stimulation in response; seizure-warningdecode a physiological marker of symptom state and adjust stimulation in response. Seizure-warningsystems decode the approach of an ictal event; sleep and workload classifiers decode broad brainsystems decode the approach of an ictal event, and sleep and workload classifiers decode broad brainstates from a handful of channels. Hippocampal decoding underlies the [[memory-prosthesis]]states from a handful of channels. Hippocampal decoding underlies the [[memory-prosthesis]]literature, and the sender's side of a [[brain-to-brain-interface]] is nothing more than a decoderliterature, and the sender's side of a [[brain-to-brain-interface]] is simply a decoder whose outputwhose output happens to be routed to another person's stimulator.is routed to another person's stimulator. ### Population dynamics and manifolds### Population dynamics and manifolds A shift in framing during the 2010s changed what decoders assume. Rather than treating each neuronDuring the 2010s a change in framing altered what decoders assume. Rather than treating each neuronas encoding a variable, the dynamical-systems view treats motor cortex as a machine whoseas encoding a variable, the dynamical-systems view treats motor cortex as a machine whose populationpopulation state evolves according to internal rules, with rotational structure that appears duringstate evolves according to internal rules, with rotational structure that appears during reachingreaching regardless of the specific movement.[^churchland2012] Population activity turns out toregardless of the specific movement.[^churchland2012] Population activity turns out to occupy aoccupy a low-dimensional subspace — a neural manifold — of perhaps ten to a hundred dimensions,low-dimensional subspace, called a neural manifold, of perhaps ten to a hundred dimensions, whateverwhatever the number of recorded neurons.[^gallego2017]the number of recorded neurons.[^gallego2017] This has two practical consequences. First, it explains the diminishing returns from higher channelThis has two practical consequences. First, it explains the diminishing returns from higher channelcounts: additional electrodes sample the same manifold more densely rather than revealing newcounts. Additional electrodes sample the same manifold more densely rather than revealing newindependent signals, which is why the arms race in electrode numbers pursued byindependent signals, which is why the race to more electrodes pursued by [[neuralink]] and others[[neuralink]] and others has not translated proportionally into control performance. Second, ithas not translated proportionally into control performance. Second, it offers a fix for drift.offers a fix for drift. ## Calibration drift## Calibration drift A decoder trained on Monday works worse on Tuesday. Electrodes shift by micrometres, the set ofA decoder trained on Monday works worse on Tuesday. Electrodes shift by micrometres, the set ofrecorded neurons turns over, impedances change, and the user's own strategy changes as they learn.recorded neurons turns over, impedances change, and users change their own strategy as they learn.The traditional response is to recalibrate at the start of every session, which costs minutes andThe traditional response is to recalibrate at the start of every session, which takes minutes andrequires supervision — a serious obstacle to home use.needs supervision, a serious obstacle to home use. The manifold view suggests an alternative: the latent dynamics underlying a behaviour are far moreThe manifold view suggests an alternative. The latent dynamics underlying a behaviour are far morestable than the individual neurons expressing them, so a new day's recordings can be aligned to astable than the individual neurons expressing them, so a new day's recordings can be aligned to astored latent space rather than relabelled from scratch. Stabilizers built on this principle havestored latent space instead of being relabelled from scratch. Stabilizers built on this principlemaintained performance across long gaps without new supervised calibration.[^degenhart2020] Relatedhave maintained performance across long gaps without new supervised calibration.[^degenhart2020]work has shown that latent dynamics for a learned behaviour remain consistent overRelated work has shown that latent dynamics for a learned behaviour remain consistent overyears.[^gallego2020]years.[^gallego2020] > [!key] Why drift is the practical bottleneck> [!key] Why drift is the practical bottleneck> Peak decoding accuracy in a laboratory session is not what limits deployment. A device that needs> Deployment is limited less by peak decoding accuracy in a laboratory session than by stability. A> a technician every morning cannot be a medical product. Most of the engineering distance between> device that needs a technician every morning cannot be a medical product. Most of the engineering> current research systems and an approved implant lies in making decoders that survive weeks> distance between current research systems and an approved implant lies in making decoders that> unattended, not in raising a benchmark number.> survive weeks unattended, rather than in raising a benchmark number. ## Non-invasive and semantic decoding## Non-invasive and semantic decoding Decoding from outside the skull is far more limited, and the limits are informative. A widelyDecoding from outside the skull is far more limited, and the limits are informative. A widelydiscussed 2023 study reconstructed the gist of continuous language from functional MRI whilediscussed 2023 study reconstructed the gist of continuous language from functional MRI whilesubjects listened to stories, watched silent films, or imagined telling a story.[^tang2023] Thesubjects listened to stories, watched silent films, or imagined telling a story.[^tang2023] Theoutput was a paraphrase, not a transcript: it captured meaning while frequently getting exact wordsoutput was a paraphrase rather than a transcript, capturing meaning while frequently getting exactwrong.words wrong. The conditions attached to that result are the important part. Each decoder required many hours ofThe conditions attached to that result matter most. Each decoder needed many hours of training datatraining data from the specific individual, transferred poorly to other people, and could befrom the specific individual, transferred poorly to other people, and could be defeated by andefeated by an uncooperative subject performing a distracting mental task. fMRI also requiresuncooperative subject performing a distracting mental task. fMRI also requires lying still inside alying still inside a large magnet. The study's authors framed these findings as evidence thatlarge magnet. The study's authors framed these findings as evidence that mental privacy is currentlymental privacy is currently protected by practical barriers rather than by principle — a framingprotected by practical barriers rather than by principle, a framing central to the policy discussioncentral to the policy discussion under [[mental-privacy]] and [[neurorights]].under [[mental-privacy]] and [[neurorights]]. Image reconstruction from fMRI using diffusion models produces striking pictures, but similarlyImage reconstruction from fMRI using diffusion models produces striking pictures. It too depends ondepends on tens of thousands of image-response pairs per subject, and the generative model suppliestens of thousands of image-response pairs per subject, and the generative model supplies a largea large share of the detail in the output. Distinguishing what the brain data contributed from whatshare of the detail in the output. Separating what the brain data contributed from what the priorthe prior supplied is an active methodological problem.supplied is an active methodological problem. ## Open problems## Open problems Decoders recover trained categories. A speech decoder cannot output a language it never saw; aDecoders recover trained categories. A speech decoder cannot output a language it never saw, and amovement decoder cannot produce a gesture absent from calibration. Whether richer or more abstractmovement decoder cannot produce a gesture absent from calibration. Whether richer or more abstractcontent is recoverable at all from any practical measurement is unknown, and it is a differentcontent can be recovered at all from any practical measurement is unknown, and that is a separatequestion from whether that content is present in the signal.question from whether the content is present in the signal. Generalization across people is weak. Nearly every high-performing decoder is fitted to oneGeneralization across people is weak. Nearly every high-performing decoder is fitted to oneindividual, and efforts to build cross-subject foundation models for neural data are early. Relatedindividual, and efforts to build cross-subject foundation models for neural data are at an earlyto this, the field lacks agreed benchmarks: results are typically reported on bespoke datasets fromstage. The field also lacks agreed benchmarks: results are typically reported on bespoke datasetssingle participants, which makes comparison across laboratories difficult.from single participants, which makes comparison across laboratories difficult. Finally, decoding is silent about mechanism. That a variable can be read out of a population doesFinally, decoding says nothing about mechanism. That a variable can be read out of a population doesnot establish that the brain uses it, a point that recurs in debates over thenot establish that the brain uses it. The point recurs in debates over the[[neural-correlates-of-consciousness]] and in arguments about what a wiring diagram from[[neural-correlates-of-consciousness]] and in arguments about what a wiring diagram from[[connectomics]] would and would not explain. Decoding accuracy is a lower bound on the information[[connectomics]] would and would not explain. Decoding accuracy sets a lower bound on thepresent, not a description of how it is used.information present; it does not describe how that information is used. ## Outlook## Outlook The near-term trajectory is toward decoders that self-calibrate, transfer across sessions, and runIn the near term, decoders are moving toward self-calibration, transfer across sessions, and runningon the implant rather than on a laboratory computer. Those changes matter more for clinicalon the implant rather than on a laboratory computer. For clinical deployment those changes matterdeployment than any further accuracy gain. Beyond that, the question that recurs in discussions ofmore than any further gain in accuracy. Beyond that, a question that recurs in discussions of[[whole-brain-emulation]] applies here in miniature: how much of a system's function can be[[whole-brain-emulation]] applies here in miniature: how much of a system's function can berecovered from the measurements a practical device can make? For motor intention the answer hasrecovered from the measurements a practical device can make? For motor intention the answer hasturned out to be a surprising amount from surprisingly few neurons. Whether that generalizes beyondturned out to be a surprising amount from surprisingly few neurons. Whether that generalizes beyondremoved, struck through added, underlinedLine numbers count the serialised markdown of each revision, frontmatter included.
118 lines are the same in both revisions, and 49 of them are not shown. Neither revision here is necessarily the current article — read Neural decoding for the text this wiki stands behind today.