A High-Performance Speech Neuroprosthesis

A man with ALS cannot speak clearly. Electrodes in his cortex, a neural network and a language model turn his attempted words into text at 62 words per minute.

Learn how spikes from the speech cortex become phonemes, then words, and why a second study could do it after one afternoon of training.

Slide the message length, then press Race. Four ways of communicating send the same message at their real speeds. Then we build, piece by piece, the whole decoder: the electrodes, the network, the language model and the error counts.

You need a rough idea of a probability (a number from 0 to 1 for how likely something is) and a little Python. We build the rest from zero.

Based on Willett et al., A high-performance speech neuroprosthesis, Nature 2023, and Card et al., An accurate and rapidly calibrating speech neuroprosthesis, NEJM 2024. Both are open to read; every idea is re-taught here in our own words. It is a reading of the lecture Measuring a BCI.

Send the same message

30

Speeds are the papers’: head mouse 6.3 correct words per minute (Card 2024, the participant’s own typing), handwriting BCI 18 (the earlier record Willett cites), 2024 speech BCI 31.6 (self-paced, Copy Task, final five sessions), 2023 speech BCI 62, natural speech about 160. Word error rates: 2.5% for 31.6 wpm and 23.8% for 62 wpm on a 125,000-word vocabulary. The race is a plain time calculation, words divided by speed, so it ignores the time to fix errors.

Chapter 0

A Voice Trapped Behind the Muscles

See why speech is the hardest message to lose, and follow one sentence from electrode to text

Picture a man who wants to tell his daughter something. His mind is sharp. He knows each word. But his voice comes out as a low, nasal, unclear sound that only his closest carers can follow. A stranger hears noise.

This is the situation of the man in the second paper of this lesson. He has ALS (amyotrophic lateral sclerosis, a disease that slowly destroys the nerves that drive muscles). It left him with dysarthria, which means the muscles of the mouth and throat no longer shape speech well. The paper says that to expert listeners he communicates at 6.8 correct words per minute. Typing with a head-tracking mouse gives him 6.3. Natural conversation runs near 160.

The brain still works, though. The idea is simple. When he tries to say a word, the part of his cortex that plans mouth movements still sends its commands. The muscles cannot obey, but the commands exist. A brain-computer interface (BCI, a device that reads brain activity and turns it into an action on a computer) can read those commands and write the word.

Two papers, one decoder family

Both papers come from the BrainGate2 clinical trial. The first, by Willett and colleagues (Nature, 2023), used a woman called T12 who also has ALS. Her decoder wrote at 62 words per minute. It made errors on 23.8% of words when it could pick from 125,000 words, and on 9.1% when it could pick from 50.

The second, by Card and colleagues (New England Journal of Medicine, 2024), used a 45-year-old man with four electrode arrays. The team reused the decoder design and improved it. On his first day of use, after 30 minutes of recording, it got 99.6% of words right from a 50-word list. On day two, after 1.4 more hours, it got 90.2% right from the full 125,000 words. Over 8.4 months it held 97.5%.

We teach them together because the second paper stands on the first. One decoder, two studies, and a clear question: how much accuracy, speed and training time can you get?

The pipeline in one picture

A sentence takes six steps to go from the cortex to the screen. Electrodes record voltage. A program turns voltage into features (a small set of numbers per electrode that summarise firing). A recurrent neural network (RNN, a network that reads a sequence one step at a time and keeps a memory) turns features into phoneme probabilities. A phoneme is one basic sound of speech, such as the “k” in “cat”. A language model (a program that knows which word sequences are likely in English) turns phonemes into words. Words appear on the screen.

Each step changes the shape of the data. Drag the length of the speech and step through the stages. Watch how many numbers survive each step.

Follow one sentence through the decoder

Each row is one stage. The right side shows the data that leaves it. Pick a stage to light it, then change the seconds of speech and see the shapes change.

8 s

The bin and step counts follow the papers: features arrive in 20 ms bins, and the decoder outputs once every 80 ms. The 256 features are our arithmetic from Willett 2023: two arrays in area 6v give 128 electrodes, and each electrode gives two features. The words column uses the 62 words per minute the paper reports. The Card 2024 system has 256 electrodes, so its feature count is larger.

Read the sentence from top to bottom. A few seconds of voltage become hundreds of rows of 256 numbers. The network squeezes them to a short list of phoneme probabilities. The language model squeezes that again into a handful of words. Information gets smaller and more useful at each step.

What is being read, and what is not

It helps to be clear about what this device does not do. It does not read thoughts. It does not hear audio: no microphone was used for decoding, and Card and colleagues found no sign that sound leaked into the neural recordings. It reads the motor plan for attempted speech, when the participant tries to move lips, tongue, jaw and larynx. If he does not try to speak, nothing is written.

This also explains why these papers matter to engineers, not only to doctors. The decoder is a signal-processing and machine-learning system with hard limits: noisy signals, little training data, drifting inputs and a need to run in real time. The rest of the lesson takes each limit in turn.

The road

  1. Reading spikes: what the electrodes record and how it becomes features.
  2. Where speech lives: which cortex areas carry the signal and why phonemes work.
  3. Phonemes and CTC: how to train when you do not know the timing.
  4. The recurrent decoder: the network, the day-specific layer and rolling normalisation.
  5. The language model: turning noisy phonemes into words.
  6. Counting errors: word error rate and the 2023 results.
  7. What scales: electrodes, vocabulary and training data.
  8. Calibrating in minutes: the 2024 study.
  9. Field Guide: numbers, checklist, code and links onward.
What signal does the speech neuroprosthesis decode?

Chapter 1

Reading the Spikes

Turn a tiny, noisy voltage into two numbers per electrode every 20 milliseconds

Stand outside a football stadium with a microphone. You cannot hear one fan. You hear a roar. Now push the microphone inside, right next to one seat. Suddenly you can pick out that person's shouts above the roar.

