Four teams improved one speech-BCI decoder. The winner cut word errors from 9.7% to 5.77% by merging ten decoders with a fine-tuned language model.
Learn how a brain implant’s signals become text, how the field scores that text, and which ideas really made it more accurate.
Pick an entry below. Watch how many of every 100 words come out wrong. Then we build, piece by piece, the baseline decoder, the score, and every trick the winners used.
You need a feel for percentages and the idea of a neural network (a stack of adjustable arithmetic that learns from examples). We build the rest from zero.
Based on “Brain-to-Text Benchmark ’24: Lessons Learned” by Francis R. Willett and Jaimie M. Henderson (the organizers) and the teams of Jingyuan Li, Trung Le, Chaofei Fan, Mingfei Chen and Eli Shlizerman (1st); Yue Chen, Xin Zheng and Tatsuo S. Okubo (2nd); Tyler Benster (3rd); and Hyun Dong Lee, Maxwell Kounga, E. Kelly Buchanan, David Zoltowski and Scott W. Linderman (4th). arXiv 2412.17227. Every idea is re-taught here in our own words. This paper is a reading of the lecture Measuring a BCI.
The scores are the paper’s: baseline 9.7% and the winner 5.77% (Sections 1 and 5.2), 2nd 8.26% (4.2), 3rd 8.9% (3), 4th 9.22% (2). The 100 tiles are an illustration: the count of red tiles matches the rate, but which words are wrong is random.
Chapter 0
See why a few percent of word errors decides whether a speech implant feels usable, and meet the contest built to push that number down
Picture a person who cannot speak. A stroke or a disease such as ALS (amyotrophic lateral sclerosis, which wears away the nerves that move muscles) has cut the link between their brain and their mouth, but the brain still plans the words. A thin grid of electrodes in the speech part of the motor cortex (the strip of brain that sends movement commands) picks up that plan. A computer reads it and types the sentence on a screen.
This works today. A speech brain-computer interface (speech BCI: a device that turns attempted speech into text or voice) has let a person with paralysis join family talk and use it daily at work. The paper tells us so in its first lines. It also tells us what is still wrong: the decoders “still routinely make errors”.
Now count what one error costs. You say, “I would like a glass of water with my dinner tonight, please.” The screen shows, “I would like a class of winter with my dinner tonight, please.” Two words are wrong. The reader must guess what you meant, and you must try again. The authors point out that the worst case is a wrong key content word, a word the sentence cannot lose.
To fix errors you must first count them. The field counts them with the word error rate (WER): the share of words the decoder gets wrong, found by comparing its text to what the person meant to say. A WER of 10% means about 1 wrong word in every 10. Chapter 2 builds the exact formula.
Try it below. The slider sets the WER. The sentence on screen shows which words fail. The bar shows how often a whole 12-word sentence comes out with no error at all. The bar falls faster than you expect, and that is the first lesson of this paper.
Each word has the same small chance of failing. Drag the rate, or press a preset. Red words are wrong. The bar below is the share of sentences with no wrong word.
The 9.7% and 5.77% rates are the paper’s. The sentence and the wrong words are a toy. The bar assumes every word fails on its own with the same chance, so a clean sentence has probability (1 − WER)12. Real errors cluster, so treat the bar as a rough guide.
At the baseline rate of 9.7%, only about 29 sentences in 100 come out clean. At the winner’s 5.77% it is about 49 in 100. A drop of four points in WER lifts clean sentences by twenty points. That is why a few percent is worth a whole competition.
The authors, led by Francis Willett and Jaimie Henderson, are the people who ran the original experiment at Stanford. When they published their first speech decoder, they also released the recordings. They called the release the Brain-to-Text Benchmark ’24. The dataset holds 10,000 sentences. A set of 1,200 held-out sentences stays private. A team sends in its decoder’s text and the organizers score it on those hidden sentences. Nobody can tune on the answers.
A benchmark is a fixed test that many teams run so their results can be compared. The competition closed on 1 June 2024. By then four entrants had beaten the organizers’ PyTorch baseline of 9.7% WER, and the best reached 5.8%. The benchmark stays open, so anyone can still enter.
This paper is a short report. Each of the four teams tells its own story, and the organizers add a discussion. The lesson follows the same plan but teaches each idea from zero. It is a reading of the lecture Measuring a BCI, which asks how a field decides that a device is good.
Keep one caution in mind as you read the scores. The team entries are final submissions, tuned by different people with different budgets. They show what is possible, and they do not isolate one idea at a time. We point out where the paper does run a proper ablation, a test that adds one change and holds the rest fixed.
Chapter 1
Follow one attempted sentence through the five stages of the baseline decoder, and see where each team later made changes
A woman at a kitchen table tries to say, “I want water.” Her mouth stays still, because she cannot move it. But the part of her brain that plans the words still fires. Electrodes record that firing. Half a second later a screen shows text. What happened in between?
The organizers built the answer first, as a starting point for the contest. They call it the baseline: a simple, published recipe that every team must beat. The paper describes it in one dense sentence. Here we unpack it into five stages. The later chapters change one stage at a time, so you need the whole map first.
The electrodes sample the brain many times a second. The system cuts that stream into short time slices called bins and keeps a few numbers per electrode for each bin, such as how often it saw a spike (a brief electrical pulse from one nerve cell). Call the result a table with T rows, one per bin, and F columns, one per feature. We write its shape as [T, F]. The numbers in this lesson are illustrative: a sentence of 300 bins and 256 features.
A recurrent neural network (RNN) reads such a table one row at a time. It keeps a small memory, called its hidden state, and updates the memory with each new row. That memory lets it use what came earlier. The baseline RNN uses gated recurrent units (GRUs), a kind of RNN cell with gates that decide what to keep and what to forget. The paper notes one more detail. The RNN receives inputs “stacked across a window of history”, so each step sees several recent bins at once.
At each step the RNN does not guess a word. It scores sounds. A phoneme is the smallest unit of sound that can change a word: the “k” in “cat” versus the “b” in “bat”. The paper says there are 40 phoneme classes. A logit is a raw score before it becomes a probability. For every bin the RNN outputs one logit per class, plus one extra class that means “nothing new here”. Chapter 3 explains that extra class. The output shape is [T, 41] in our toy numbers.
Why phonemes and not letters or words? English has a small set of sounds but a huge set of words. A model that learns 40 sounds from 10,000 sentences can spell out words it has never seen. The motor cortex also plans movements of the mouth, and the mouth makes sounds.
A string of phonemes is not yet English. Many word sequences sound alike. The baseline uses a language model, a program that scores how likely a word sequence is in English, in two steps. First a 5-gram model proposes candidate sentences. A 5-gram model counts how often each run of five words appears in a large body of text, and it looks only at the last four words when it predicts the next. Second, a large language model (LLM), the kind of network behind chat assistants, rescores those candidates. The baseline uses OPT. TeamCyber names the size: OPT6.7B, a model with about 6.7 billion parameters. Chapter 4 shows the scoring.
Click through the stages below. Each row shows what flows in and out, and which team changed it later.
Pick a stage. The highlighted row shows its data shape in our toy sentence and says which entry in the contest changed it.
Stage order and the 40 phoneme classes are the paper’s (Sections 1 and 5.1). The sizes T = 300, F = 256, H = 512 and N = 100 candidates are illustrative, chosen to show the shape; the paper does not print them. The extra class makes 41 outputs by our count.
Here is the baseline in a dozen lines. The function names are ours. The shapes show what moves between stages.
python # x: neural features for one sentence shape [T, F] h = gru_stack(stack_window(x)) # [T, H] hidden state per bin logits = linear(h) # [T, 41] 40 phonemes + blank logp = log_softmax(logits, dim=-1) # log-probabilities # training: CTC loss against the phoneme string of the sentence loss = ctc_loss(logp, target_phonemes) # decoding cands = ngram5_beam_search(logp, n_best=N) # N sentences, each with a score best = llm_rescore(cands) # one sentence
Read the first block as the neural decoder and the last two lines as the language model decoder. The paper calls this a “two-stage” design. Everything the winners did fits somewhere in this code: new training for the first block, a new output head, or a smarter last line.
Now the failure mode. Symptom: a team improves the RNN and sees its phoneme error rate fall, yet the final text gets worse. Measurement: TeamCyber tried convolutional front ends that reached a phoneme error rate near 15% on validation data, and their word error rate was higher than the baseline’s once the language models ran. Fix: judge every change by the final WER, because the language model stages can hide or amplify the RNN’s mistakes. The organizers say they saw the same effect routinely.
Chapter 2
Derive the score from edit distance, count substitutions, deletions and insertions, and see why it ignores how bad each error is
Two teams each decode the same sentence. You say, “the cat sat.” Team A shows “the hat sat.” Team B shows “the hat sat down.” Which one is more wrong? Most people say B, because it has an extra word. But how much more? We need a rule that gives each answer a number, and the same rule for every team.
The rule used in speech recognition for decades is the word error rate. The whole benchmark ranks teams by it, so we derive it carefully. The idea is simple: count the fewest word edits that turn the decoder’s text into the true text, then divide by the length of the true text.
An edit changes one word. There are three kinds. A substitution swaps one word for another (“cat” became “hat”). A deletion drops a word that should be there. An insertion adds a word that should not be there. Each edit costs 1. A word that matches costs 0.
Many edit lists can turn one text into the other. We want the cheapest. The cost of the cheapest list is the edit distance (also called the Levenshtein distance, after the scientist who defined it). It is found with a small table, as we show next.
For Team A, the edit list is one substitution. S = 1, D = 0, I = 0, N = 3. So WER = 1/3, or 33.3%. For Team B it is one substitution and one insertion. So WER = 2/3, or 66.7%. B is twice as wrong as A, by this score.
A short table finds the answer. Put the reference words down the side and the hypothesis words across the top. Cell (i, j) holds the edit distance between the first i reference words and the first j hypothesis words. The first row and first column count from 0, because turning nothing into j words takes j insertions. Every other cell comes from its three neighbors:
Work Team B’s sentence by hand. Reference: the cat sat. Hypothesis: the hat sat down. Fill the table row by row.
| (start) | the | hat | sat | down | |
|---|---|---|---|---|---|
| (start) | 0 | 1 | 2 | 3 | 4 |
| the | 1 | 0 | 1 | 2 | 3 |
| cat | 2 | 1 | 1 | 2 | 3 |
| sat | 3 | 2 | 2 | 1 | 2 |
Check one cell. Row “cat”, column “hat” has three options. Deletion gives D[1][2] + 1 = 2. Insertion gives D[2][1] + 1 = 2. Pairing “cat” with “hat” gives D[1][1] + 1 = 0 + 1 = 1, because the words differ. The minimum is 1. The bottom right cell is 2, the edit distance. Walk back through the cells that gave each minimum and you recover the edit list: match, substitute, match, insert.
Now try it yourself. The device runs this exact table on a six-word sentence. Click a word to damage it, and watch the score.
Each button is one word of the true sentence. Press it once to substitute it, twice to delete it, three times to restore it. The last button adds an extra word. The grid shows the table; the red path is the cheapest edit list.
The sentence and the damage are a toy. The table is the real edit distance algorithm, run in your browser. The score is the cheapest explanation of the damage, so two edits that cancel (a deletion beside an insertion) may be counted as one substitution.
The benchmark applies this to many sentences at once. A scoring script usually pools the whole test set: it adds up the edits from all 1,200 held-out sentences, then divides by the total number of true words. Take two sentences. One has 4 words and 1 error. The other has 16 words and 1 error. Pooled, the WER is 2/20 = 10%. Averaging the two sentence rates would give (25% + 6.25%) / 2, about 15.6%. The paper does not spell out its pooling, so treat this as the usual convention. It means long sentences weigh more than short ones.
The word error rate has three blind spots. First, it treats every word the same. Losing “a” costs as much as losing “water”, yet the paper stresses that a wrong key content word hurts the most. Second, it is not capped at 100%. A decoder that inserts many words can score above 100%. Third, it hides how the errors spread. Ten errors in one long sentence and ten errors in ten short sentences give the same score, but the second feels worse to the user.
The same recipe works at the sound level. Replace words with phonemes and you get the phoneme error rate (PER). The first-place team reports PER for its RNN, and TeamCyber reports it too. PER measures the neural decoder alone, before any language model. Chapter 1 gave a warning, and the numbers confirm it. A lower PER did not always give a lower WER.
Chapter 3
Learn how the RNN trains when nobody knows which instant of brain activity matches which sound
To teach the RNN, you need examples with answers. The person attempts the sentence “I want water.” You record 300 bins of brain activity. You know the sounds of the sentence: three or four phonemes. What you do not know is when each sound happened. The person makes no audible voice, so no microphone can tell you. Which bins belong to “w”? Which belong to “ao”?
You could ask a person to mark the timing by hand for thousands of sentences. That is too slow, and it would be a guess anyway. The baseline uses a trick from speech recognition instead: connectionist temporal classification, or CTC (Graves and colleagues, 2006). It lets the network learn the timing by itself.
CTC gives the network one more output class, the blank. It means “no new sound starts here”. In every bin the network says either a phoneme or a blank. The result is a string of T symbols, one per bin, called an alignment. It is much longer than the sentence’s phoneme list.
One rule turns an alignment back into a phoneme list. First merge any run of the same symbol into one. Then delete all blanks. So the alignment AA_B_ (A, A, blank, B, blank; we write the blank as an underscore) becomes A B. So does A__BB. The blank is also how a word with a double sound works: A, blank, A collapses to A A, because the blank stops the merge.
Many alignments collapse to the same list. That is the point. We do not choose one timing. We add up all of them.
The CTC loss is −log P(y | x). Training moves the network’s weights to make that probability bigger. The sum over alignments looks huge, but a dynamic program (the same kind of table as in Chapter 2) computes it in time proportional to T times the label length.
How does the computer add up so many alignments? It lays out the target with a blank between every phoneme and at both ends. The target A B becomes blank, A, blank, B, blank: five slots. Each bin sits in one slot. From one bin to the next, the path may stay in its slot, step to the next slot, or jump over a blank when the two phonemes around it differ. The sum over all such paths is filled in one pass over the bins, the same way as the table of Chapter 2. The device below runs this exact grid and reports the counts.
Take three bins and the target A B. Suppose in every bin the network gives A a probability of 0.5, B a probability of 0.3 and blank 0.2. Which alignments collapse to A B? There are five: AAB, ABB, A_B, _AB and AB_. Multiply down each one:
AAB: 0.5 × 0.5 × 0.3 = 0.075 ABB: 0.5 × 0.3 × 0.3 = 0.045 A_B: 0.5 × 0.2 × 0.3 = 0.030 _AB: 0.030 AB_: 0.030
Add them: P(y | x) = 0.075 + 0.045 + 0.030 + 0.030 + 0.030 = 0.21. The loss is −ln 0.21 = 1.56. No one told the network which bin was A. It learns from the sum.
Most bins in a sentence hold no new sound start, so blank is right most of the time. The network learns to say blank often. The fourth-place team saw this: “the trained models favor blank labels over phoneme labels”. In the device below you can see why this is natural. Fix the frame count and slide the blank probability. The chance of the target peaks at a high blank share when there are many more bins than sounds.
Pick a target and a number of bins. Press the cells to paint your own alignment and see if it collapses to the target. Slide the blank probability to move the dot on the curve.
A toy: in every bin the network gives blank the chosen probability and splits the rest equally among the target’s own phonemes. Real networks give different probabilities in each bin. The alignment counts come from the CTC dynamic program and are exact.
Slide to a low blank probability and the curve falls: the network must emit a sound in nearly every bin, and few such paths collapse to a short target. That tells you CTC models naturally learn mostly-blank outputs. The fourth-place team tried a regularizer from speech recognition called FastEmit that pushes the network to emit phonemes sooner. It did not lower the WER, but it was built to reduce latency (the delay before a sound is emitted), so the team left its timing effect as future work.
python # logp: [T, B, 41] log-probabilities from the RNN (blank = class 0) # targets: [B, L] phoneme ids, no blanks; L is far smaller than T loss = torch.nn.functional.ctc_loss( logp, targets, input_lengths=torch.full((B,), T), # bins per sentence target_lengths=target_lengths, # phonemes per sentence blank=0, zero_infinity=True)
Chapter 4
Turn a noisy string of phonemes into an English sentence by mixing what the brain said with what English allows
The RNN finishes and hands over a long grid of phoneme scores. Read the best phoneme in each bin and you get a string like “ay w aa n t w ao t er”. What did the person say? “I want water” fits. So does “I won’t water”. So does “I want a daughter”. The sounds alone do not settle it. English does: only one of these is a sentence anyone would say.
The second half of the baseline brings that knowledge in. This is where the baseline spends most of its effort, and it is what lets a decoder with a noisy first stage still reach 9.7%.
A language model gives any word sequence a probability. The oldest kind is the n-gram. It uses a simple idea: the next word depends mostly on the last few words. A 2-gram looks one word back. A 5-gram looks four words back.
You build one by counting. Read a huge pile of text. Suppose that after the word “want” the text has “water” 6 times, “walk” 2 times and “wine” 2 times. Out of 10 cases, P(water | want) = 6/10 = 0.6. Multiply such probabilities along a sentence and you score the whole sentence. A 5-gram does the same with four words of context. It is fast and can search millions of word paths.
It has a weakness. It sees only four words back. It cannot tell that a sentence three clauses long has lost its subject. That is the gap the second model fills.
The baseline uses the two models in order. Stage one is the 5-gram. It combines the phoneme scores with its own word counts and searches (a beam search, which keeps only the best partial sentences at each step) for many good candidate sentences. This gives a shortlist, called the n-best list. Stage two is the large language model. It reads each full candidate and gives it a probability, one token at a time. This is called rescoring. The baseline uses OPT, and TeamCyber names OPT6.7B, a 6.7-billion-parameter model.
The final pick combines two numbers per candidate: how well it matches the brain, and how fluent English it is. The standard way is a weighted sum of log probabilities:
A log probability is always negative or zero, and a higher (closer to zero) value is better. Working in logs turns the long product of probabilities into a sum. This sum form is the standard recipe in speech recognition. The paper does not print the weights its systems use, so the device below uses toy numbers.
Why not run the large model on every possible sentence? It is too slow. One pass of a model with billions of weights costs far more than a table lookup of word counts. The 5-gram can score millions of word paths cheaply, so it does the wide search. The large model sees only the best few, so it can afford a careful read. This split, a cheap model to propose and an expensive one to judge, shows up in many systems. The cost of the split is that the judge never sees a sentence the proposer dropped.
Take six candidates with toy scores. The brain-match scores are −4.0 for “I want water”, −3.5 for “I won’t water”, −5.2 for “I want a daughter”, and worse for three others. The English scores are −6.0, −9.5 and −8.0 for those same three. At λ = 0 only the brain votes, and “I won’t water” wins with −3.5. At λ = 1 the totals are −10.0, −13.0 and −13.2, and “I want water” wins. Move λ to the device and watch the winner change.
Each bar is the total cost of one candidate, the negative of its score. The shortest bar wins. Slide the weight. The sentence the person really meant is marked with a green dot.
All six scores are invented to show the effect; they are not from the paper. In the toy the right sentence wins from a weight of about 0.15 up to about 3.3. Below that the brain-only favorite wins; above it a fluent but unrelated sentence wins.
Look at both ends. With no weight, the sounds pick a close but wrong sentence. With too much weight, English picks “I want to go”, a very common sentence that the brain barely supports. That second failure is the one that matters for a speech BCI: a smooth, wrong sentence reads as if it were right. The paper’s LISA team met a cousin of it later, which we meet in Chapter 7.
python # cands: list of N candidate sentences from the 5-gram stage # brain: their phoneme-match log scores shape [N] ids = tok(cands, padding=True, return_tensors="pt") # [N, L] token ids logit = opt(**ids).logits # [N, L, vocab] lp = logit.log_softmax(-1).gather(-1, ids.input_ids[:, 1:, None]) # [N, L-1, 1] llm = (lp.squeeze(-1) * ids.attention_mask[:, 1:]).sum(1) # [N] best = cands[(brain + lam * llm).argmax()]
The model reads each candidate, and for each token asks how likely it was given the tokens before. It sums those log probabilities. This needs one forward pass per candidate, which is why rescoring runs on a short list and not on all sentences.
Chapter 5
See how a learning rate schedule, input masking and extra normalization moved the same network from 9.7% to 8.00%
You have a network that is a bit too slow at learning and a bit too eager to memorize. You cannot get more brain data, because each sentence costs a person real effort in the lab. What can you change? The fourth-place team, Linderman Lab, asked a plain question. Can we train the same RNN better?
They turned three knobs. Each knob is old and general, so each is worth knowing for any network. We take them one at a time.
Training adjusts the weights in many small steps. The learning rate is the size of each step. Think of walking down a hill toward a valley in thick fog. Big steps get you down fast. But near the bottom, big steps overshoot and bounce from side to side. Small steps settle in but are slow. A learning rate schedule uses big steps first and small steps later.
Why do big steps bounce? Each step uses a small batch of examples, and a batch gives a noisy hint about the true downhill direction. The noise shakes the weights around the bottom of the valley. The shaking is as large as the step size. Shrink the step and the shaking shrinks.
The team saw that the baseline loss “plateaus at around 7,500 iterations” of a 10,000-iteration run. So they cut the learning rate by a factor of 10 after iteration 7,500. This is a step-wise decay. The baseline instead used Adam (an optimizer that adapts the step for each weight) with a linear decay, which lowers the rate smoothly. The ablation (the test where you add one change at a time) trained three networks with different random seeds for each change. The step decay helped: the best model reached 9.095% WER.
The device below is a toy that shows the mechanism. It trains one weight on a noisy bowl-shaped loss, 400 times, and plots the average loss. Switch the schedule and see the floor move.
The thin lines are the learning rate (left axis, as a share of its start). The bold line is the average toy loss on a log scale. Pick a schedule.
The loss is a toy: one weight, loss w²/2, gradient noise of size 1, 1,000 steps, 400 averaged runs. It shows why a smaller step lowers the noise floor. It is not the paper’s loss. The paper’s step schedule divides by 10 after 7,500 of 10,000 iterations (Section 2.2). The linear schedule falls from 0.025 to 0.0005, which is 2% of its start, over 20,000 iterations (Section 2.3).
A network with many weights and few examples learns to overfit: it memorizes the training sentences and fails on new ones. Dropout fights this by hiding random parts of the input at every training step, so the network cannot rely on any one number. The team used a version called coordinated dropout, also called speckled masking. For each batch it blanks out random scattered entries of the input table [T, F], like speckles of paint. The network must then recover the answer from the rest. In the later model, the masking probability was 0.3, so 30% of entries were hidden. It also appeared to improve WER in the ablation.
Chapter 3 ended with the blank problem. The team added the FastEmit regularization, which rewards emitting phonemes sooner. It did not improve WER. The authors note it was designed to cut latency, so a future test could check whether phoneme timing moved. This is a fair negative result: it is in the paper, with the three seeds shown.
Step decay, FastEmit and speckled masking together made the team’s competition entry. It reached 9.22% WER, a small gain on the baseline’s 9.7%. After the contest the team added a stack after the RNN: layer normalization (which rescales each layer’s numbers to a steady range, helping training), dropout, a linear layer and a nonlinear activation. With a linear decay from 0.025 to 0.0005 over 20,000 iterations and masking at 0.3, the same family reached 8.00%. No new architecture was involved, only better training and a small head.
The second-place team, TeamCyber, tried another route: a simpler optimizer. They trained with SGD with momentum (plain gradient steps plus a running average of past steps), with and without a variant called Nesterov momentum. They used step decay from a learning rate of 0.1, dividing by 10 every 4,000 steps for one model and after 5,000 steps for the other. These two models got 8.89% and 9.16% WER on the held-out data. The team is careful about the lesson: Adam can match SGD if you tune all of its settings, but when compute is limited a simpler optimizer with fewer settings may work well.
A last note on why tuning pays here. The data are small. A reliable training recipe is worth more than a bigger model, because a bigger model has more to overfit with. Chapter 8 returns to this point.
python # one training step with the three knobs (shapes: x [B, T, F]) mask = (torch.rand_like(x) > 0.3).float() # speckled masking: hide ~30% of entries logp = model(x * mask).log_softmax(-1) # [B, T, 41] loss = ctc_loss(logp.transpose(0, 1), y, T_len, y_len) loss.backward(); opt.step(); sched.step() # sched lowers the step size over time
Chapter 6
Predict transitions between sounds instead of single sounds, then sum out the sound before to get back to phonemes
Say “ah-dah” and then “ee-dee”, slowly, and watch your tongue. In both words you end on a “d”, with the tongue tip touching the ridge behind your teeth. But the tongue arrives from different places. After “ah” it is low and back. After “ee” it is high and forward. The motor cortex plans movements, not letters, so its activity for “d” changes with the sound that came before.
The first-place team built their decoder on this fact. Their group, from the University of Washington, is called DCoND, for Divide-Conquer-Neural-Decoder. The paper gives their reasoning in one line: neural signals “that produce movements from ‘AA’ to ‘D’ can differ from signals generating transitions from ‘IY’ to ‘D’”.
The baseline RNN labels every bin with one of 40 phonemes (plus the CTC blank). That treats the “d” after “ah” and the “d” after “ee” as one thing. The network must learn one pattern for “d” that covers both. If the brain's patterns differ, that single box is a blur of several shapes, and the network spends effort learning to ignore the difference.
The fix is to give the network a finer target. A diphone is a pair: the previous phoneme and the current one, such as AA→D. With 40 phonemes there are 40 × 40 = 1,600 possible pairs, which the paper calls “approximately 1,600 classes”, 40 times more than before. More classes means more things to tell apart, and each class has fewer training examples. That is the cost.
The team's trick keeps the cost low. In the divide step, each phoneme-recognition problem splits into 40 smaller ones, one for each possible previous phoneme. The model predicts the likelihood of every possible transition. In the conquer step, the model gets back to plain phonemes by marginalizing over the previous phoneme. To marginalize means to add up a probability over all values of a variable you do not care about. Here, add over the previous phoneme.
Work it with three phonemes to see the numbers. Suppose in one bin the network gives P(AA→D) = 0.50, P(IY→D) = 0.20, P(AA→T) = 0.10, P(IY→T) = 0.05, and the other pairs share the remaining 0.15. Then P(D) = 0.50 + 0.20 = 0.70. P(T) = 0.10 + 0.05 = 0.15. The network was unsure where “d” came from, but sure it was “d”. The sum keeps the sure part and drops the unsure part.
The grid has the sound before down the side and the current sound across the top. The bars on the right are the column sums. Choose what the signal looks like, then slide the certainty.
A toy: five phonemes instead of 40, and made-up scores for each pair, turned into probabilities by a softmax over all 25 cells. The 1,600 classes and the marginalization are the paper’s (Section 5.1). How the blank class and the training loss fit in is described in the DCoND paper, arXiv 2411.10657, which this lesson does not reproduce.
Slide the certainty low. All 25 cells go to similar values, and every column sum drifts to 20%: the network knows nothing. Slide it high on the second scene. The grid splits between AA→D and IY→D, but the D bar stays high, since both feed the same column. That is the benefit: the network may be unsure about context and still be sure about the phoneme.
Why does the sum rescue the idea? With 1,600 classes, rare pairs such as an unusual sound followed by another unusual sound appear in very few training sentences. A network trained only on pairs would learn those classes badly. But all 1,600 outputs come from the same hidden state, so common pairs teach the shared weights, and the sum ties every pair back to one of 40 sounds. This reading is ours; the paper reports the gain and leaves the full analysis to the DCoND report.
Note what stays fixed. The rest of the pipeline never learns that diphones exist. It receives 40 phoneme scores per bin, as before, so the 5-gram and the language model need no change at all.
python # h: RNN hidden state [B, T, H] joint = linear(h) # [B, T, 1600] one score per pair logp = joint.log_softmax(-1).view(B, T, 40, 40) # [B, T, prev, cur] phone = torch.logsumexp(logp, dim=2) # [B, T, 40] sum out prev # phone replaces the baseline's 40 phoneme logits downstream
The sum is done in log space with logsumexp, which adds probabilities without leaving the log scale. The rest of the pipeline stays as it was. Only the head of the network changed.
What did it gain? The phoneme error rate fell from 16.62% to 15.34%. Through the same first two language model steps, a single DCoND network reached a WER of about 8.09%. That is below the baseline’s 9.7% before any ensembling. The paper says the result suggests the network “learns representations more consistent with neural coding strategies”. That is the authors' reading. The paper's own ablations are in the DCoND report.
Chapter 7
Run many decoders, ask a language model to merge their sentences, and see why this gave the largest gain of the contest
Ten people read the same blurry road sign. Each squints and writes down what they think it says. Nine write “Main Street”. One writes “Mail Street”. You do not need a better pair of eyes. You need a way to combine the ten answers. The odd one out is probably wrong.
The paper says this is the largest single gain of the whole contest: “an ensemble of neural decoders to generate a diverse set of sentence hypotheses, and then using a fine-tuned large language model to merge these hypotheses into a finalized sentence”. All three top entries used a version of it. Benster and colleagues introduced it first (the LISA entry, third place), and the idea “quickly inspired other entries”.
Train the same network ten times with different random starting weights (different seeds). The ten networks reach about the same accuracy, but they do not make the same mistakes. LISA reports that each seed had a similar word error rate, near 14.6% on average on the test partition after beam search. A set of such networks is an ensemble. Each one is a different noisy reader of the same brain signal.
If their mistakes were fully independent, a vote would fix almost everything. If their mistakes were identical, a vote would fix nothing. Real life is in between, because every network sees the same brain data, and a word the data blurs will fool them all. Use the device to find where ten decoders sit between those poles.
The curve is the error rate after a vote among K decoders. The teal dot is your K. Slide the overlap from independent errors (0%) to identical errors (100%).
A toy vote, not the paper’s method. A single decoder starts at 8.09%, the paper’s figure for one DCoND network (Section 5.2). A share of its errors is the same wrong word in every decoder; the rest are independent, with different wrong words. The vote takes the most common word, with ties broken at random. The paper’s system merges with a language model, which can do more than vote.
At 0% shared errors, ten decoders drive the toy WER close to zero. At 100%, nothing changes. In between, the vote removes only the unshared part. In the toy, ten voting decoders would match the paper’s 5.77% only if about 71% of a single decoder’s errors were shared. That tells us the errors are highly correlated, and it explains why a smarter merge helps. A language model sees more than the votes.
The winning team, DCoND-LIFT, ran each of ten RNN decoders through the baseline's two language model steps, the 5-gram and OPT. That gave ten candidate sentences. Then a fine-tuned GPT-3.5 merged them into one. Fine-tuning means training an existing model a bit more on examples of your own task, here pairs of candidate lists and the right sentence.
The paper stresses one difference from LISA. The merge model gets the ten sentences and the decoded phonemes. The sentences have passed through the 5-gram and OPT, which may have introduced errors of their own. The phonemes are closer to the brain signal. With both in view, the merge model can fix an error the earlier steps made. The prompt has this shape (the exact wording is not in the paper):
illustrative prompt
Phonemes: ay w aa n t w aa t er
Candidates:
1. I want water 6. I won't water
2. I want water 7. I want water
3. I want a daughter 8. I want water
4. I want water 9. eye want water
5. I want water 10. I want water
Answer with the most likely true sentence.
---
I want water
The numbers show what the merge adds. One DCoND network through the two baseline steps: 8.09%. Merge with a fine-tuned GPT-3.5 (DCoND-LIFT): 5.77%. Merge with GPT-3.5 given only examples in its prompt, with no fine-tuning (DCoND-LI, for in-context learning): 7.29%. Fine-tuning is clearly worth it, but even in-context learning helped.
The other two top entries show the same pattern with smaller ensembles. TeamCyber trained just two decoders. Each decoder's text came from the 5-gram and OPT6.7B. A separate chat model, Llama2-7b-chat, then scored the two sentences and picked the better. Singly the decoders got 8.89% and 9.16%. Together they got 8.26%. With only two voters a plain vote cannot break a tie, so a language model as the judge is a natural choice (the toy above shows two voters gain nothing from a coin flip). The authors report that if only one of the two sentences was right, the chat model often chose it. If neither was right, it often picked the one with fewer word errors. They found chat-tuned models particularly good at this.
LISA used ten seeds of the baseline network. Without fine-tuning, merging the ten top beams scored 13.7%, down from about 14.6% per seed. With fine-tuning it reached 8.9% on the competition partition, the first entry to beat the baseline. Take care: the paper gives the 14.6% on the test partition and the 8.9% on the competition partition, and it does not name a partition for the 13.7%, so do not subtract these numbers from one another.
Symptom: the merged output sometimes scored worse than the candidates. Measurement: LISA found that “undesired preambles and hallucinations were the largest drivers of WER”. An LLM that starts with “Here is the corrected transcript:” adds four wrong words to every sentence. Fix: first, change the prompt to ask the model to choose the most accurate transcript, which improved compliance without losing its power to write a new sentence when no candidate was right. Second, fine-tune, which “further eliminated these sources of errors”. Remember this when you wire any LLM into a scored pipeline: the format of its answer is part of the score.
Chapter 8
Weigh the failed attempts with Mamba, transformers and convolutions, and the limits the organizers name for the whole approach
It is 2024. Transformers write essays, pass exams and run chat assistants. State space models such as Mamba are the newest rivals, and they read long sequences cheaply. A neural decoder reads a long sequence too: hundreds of time bins. So the obvious plan for every team was to swap the old RNN for a modern architecture. Several teams tried. The paper reports what happened, and it is the most surprising part of the report.
One line in the discussion sums it up: “One surprise was the difficulty entrants encountered when trying to improve upon the RNN architecture”.
Mamba is a deep state space model (SSM), a network that carries a compact running summary of the past and updates it as each new input arrives, much like an RNN but built to train fast and to remember far back. The Linderman Lab team built a version that reads the sequence both forward and backward, and dropped it in where the GRUs had been. They searched over the number of layers, the size of the state and the learning rate schedule.
The best Mamba model matched the RNN on validation CTC loss and on phoneme error rate. But the final word error rate was 11.05%, which the team describes as 1.5% behind the RNN baseline. The phoneme score said the models were equal. The word score said they were not. This is the dissociation from Chapter 1 once more.
The team gave three possible reasons, and labeled them as guesses. First, speech decoding may not need much long-range memory. Second, the RNN gets its input stacked across a window of recent bins. That stacking already gives the network direct paths to the recent past, so a model built to find far links has less to add. Third, Mamba may need changes to filter out neural fluctuations that carry no speech information.
TeamCyber tried a one-dimensional convolutional network, including a temporal convolutional network (TCN), either in front of the RNN or in place of it. A convolution slides a small filter along the time axis, so each output sees only a short stretch of input. Some models with a convolutional front end reached a phoneme error rate near 15% on validation data. But their word error rate was higher than the baseline’s once the 5-gram and OPT6.7B ran. The team drew two lessons: the baseline RNN is “quite powerful”, and minimizing PER need not minimize WER.
Transformers, in the abstract’s words, were “not yet appearing to offer a benefit over the RNN baseline”. The paper does not give a transformer table. It reports the absence of a gain from several entrants.
The authors offer two ideas. Neither is proven. The first is time. The RNN design and its training have been tuned for years on this very task, so a new design starts behind. The second is about the shape of the problem. The neural activity for a phoneme is probably local in time: it sits near that phoneme and does not spread across the whole sentence. An RNN has that prior built in. It handles short stretches well. Models made for long-range links, like Mamba and transformers, have more freedom than they need, and with small data that freedom is a cost.
Data size is the heart of it. The benchmark holds 10,000 sentences. Transformers, say the authors, have “historically been applied to very large datasets in order to reach their optimal performance”. If the data grows tenfold, which they think is feasible (“at least 100,000 sentences” in the near term), the comparison may tip the other way.
See the whole contest in one view. The device below puts every WER the paper reports on one axis, sorted, and lets you filter by what kind of change produced it.
Each bar is a score reported in the paper. The dashed line is the 9.7% baseline. Pick a kind of change to light up its bars.
Scores from Sections 2 to 5 of the paper. The 8.00% model was built after the competition closed. LISA’s 8.9% is on the competition partition. The two TeamCyber singles are its two models before merging. Results come from different teams, seeds and setups, so the gaps show direction, not a controlled comparison.
The organizers name one limit and three reasons for hope. The limit: the baseline is two-stage: a neural decoder, then a language model. The two cannot train together, so improving one does not always improve the whole. Hence the repeated cases where lower PER did not give lower WER. The remedy they point to is a single network that does both jobs. The reasons for hope: more data (the benchmark holds 10,000 sentences, and they think at least 100,000 are feasible), better language models, and tweaks that let modern architectures work on neural data.
Add two honest limits of your own when you read the numbers. The scores come from different teams with different tuning budgets. And the benchmark measures text accuracy only, not the speed at which a person can use the device. Chapter 9 turns these into a checklist.
Chapter 9
Keep the numbers, the terms, a checklist and the core code on one page, and find where to read next
The contest took a published speech-BCI decoder (an RNN that outputs phoneme scores, a 5-gram, and an LLM rescorer) at 9.7% word error rate. Four teams improved it. Better training and a diphone output head gave small steps. Running several decoders and merging their sentences with a fine-tuned LLM gave the big one, 5.77%. New architectures such as Mamba did not help yet. The organizers expect more data and end-to-end models to change that.
| Quantity | Value | Where in the paper |
|---|---|---|
| Baseline WER | 9.7% | Section 1 |
| 1st, DCoND-LIFT | 5.77% (5.8% rounded) | Sections 1 and 5.2 |
| 2nd, TeamCyber | 8.26% (singles 8.89% and 9.16%) | Section 4.2 |
| 3rd, LISA | 8.9% on the competition partition; about 14.6% per seed and 13.7% for ten merged beams on the test partition (the paper names no partition for the 13.7%) | Section 3 |
| 4th, Linderman Lab | 9.22% in the contest; 8.00% after it | Sections 2.2 and 2.3 |
| Deep SSM (Mamba) | 11.05% | Section 2 |
| One DCoND network | about 8.09%; in-context merge 7.29% | Section 5.2 |
| Phoneme error rate, monophone to diphone | 16.62% to 15.34% | Section 5.1 |
| Classes | 40 phonemes; about 1,600 diphones | Section 5.1 |
| Data | 10,000 sentences; 1,200 held-out sentences scored; contest ended 1 June 2024 | Sections 1 and 6 |
| Step decay | divide by 10 after 7,500 of 10,000 iterations | Section 2.2 |
| Late recipe | linear 0.025 to 0.0005 over 20,000 iterations; mask probability 0.3 | Section 2.3 |
| SGD recipe | start 0.1, divide by 10 every 4,000 steps (or after 5,000) | Section 4.1 |
| Term | Plain meaning |
|---|---|
| Word error rate (WER) | (substitutions + deletions + insertions) divided by the words in the true sentence. |
| Phoneme error rate (PER) | The same score on sounds. It measures the neural decoder alone. |
| CTC and blank | A loss that sums over all timings; the blank means no new sound starts in this bin. |
| 5-gram | A word-count language model that looks four words back. |
| Rescoring | Re-ranking a shortlist of sentences with a stronger language model. |
| Diphone | A pair: the previous phoneme and the current one. |
| Marginalize | Add up probabilities over a variable you do not need. |
| Ensemble | Several models of the same kind, each run on its own, then combined. |
| Fine-tuning vs in-context | More training on your examples, versus examples placed in the prompt with no training. |
| Speckled masking | Hiding scattered entries of the input in each batch to prevent overfitting. |
python # A DCoND-LIFT-style pipeline, as the paper describes it. Shapes: x [T, F], K = 10. def decode(x, rnns, ngram, opt, merger): cands, phones = [], [] for rnn in rnns: # K independent networks joint = rnn(x).log_softmax(-1).view(T, 40, 40) # diphone scores [T, prev, cur] logp = joint.logsumexp(dim=1) # sum out prev -> [T, 40] nbest = ngram.search(logp) # 5-gram shortlist best = max(nbest, key=lambda s: s.brain + lam * opt.logprob(s.text)) # OPT rescoring cands.append(best.text); phones.append(logp.argmax(-1)) prompt = format(cands, phones) # 10 sentences + decoded phonemes return merger(prompt) # fine-tuned GPT-3.5 -> 1 sentence # score: WER = edit_distance(ref_words, hyp_words) / len(ref_words)
This report is a snapshot of one year of a living benchmark. It sits between the original speech neuroprosthesis work and the newer systems that try to merge the decoder and the language model. Read it with the lecture Measuring a BCI, which asks how a field should score a device.
Credit. “Brain-to-Text Benchmark ’24: Lessons Learned”, arXiv 2412.17227 (arxiv.org/abs/2412.17227). Organizers: Francis R. Willett and Jaimie M. Henderson (Stanford). Entries: Jingyuan Li, Trung Le, Chaofei Fan, Mingfei Chen and Eli Shlizerman (1st); Yue Chen, Xin Zheng and Tatsuo S. Okubo (2nd); Tyler Benster (3rd); Hyun Dong Lee, Maxwell Kounga, E. Kelly Buchanan, David Zoltowski and Scott W. Linderman (4th). Related reports cited in the paper: the DCoND method (arXiv 2411.10657) and the LISA method (arXiv 2403.05583). Everything here is re-taught in our own words; the toy devices are ours.
Now press Present or Teach and explain the pipeline out loud, from memory: the five stages, how WER is counted, why CTC needs a blank, what a diphone buys, and why ten decoders plus a fine-tuned LLM won. Then go back to the entries at the top and pick the winner once more.