An electrode in the cortex is that microphone. The cortex is the folded outer layer of the brain, full of nerve cells called neurons. A neuron talks by firing a spike: a brief voltage blip that lasts about a millisecond. A recording electrode sits a fraction of a millimetre from a few neurons and picks up their spikes on top of a bed of background noise.

The hardware

Both papers use 64-electrode arrays of the Utah array kind; Card names them as Blackrock NeuroPort arrays. Each array is a 3.2 by 3.2 mm square. It holds 64 electrodes in an 8 by 8 grid, pushed 1.5 mm into the cortex. Each electrode has one recording site about 50 micrometres wide, small enough to hear one neuron or a few. Wires carry the signal to a pedestal on the skull, and HDMI cables take it to a computer cart.

Willett's participant had four arrays, but only the two in area 6v were used for decoding (we see why in Chapter 2). That is 128 electrodes. Card's participant had four arrays in the precentral gyrus: 256 electrodes.

From voltage to a spike count

The raw voltage first passes through a band-pass filter, a filter that keeps the frequencies in one range and removes the rest. Extended Data Fig. 1 of Willett uses 250 to 5,000 Hz, a 4th-order Butterworth filter. Slow drifts and very fast hiss vanish. Spikes stay.

Next the system needs to decide what is a spike. The simple method: draw a line below zero and count every time the voltage dips under it. That line is the threshold. The paper sets it at 4.5 times the RMS (root mean square, the typical size of the voltage, which is the square root of the average squared voltage). In the example recording, background noise had an average RMS of 30.8 microvolts, so the threshold was about 139 microvolts below zero. Spikes in the figure reach hundreds of microvolts.

θ
The threshold voltage, in microvolts. It is negative because spikes recorded here point downward first.
k
How many RMS units below zero to place the line. The paper used 4.5. A bigger k is stricter.
RMS
The typical noise voltage on this electrode. Here 30.8 µV on average.
TXb
The threshold crossing count for time bin b. A bin is 20 ms long. One count per electrode per bin.
v(t)
The filtered voltage at time t.
θ
The same threshold as above.

θ = −4.5 × 30.8 µV = −138.6 µV

Why not sort the spikes, one neuron at a time? That is slow and fragile, and its results change from day to day. The papers keep it simple: they count crossings from whatever neurons sit near the electrode. These counts are called multiunit activity, a mix of a few neurons plus faint background. The lesson Spike Detection covers the idea in more depth, and Spikes to Rates shows how counts become firing rates.

Try it. The trace below is a toy: 12 real spikes of different sizes buried in noise. Move the threshold and watch two kinds of mistake trade off.

Set the threshold

The top trace is voltage over 400 ms. The dashed line is the threshold. Green marks are crossings that match a real spike. Red marks are noise crossings. Bars below count crossings in 20 ms bins. Drag k.

4.5

Illustrative: white Gaussian noise plus 12 seeded spikes from 90 to 380 µV, sampled at 10 kHz. The RMS is measured on the trace itself, so it differs a little from the paper’s 30.8 µV. The paper’s own choice was k = 4.5, and its Extended Data Fig. 5c notes that −3.5 might have worked slightly better.

At a low k, almost every spike is caught, but noise creates false crossings too. At a high k, the false alarms vanish, but the small spikes slip through. There is no free setting. Willett's team chose 4.5 and noted that a looser threshold might have done a little better.

The second feature: spike band power

A count throws away how big each dip was. The second feature keeps it. Spike band power (SP) is the average squared voltage of the filtered signal inside the bin. A busy electrode with large spikes has high power, even if spikes overlap and the count saturates. The paper's Extended Data Fig. 5c compares inputs and finds that combining spike band power with threshold crossings beats either alone.

So each time bin gives each electrode two numbers. With 128 electrodes the decoder in Willett receives 256 numbers every 20 ms. That table of numbers, one row per bin, is the only thing the network ever sees of the brain.

You raise the threshold from 4.5 to 6.0 RMS. What happens to the feature counts?

Chapter 2

Where Speech Lives in the Cortex

Test which brain areas carry speech, and learn the simplest classifier that proves it

Before building a decoder, the team had to ask a plain question: does this part of the brain carry any speech information at all? An array costs a brain surgery. Putting it in the wrong place wastes the whole study.

Willett's team placed four arrays: two in area 6v (ventral premotor cortex, a region that plans mouth movements) and two in area 44 (part of Broca's area, long linked to speech planning). They chose the spots with the Human Connectome Project's map of the cortex, aligned to the participant's own brain scan.

The test: an instructed-delay task

The participant, T12, saw a cue on a screen. It might be a face movement, a single phoneme or a single word. She waited through a delay, then attempted it on a “go” signal. The team knew what she was trying to do on every trial, so every trial came with a label.

They then asked a simple classifier to guess the label from 1 second of neural activity. The results, in the paper's Fig. 1d, are stark. In area 6v the classifier named 1 of 33 orofacial movements correctly 92% of the time, 1 of 39 phonemes 62% of the time and 1 of 50 words 94% of the time. In area 44, accuracy stayed below 12% for all three. Area 44 appeared to hold little to no information about producing speech.

So every later analysis used area 6v only. This single result shapes the whole decoder.

The simplest classifier: naive Bayes

A classifier picks one label from a list. Naive Bayes is the plainest one. For each label (say, a word) it learns the average activity of each electrode. To classify a new trial, it asks: which word's average pattern is this trial closest to?

The word “naive” has a precise meaning. The classifier treats electrodes as independent given the word. That is not true of the brain, but it makes the maths easy and works well here. The paper used a Gaussian version: each electrode's activity for a word is a bell curve around its mean.

score(w)
How well word w explains the trial. The classifier picks the word with the highest score.
∑e
Add up over every electrode e. This is where independence is assumed.
(xe − μw,e)2
The squared gap between the activity xe seen on electrode e and the average μw,e that word w usually gives.
2σ2
Twice the noise variance. We assume one shared σ for all electrodes to keep the idea clear.

A worked example with two electrodes and two words. Word A usually gives (6, 2). Word B usually gives (2, 6). Take σ = 2 so 2σ2 = 8. On a new trial you see x = (5, 3). The gap to A is (5−6)2 + (3−2)2 = 2, so score(A) = −2/8 = −0.25. The gap to B is (5−2)2 + (3−6)2 = 18, so score(B) = −2.25. A wins by a wide margin.

One electrode alone gives a weak vote, because its activity is noisy. Many electrodes add their votes together, and the errors cancel. Move the sliders to see this. The device below is a toy: it invents tuning for 8 words on 64 electrodes, then classifies 400 simulated trials.

Classify a word from many electrodes

Left: each column is a word, each row an electrode, brighter means a higher average rate. Right: accuracy as you add electrodes. Choose the area, then drag the electrode count.

16

Toy data, seeded: 8 words, 64 electrodes, tuning and noise drawn from Gaussians, 400 trials per point. Only the pattern is the paper’s. The paper’s numbers are 94% for 50 words in 6v and below 12% in area 44 (Fig. 1d), from a Gaussian naive Bayes classifier on 1 s of activity.

In the toy, area 6v climbs steadily as electrodes join. Area 44 stays at chance, which is 1 in 8, or 12.5%. The real data told the same story with 50 words.

Articulators are mixed together

A second finding matters for design. You might expect the lips to have one patch of cortex and the tongue another. At the level of single electrodes, they do not. Fig. 1f and Extended Data Fig. 4 show that one electrode is often tuned to several parts: jaw, larynx, lips and tongue together. All speech articulators appear within each 3.2 by 3.2 mm array.

This is good news for engineers. A small patch of cortex is enough. The decoder does not need to hit a precise spot for the tongue.

The code is still there years after paralysis

The last result of the Willett paper asks a deeper question. Does the cortex still use the usual map between sounds and mouth shapes, after years of not speaking? To test it, the team pulled a “neural vector” for each phoneme out of the trained network (a saliency vector, the pattern of input that most raises that phoneme's probability). They compared the vectors to measurements of tongue and lip positions from healthy speakers (electromagnetic articulography).

They compared by cosine similarity, which measures the angle between two lists of numbers: 1 means same direction, 0 means unrelated. Consonants articulated in similar places gave similar neural vectors. Nasals (M, N, NG) correlated. Vowels lined up on the two axes of the mouth: how high the tongue is, and how far forward. The correlation between neural and articulatory structure was 0.61, far above what shuffling phoneme labels gave. The articulatory code survives paralysis.

Why did the later decoder use only the arrays in area 6v?

Chapter 3

Phonemes and the CTC Trick

Train a network to write sounds from brain activity when nobody knows when each sound happened

Imagine teaching a child to read by playing a recording and asking for the written words. You would need to know which instant of audio matches which letter. Now imagine the recording does not exist, because the speaker cannot make clear sounds. That is the training problem here.

T12 can only produce unclear vocalisations. The team has no clean audio to mark when each sound began. They know the sentence she was told to attempt. They know the neural recording. They do not know which 80 ms of brain activity belongs to which sound.

Why phonemes are the right unit

A phoneme is one basic sound that distinguishes words. English uses about 39 of them. The word “cat” is three phonemes (K, AE, T). The papers write them in ARPABET, a plain-text spelling of sounds, such as HH AH L OW for “hello”.

Decode words directly and you need an output for each of 125,000 words, and each word seen rarely. Decode phonemes and you need 39 outputs, each seen thousands of times. Any new word is just a new string of familiar sounds. The decoder also learns from the shared articulator patterns we saw in Chapter 2: sounds made in the same place look alike, so the errors are sensible.

The network adds two extra outputs. One is a silence token for the gap between words. The other is a blank, which means “no new phoneme starts here”. That gives 39 + 1 + 1 = 41 outputs at every 80 ms step.

The CTC rule

Connectionist temporal classification (CTC, a training method for sequences with unknown timing) solves the timing problem with a collapse rule. The network writes one symbol per 80 ms step. Then two steps turn that long list into a short phoneme string:

  1. Merge any run of the same symbol into one.
  2. Delete every blank.

So HH HH − AH AH AH L − OW becomes HH AH L OW. A phoneme may last 1 step or 5; the output is the same. The blank also lets a word hold a repeated sound: L − L stays two L’s, while L L collapses to one.

Try it below. Choose a way of aligning the four phonemes of “hello” to the steps, and watch each rule act.

Collapse a path

Top row: one symbol for each 80 ms step. Middle row: after merging repeats. Bottom row: after deleting blanks (−). The target is HH AH L OW. Pick an alignment, and change the number of steps.

10

The word and its ARPABET spelling are an illustration; the 41-symbol output (39 phonemes, silence, blank) and the 80 ms step are the paper’s. The path count is exact: it comes from the standard CTC counting recursion on the blank-padded target.

Look at the read-out. A word of only 4 phonemes can be written as a path of 10 steps in 3,003 different ways, and every one collapses to the right answer. That is the point. The network does not need to be told which way is correct.

The CTC loss

For a recording, the network gives at each step t a probability pt(s) for every symbol s. A path π picks one symbol per step. Its probability is the product of the picks. The sentence's probability is the sum over all paths that collapse to it.

L
The CTC loss for one sentence. Training pushes it down.
∑π ∈ B−1(y)
Add over every path π that the collapse rule B turns into the target phoneme string y.
∏ pt(πt)
Multiply the probability the network gave to the path’s symbol at each of the T steps.

A tiny worked case. Take 3 steps and symbols A, B and blank. Target: “A B”. Say step 1 gives A 0.6, B 0.1, blank 0.3. Step 2 gives A 0.3, B 0.3, blank 0.4. Step 3 gives A 0.1, B 0.6, blank 0.3. Five paths collapse to AB:

A B −: 0.6×0.3×0.3 = 0.054   A − B: 0.6×0.4×0.6 = 0.144   − A B: 0.3×0.3×0.6 = 0.054   A A B: 0.6×0.3×0.6 = 0.108   A B B: 0.6×0.3×0.6 = 0.108

Sum = 0.468   →   L = −ln 0.468 = 0.759

You do not add these by hand for a real sentence, because the path count explodes. A dynamic-programming recursion adds them efficiently, and every deep-learning library ships it. The papers describe this method as adapted from modern speech recognition.

Why this suits a brain-to-text decoder

CTC needs only the sentence the participant was told to say. The 80 ms steps are slow enough that a phoneme spans a few of them. And the network’s raw output is already readable: Fig. 2d of Willett shows a closed-loop trial where taking the highest probability at each step, with no language model, gave a sensible phoneme string. The raw phoneme error rate was 19.7% for vocalised speech.

Why does the team train with CTC instead of labelling which 80 ms step holds each phoneme?

Chapter 4

The Recurrent Decoder That Tolerates Drift

Build the network that reads neural features, and see how two small tricks keep it working from day to day

On Monday, electrode 17 fires hard when the participant tries to say “ah”. On Tuesday, the array has shifted by a few micrometres and the neurons near it have changed their habits. Electrode 17 now fires less, and electrode 18 fires more. The decoder you trained on Monday listens to the wrong channels.

This slow change in the signal is called non-stationarity: the statistics of the inputs are not constant over time. It is the main practical enemy of every implanted BCI. The decoder in these papers has three parts that fight it: a network that reads sequences, a separate input layer for each day, and a running normalisation of the features.

Reading a sequence one step at a time

A recurrent neural network reads its input in order. At each step it combines the new input with a memory vector called the hidden state, then updates that memory. The memory lets step 30 know what happened at step 5. The lesson RNN and GRU goes deeper; here is the short version.

The papers use a gated recurrent unit (GRU). A gate is a number between 0 and 1 that decides how much to let through. A GRU has an update gate z and a reset gate r.

zt
The update gate. Near 0 means “keep the old memory”. Near 1 means “replace it”. Sigma (σ) squashes a number into the range 0 to 1.
rt
The reset gate. It decides how much of the old memory the new proposal may look at.
h̃t
The proposed new memory, built from the input xt and a filtered copy of the old memory. ⊙ means multiply element by element.
ht
The memory after step t: a blend of old memory and proposal, set by the update gate.

Read the last line as a slider. If z is 0.1, the memory barely changes: the network is carrying a phoneme across several steps. If z is 0.9, the memory is rewritten: a new phoneme begins. W and U are weight matrices that training sets.

The data flow, with shapes

Follow one recording. The features arrive as a table with one row per 20 ms bin and 256 columns (Willett’s decoder). A sentence of 8 s has 400 rows. The table goes through the pieces below. Fig. 2a of Willett gives the five-layer GRU and the 41 outputs; Extended Data Fig. 5 shows the kernel, stride and per-day layers were tuned.

python# x: [T_bins, 256]   TX + spike-band power, one row per 20 ms
x = rolling_zscore(x, recent_blocks)       # same shape; removes slow drift (below)
x = day_layer[day](x)                       # same shape (illustrative); a separate linear layer for each day
x = stack_and_stride(x, kernel=K, stride=4)   # [T_bins/4, K*256]: one RNN step per 80 ms
h = gru_5_layers(x)                         # [T_bins/4, H]   H is the hidden size
logits = linear(h)                          # [T_bins/4, 41]  39 phonemes + silence + blank
probs = softmax(logits)                     # each row sums to 1; trained with the CTC loss

For the 400-bin sentence that means 100 steps of 41 probabilities. The stride of 4 is our reading: 20 ms bins and one output every 80 ms. The paper’s sweeps vary the kernel size, the stride, the number of layers and the number of units, and note that bigger kernels might have helped.

Trick one: a different input layer for each day

Most of the network is shared across all days. That shared core learns the stable part: what a phoneme looks like in a brain. But the very first layer is different for each day. It is a small linear map that translates today’s channel quirks into the common language the core expects.

Why is this useful? On a new day only a thin layer must be learned, and every older day still teaches the core. Extended Data Fig. 5b shows day-specific layers beat one shared layer. Extended Data Fig. 5i shows that adding more prior days of data helps, with diminishing returns.

Trick two: rolling feature adaptation

Inside one day the signal also drifts. Z-scoring a feature means subtracting its mean and dividing by its standard deviation, so it has mean 0 and spread 1. Rolling z-scoring recomputes the mean and spread from the most recent data. No labels are needed. If a feature slides upward over the hour, its mean slides too, and the subtraction cancels the slide.

x′
The feature after adaptation. The network sees this.
x
The raw feature from one electrode.
μroll
The mean of that feature over the most recent data.
σroll
The spread (standard deviation) of that feature over the same data.

Extended Data Fig. 5a shows that this helps “substantially” on held-out blocks recorded later in the day than the training data. Try a toy version below.

Cancel the drift

Dots are one feature across 6 blocks of trials. Blue dots belong to word A, purple to word B. The dashed line is a decoder fixed on block 1. Raise the drift, then switch rolling z-scoring on.

1.2

Illustrative: one feature, two words 4 noise-units apart, 40 trials in each of 6 blocks, drift added linearly per block. The rolling statistics use the current and previous block, with no labels. The paper’s own result is Extended Data Fig. 5a, on real features.

With no drift both settings score about the same. As drift grows, the fixed decoder sees every trial as “word B”, because the whole cloud slid past its line. The rolling version re-centres the cloud each block. The cost is small: the system must keep recent unlabelled data, and the trick cannot fix changes that are not a shift or a rescale.

How much data does a day need?

Each evaluation day began with 260 to 480 sentences (41 minutes of data, 140 minutes of training and breaks), pooled with every earlier day. By the final day the training set held 10,850 sentences. When the team later re-ran the decoder with no new sentences from the test day, the word error rate was 30% instead of 23.8% (Fig. 4c). The decoder transfers across days, and a little fresh data fixes the rest.

What does rolling z-scoring do for the decoder?

Chapter 5

The Language Model Turns Sounds into Words

Combine noisy phoneme guesses with what English usually says, and see why the size of the word list matters

You are in a noisy room. A friend says something and you hear “I'd like a cup of ... fee.” You do not hear the first sound of the last word. You still know it was “coffee”, because “a cup of” makes some words very likely and others very unlikely.

The phoneme network from Chapter 4 is that noisy room. Its raw phoneme error rate is 19.7%: about one phoneme in five is wrong. If we spelled out the phonemes as they came, the text would be full of errors. A language model repairs them by supplying what the network cannot know, which is how English works.

What the language model knows

Willett’s team used a custom trigram language model with 125,000 words, built in the Kaldi speech toolkit. A trigram model predicts each word from the two words before it. It is an n-gram model (n = 3), and it learns its probabilities by counting word triples in a large text collection.

P(W)
How likely English is to produce the word sequence W.
∏i
Multiply over every word position i.
P(wi | wi−2, wi−1)
The chance of word wi after the two words before it. After “a cup of”, “coffee” scores high and “cough” scores low.

The lesson RNN Language Models shows the neural cousin of this idea. A trigram table is simpler and fast enough for live use.

Putting sounds and words together

The decoder wants the best sentence W given what the network saw, X. By Bayes’ rule that is the sentence that maximises the product of two things: how well W explains the phonemes, and how likely W is in English. Taking logs turns the product into a sum.

W*
The sentence the system shows on screen: the best-scoring candidate.
log P(X | W)
How well W matches the network’s phoneme probabilities. A word whose sounds fit the output scores higher.
λ
A weight that sets how much to trust the language model against the network. A tuning knob; its value is not given in the main paper.
log P(W)
The trigram language model score for W.

A worked case with made-up numbers. The network hears the sounds W EY T for the last word, and the words “wait” and “weight” both fit them equally well. The context is “I can’t ...”. Say the trigram gives P(wait | I can’t) = 0.02 and P(weight | I can’t) = 0.0005. The sound scores tie, so the log probabilities decide: log(0.02) is −3.9, log(0.0005) is −7.6, and “wait” wins by 3.7 log units.

In practice the system searches for W with a beam search: it keeps only the most promising partial sentences at each step. It runs while the participant speaks, and the words on the screen are the current best guess. Card’s team then applied two further open-source language models to turn the predicted word sequence into the most likely English sentence, as in the earlier report.

Why a larger vocabulary is harder

The language model also limits the answer to words in its list. A short list is a strong helper: with 50 words, the sounds only have to pick among 50 spellings. The phoneme errors rarely turn one valid word into another. Willett’s word error rate was 9.1% on 50 words and 23.8% on 125,000. When the team re-ran the 50-word data with bigger and bigger word lists, only lists of 50 to 100 words kept the big gain. The error saturated near 1,000 words, so a middle-sized list is not a useful shortcut.

The toy below lets you feel why. It draws words from a small lexicon, corrupts each word’s phonemes at the chosen rate, and decodes by the closest word. The word list grows from 8 to 48.

Grow the word list

The curve shows how often the nearest-word decoder gets the word right as the list grows. Move the list size and the phoneme error rate. Press New sample to see one trial.

8
20%

Toy: isolated words from a 48-word list written in ARPABET, phonemes swapped for look-alike sounds at the chosen rate (some dropped), then decoded by smallest edit distance, ties going to the earlier word. It has no trigram and no sentence context, so it shows only the vocabulary effect. Seeded, 300 trials per point. The paper’s numbers: raw phoneme error rate 19.7%, word error 9.1% at 50 words and 23.8% at 125,000.

At 20% phoneme errors, accuracy falls as the list grows, because more words sit within a few edits of each other (bat, bet, beat, bit). The real system has the context that this toy lacks. That context is why the real system can still decode 125,000 words with a 23.8% word error rate. An improved language model in Willett’s offline test cut the error from 23.8% to 17.4%.

The network is unsure between two words with the same sounds. What breaks the tie?

Chapter 6

Counting Errors and Reading the Results

Learn how a word error rate is counted, then read each number in the 2023 paper for what it measures

A decoder writes “we can walk about later today”. The person meant “we can talk about it later”. How wrong is that? One word is different, one is missing and one is extra. Is it 1 error, 2, or 3? You need a rule that everyone applies the same way, or the numbers in two papers cannot be compared.

The word error rate

Both papers use the word error rate (WER) and the phoneme error rate (PER). They are the same measure on different units. The rule is the Levenshtein distance: the smallest number of edits that turns the decoded text into the intended text. An edit is one of three things:

WER
The word error rate. 0 is perfect. It can exceed 100% if the decoder adds many words.
S
Substituted words in the best alignment.
D
Deleted words: in the intended text but missing from the decoded text.
I
Inserted words: in the decoded text but not intended.
N
The number of words in the intended text. Both papers divide by N, the expected count.

The minimum is found by a table. Write the intended words down the side and the decoded words across the top. Each cell holds the fewest edits needed to match the first i intended words to the first j decoded words. The cell takes the smallest of three moves: come from the diagonal (add 1 if the words differ, 0 if they match), from above (a deletion, add 1) or from the left (an insertion, add 1). The bottom-right cell is the answer. Try it.

Count the edits

Rows are the intended words, columns are the decoded words. The coloured path is the best alignment. Pick a decoded sentence or type your own.

The intended sentence is “we can talk about it later” (our example, 6 words). Green steps are matches, red steps are errors. The method is the paper’s: Levenshtein distance over words (or over phonemes for PER), divided by the length of the intended text.

With all three kinds of error the example scores 3 edits over 6 words, a WER of 50%. A single insertion on a long sentence scores very little; the same insertion on a three-word sentence is a big share. This is why the papers pool the errors over all sentences in a session before dividing.

What the 2023 paper measured

T12 attempted sentences from the Switchboard corpus of everyday phone conversations, and from a 50-word list used by an earlier study. The team scored 5 days of vocalised attempts and 3 days of silent mouthing. Fig. 2b and 2c plot the daily results; Table 1 gives the totals. Here are the numbers, with what each one says.

MeasureResultWhat it says
WER, 50 words, vocalised9.1% (11.2% silent)2.7 times fewer errors than the earlier best small-vocabulary BCI
WER, 125,000 words, vocalised23.8% (24.7% silent)The first large-vocabulary speech BCI
Speed62 words per minute3.4 times the 18 wpm handwriting BCI; natural talk is about 160
PER, raw network output19.7% (20.9% silent)Good decoding does not rest only on the language model
Improved language model, offline17.4%More headroom in the language model
Sentences nearer in time to training, offline11.8%Drift costs accuracy within a day
Reference pointsabout 4 to 5% (speech recognition); 1 to 2% (reading aloud)The bar for everyday use

Why report two error rates, and what the error bars mean

The phoneme error rate scores the network alone, before any language model. The word error rate scores the whole chain. Read them together. If the phoneme error is high but the word error is low, the language model is doing the heavy lifting. If both are low, the neural signal is strong. Here the raw phoneme error was 19.7%, and the word error was 9.1% on 50 words but 23.8% on 125,000. The small list leans harder on the language model.

Every number in Fig. 2 comes with a 95% confidence interval, drawn as a vertical line. It is a range for the true error rate, given that you tested only a sample of sentences. The Fig. 4 intervals come from resampling: draw the evaluation trials again, with replacement, 10,000 times, recompute the error rate each time, and keep the middle 95%. Each day pooled 80 trials for the large vocabulary and 50 for the small one, so a day with few trials has a wide line.

Three things stand out. First, speed and a large vocabulary came together: the paper reports the first successful large-vocabulary decoding. Second, silent speech was nearly as good as vocalised speech, and T12 preferred it because it was less tiring. Third, the authors state plainly that a 24% word error rate is probably not yet low enough for everyday use, and that this is a proof of concept from one participant.

Fig. 2d shows why the phoneme error rate matters. In one trial the network’s raw phoneme string had some errors, but the language model still produced the correct words. The raw errors fall on phonemes that are articulated alike, such as sounds made in the same part of the mouth (Extended Data Fig. 6). The language model finds them easy to fix.

Intended: “I like green tea” (4 words). Decoded: “I like tea”. What is the WER?

Chapter 7

What Scales: Electrodes, Words and Training Data

Read the paper’s ablations to see which knobs lower the error and which do not

You have built a decoder. A designer now asks three plain questions. Do we need a bigger word list? Do we need more electrodes? Do we need to retrain every morning? The 2023 paper answers each with an ablation, an experiment that removes or changes one part to see how much it mattered. Fig. 4 holds the three main ones, and Extended Data Fig. 5 holds many small sweeps.

Question 1: how large should the word list be?

The team took the outputs from the 50-word sessions and reprocessed them with language models of growing vocabulary (Fig. 4a). The result: only very small lists (50 to 100 words) kept the large accuracy gain. Error saturated near 1,000 words. A list of a few hundred words gives almost no relief compared with the full 125,000.

The lesson for a builder: a mid-sized vocabulary is not a compromise. You either pick a tiny, task-specific list (for example a smart-home command set) or you go all the way to open English.

Question 2: do more electrodes help?

Yes, and the trend is regular. The team trained decoders offline on subsets of electrodes and plotted word error rate against the count (Fig. 4b). The relation was close to a straight line on a log scale: doubling the electrodes multiplies the error by about 0.57. In another offline comparison, adding the dorsal 6v array to the ventral one cut the error from 32% to 21%.

WER(N)
The word error rate with N electrodes in the decoder.
WER128
The error at the study’s full 128 electrodes. We use 21%, the offline figure for both 6v arrays.
0.57
The factor the paper reports for each doubling of the electrode count.
log2(N / 128)
How many doublings away from 128 we are. It is 1 at 256, 2 at 512 and −1 at 64.

A worked case. At 256 electrodes, one doubling: 21% × 0.57 = 12.0%. At 512, two doublings: 21% × 0.57 × 0.57 = 6.8%. Slide below to explore the trend, and compare with the 2024 study.

Read the scaling plots

Choose a plot. On the electrode plot, slide the number of doublings and read the trend. Dots are values the papers report; the dashed line is the paper’s fitted trend carried further.

0.0

Dots are numbers printed in the papers: 64 electrodes 32% and 128 electrodes 21% (Willett, offline); 125,000 words 23.8% and 50 words 9.1% (online); 0 new-day sentences 30% and the online run 23.8% (Fig. 4c). The dashed trend multiplies 21% by 0.57 per doubling. The paper says how far this continues “remains to be seen”. The 2024 point (256 electrodes, 2.5%) comes from a different participant with much more training data.

The trend is a hint, not a promise. The 2024 study had 256 electrodes and reached 2.5%, far below the 12% the trend predicts. Its participant, hardware placement and training all differ, so the comparison does not prove a rule. It does show that other factors, such as data and algorithms, matter too.

Question 3: must we retrain every day?

Willett’s team used 260 to 480 new sentences every day. Offline, they re-ran the decoders with fewer or no sentences from the test day (Fig. 4c). With none, using only earlier days, the word error rate was 30%. So the decoder carries over, but fresh data still helps: 30% against 23.8%.

They also compared the neural patterns for a set of words on each pair of days (Fig. 4d). Nearby days correlated strongly, and the correlation faded smoothly with the gap. A change this gradual is good news: it suggests that unsupervised methods, which track the drift without new labelled data, should be possible. The authors cite several approaches. The lesson Drift and Recalibration covers them.

Extended Data Fig. 7 also asks which array matters. The ventral 6v array carried more of the decoding, as the cortex map predicted. Even so, low error needed both arrays together. Offline, the word error fell from 32% with the ventral array alone to 21% with both arrays. The two arrays see different mixes of speech and face movement, so each fills gaps the other leaves.

The small sweeps

Extended Data Fig. 5 reports a long list of what-ifs, each with 10 random seeds of the network. The findings, in order of importance for a builder:

Extended Data Fig. 7 adds one more: almost every electrode contributes, but removing any single one raised the phoneme error rate by less than 1%. The information is spread across many channels, so the decoder is robust to losing a few.

Using the paper’s trend and the 21% offline error at 128 electrodes, about what error do you expect at 256 electrodes?

Chapter 8

Calibrating in Minutes: the 2024 Study

Follow the second paper from a first day of use to eight months of daily conversation

On the first day of use, a man with ALS tried to say words from a short list, and the right words appeared on a screen as he tried to say them. He cried with joy. The research team paused the evaluation, left that first block out of the numbers, and let him and his family celebrate.

That is the opening of the second paper, by Card and colleagues. It is a different participant, 25 days after surgery. Everything we built in Chapters 1 to 5 stays the same: spikes become features, a recurrent network writes phonemes, a language model writes words. What changed is how fast it worked and how long it lasted.

The participant and the implants

The participant is a 45-year-old man. He received the implant five years after his ALS began, and he has severe dysarthria: unintelligible to strangers, 6.8 correct words per minute to expert listeners. In July 2023 he received four 64-electrode arrays in the left precentral gyrus, 256 electrodes in all. The operation took 5 hours. He left hospital on day 3 with no serious adverse events.

The team chose targets using the Human Connectome Project’s map aligned to his brain. They aimed at dorsal and ventral 6v, as before. They also aimed at two areas not previously recorded with microelectrode arrays: Brodmann area 4 (primary motor cortex) and area 55b, which is linked to phoneme representation. Data collection began 25 days after surgery.

From 30 minutes to 125,000 words

Session 1: the team recorded 213 sentences over 30 minutes using a 50-word list, trained the decoder, and ran it live. The word error rate was 0.44%. Session 2: 0% on the 50-word list. Then they expanded to over 125,000 words. They added 260 sentences of training data over 1.4 hours. The word error rate was 9.8% (95% confidence interval 4.1% to 16.0%).

It kept improving. By session 15 the error was 2.5%, and it stayed there through session 84, over eight months after the implant. In the final five evaluation sessions the participant, speaking at his own pace of 31.6 words per minute, had a 2.5% error rate. Within 16 cumulative hours, the system got 97.3% of attempted words right.

Compare the training cost. Willett’s 2023 system needed 16.8 hours of data over 15 days, starting 113 days after implant, to reach 23.8%. An ECoG study needed 17.7 hours over 13 days to reach 25.5% on 1,024 words. Test your own sense of that gap.

Guess the training time

How many hours of training data did the 2024 decoder need to get under 10% word error on 125,000 words? Set your guess, then press Reveal.

4.0 h

Points are from the papers: 2024 system, 50-word list 0.44% after 30 minutes (0.5 h) and 125,000 words 9.8% after 1.4 further hours (about 1.9 h, our sum); 2.7% within 16 cumulative hours; 2023 system 23.8% after 16.8 h; the earlier ECoG study 25.5% after 17.7 h on 1,024 words. Vocabularies differ between points. These are single participants.

What made the difference? The NEJM text names two things. First, it says the team “adapted innovations for incorporating new data more effectively”, with data from multiple days combined to calibrate the decoder continuously. Second, it used four arrays in the precentral gyrus, including new target areas. The main text does not isolate how much each contributed, so we do not claim a split. The details are in the paper’s supplement.

Conversation mode

Copy tasks are tidy: the screen says what to say. Real use is not. The team built a Conversation Mode where the participant says whatever he wants, with output limited to the 125,000-word dictionary. Three design points matter to an engineer.

The numbers from real use: 22,679 sentences across 72 of 84 sessions, 248.3 cumulative hours over 8.4 months. The longest almost continuous use was 7.7 hours. On 925 conversation sentences with known intended text, the word error rate was 3.7% (95% CI 3.3% to 4.3%). He rated 52.9% of all conversation sentences as correct and 32.3% as mostly correct. On 29 days of purely personal use he asked for a recalibration three times. Each took about 7.5 minutes, with twenty Copy Task sentences.

He used it to speak with family and friends, to join video meetings, and to write documents and emails. It became his preferred way to talk with the research team.

What the paper does not claim

The authors list limits. This was one participant, and results may differ for others. How the system holds up as ALS progresses is not known. A researcher still had to connect and launch the system. The participant, speaking through the system, told the team: “I hope that we are very close to the time when everyone who is in a position like me has the same option to have this device as I do.”

Which claim about the 2024 study does the paper support?

Chapter 9

Field Guide: The Speech Neuroprosthesis on One Page

Review the whole decoder, check what you would need to rebuild it, and find where to go next

You can now describe two Nature-level studies from memory. Electrodes in the speech cortex record spikes. A program turns them into threshold crossings and spike band power every 20 ms. A recurrent network, trained with CTC, writes a phoneme probability every 80 ms. A language model turns phonemes into words. Rolling normalisation and day-specific input layers keep the network steady as the signal drifts. The word error rate scores the result. The second paper made it fast to calibrate and steady for months.

Build it yourself: the checklist

Each piece below is something the papers needed. Switch pieces off to see what you would lose, in the paper’s own words.

Switch off a piece

All eight pieces start on. Press one to remove it and see the consequence the chapters described.

Consequences are those reported or argued in the chapters (for example Extended Data Fig. 5a and 5b, Fig. 4c, and the CTC argument), not new measurements.

The numbers that matter

WhatNumberSource
Area 6v classification, 1 s of activity92% (33 movements), 62% (39 phonemes), 94% (50 words)Willett Fig. 1d
Area 44 classificationbelow 12%Willett Fig. 1d
Spike threshold−4.5 RMS; noise RMS 30.8 µVWillett Extended Data Fig. 1
Network step, outputs80 ms; 41 (39 phonemes, silence, blank); 5 GRU layersWillett Fig. 2a
Language model125,000-word trigram in KaldiWillett Fig. 2a
Daily training data260 to 480 sentences, 41 ± 3.7 min; 10,850 sentences by the last dayWillett main text
2023 word error rate9.1% (50 words), 23.8% (125,000 words)Willett Table 1
Raw phoneme error rate19.7% vocalised, 20.9% silentWillett Table 1
Speed62 wpm (2023); 31.6 wpm (2024 Copy Task)Willett; Card
Electrode scalingdoubling cuts error by a factor of 0.57Willett Fig. 4b
No new-day sentences30% word errorWillett Fig. 4c
2024 first sessions0.44% (50 words, 30 min); 9.8% (125,000 words, +1.4 h)Card main text
2024 sustained2.5% Copy Task; 3.7% conversation (n = 925)Card main text, Fig. 4b
2024 use22,679 sentences, 248.3 h, 8.4 monthsCard main text
Recalibration in useabout 7.5 min, 20 sentences, 3 times in 29 daysCard main text

The core as code

This sketch is ours, in PyTorch, to show the data flow. The paper trained its network in TensorFlow 2. Sizes marked illustrative are not given in the main text.

pythonimport torch, torch.nn as nn, torch.nn.functional as F
BLANK, K, STRIDE, N_OUT = 40, 32, 4, 41        # K is illustrative; 4 bins x 20 ms = 80 ms

def rolling_zscore(x, mu, sd):                # x: [B, T, 256]; mu, sd from recent blocks
    return (x - mu) / (sd + 1e-6)

class Decoder(nn.Module):
    def __init__(self, n_days, n_feat=256, hid=512):     # hid is illustrative
        super().__init__()
        self.day = nn.ModuleList([nn.Linear(n_feat, n_feat) for _ in range(n_days)])
        self.gru = nn.GRU(K * n_feat, hid, num_layers=5, batch_first=True)
        self.out = nn.Linear(hid, N_OUT)
    def forward(self, x, day):                       # x: [B, T, 256], 20 ms bins
        x = self.day[day](x)                            # [B, T, 256]  today's input layer
        x = x.unfold(1, K, STRIDE)                       # [B, T/4, 256, K]
        x = x.flatten(2)                                 # [B, T/4, 256*K]
        h, _ = self.gru(x)                              # [B, T/4, hid]
        return self.out(h).log_softmax(-1)            # [B, T/4, 41]

def train_step(model, opt, x, day, phones, in_len, tgt_len):
    logp = model(x, day).transpose(0, 1)               # CTC wants [steps, B, 41]
    loss = F.ctc_loss(logp, phones, in_len, tgt_len, blank=BLANK)
    opt.zero_grad(); loss.backward(); opt.step()
    return loss.item()

def decode(logp, lm):                               # logp: [steps, 41] for one sentence
    return lm.beam_search(logp)                      # trigram LM, 125,000 words

def wer(ref, hyp):                                  # Levenshtein over words / len(ref)
    d = list(range(len(hyp) + 1))
    for i, r in enumerate(ref, 1):
        prev, d[0] = d[0], i
        for j, h in enumerate(hyp, 1):
            prev, d[j] = d[j], min(d[j] + 1, d[j - 1] + 1, prev + (r != h))
    return d[-1] / len(ref)

Read it against the chapters. The z-score is Chapter 4, trick two. The day layer is trick one. The unfold turns 20 ms bins into 80 ms steps. The CTC call is Chapter 3. The beam search is Chapter 5, and the last function is Chapter 6.

Where this sits

This is the clearest example of the full BCI loop: record, extract features, decode, repair with a prior, score. The lecture Measuring a BCI sets up the measures this paper uses. The decoder family has a long history: the linear decoders and the Kalman decoder for cursor control came first. The recurrent network replaces them for speech, where the output is a sequence with unknown timing. Cursor and handwriting BCIs control continuous or letter-level targets; this one goes to phonemes and words.

Credit and sources

Willett FR, Kunz EM, Fan C, Avansino DT, Wilson GH, Choi EY, Kamdar F, Glasser MF, Hochberg LR, Druckmann S, Shenoy KV, Henderson JM. A high-performance speech neuroprosthesis. Nature 620, 2023 (open access, CC BY 4.0). Willett, Kunz and Fan contributed equally.

Card NS, Wairagkar M, Iacobacci C, Hou X, Singer-Clark T, Willett FR, Kunz EM, Fan C, Vahdati Nia M, Deo DR, Srinivasan A, Choi EY, Glasser MF, Hochberg LR, Henderson JM, Shahlaie K, Stavisky SD, Brandman DM. An accurate and rapidly calibrating speech neuroprosthesis. New England Journal of Medicine, 2024. Stavisky and Brandman contributed equally.

Thanks to the two participants and their caregivers, who gave their time to the BrainGate2 pilot clinical trial. This lesson re-teaches the papers in our own words; any error in the retelling is ours. Toy devices are labelled; every other number is the papers’.

The takeaway A speech BCI is a chain of small, well-chosen pieces: spike counts, a drift-proof recurrent network trained without timing labels, and a language prior. Each piece fixes one specific failure, and the error rate drops as electrodes and calibration data improve.

Next: press Present to explain this decoder aloud, or Teach to draw it on a whiteboard. Or go back to the race and watch the two systems again, now that you know what sits under each bar.

A friend proposes training the network with a loss that needs the exact time of every phoneme. Why would that not work for this participant?
A high-performance speech neuroprosthesis
Willett et al. 2023 (Nature) · Card et al. 2024 (NEJM) · Back to Measuring a BCI