Skip to content

Brain2Qwerty decoded typed sentences from MEG in 19 healthy native Spanish speakers at an average 29% character error rate

A volunteer seated with his head inside the helmet of a magnetoencephalography scanner, with a display screen in front of him
A volunteer in a magnetoencephalography (MEG) scanner at the National Institute of Mental Health in the United States, cropped from the original. The photo is not from the Brain2Qwerty study. Credit: National Institute of Mental Health, public domain, via Wikimedia Commons.

Brain2Qwerty, a model that reconstructs typed text from brain recordings made while people type on a keyboard, decoded sentences healthy volunteers typed from memory. On recordings made with magnetoencephalography, or MEG, it averaged a character error rate of 29 percent, according to a paper published in Nature Neuroscience on 29 June 2026. That is the number of edits needed per 100 characters of the target sentence. MEG detects the magnetic fields brain cells generate, with sensors placed around the head, the Methods state.

Character error rate counts the smallest number of single-character edits, substitutions, deletions and additions, needed to turn the decoded text into the target sentence, divided by sentence length. Zero means an exact match.

The model is a deep learning network trained to decode text from these signals. The brain activity was recorded with sensors placed outside the skull, which is what the paper calls a noninvasive method. According to the Methods, the volunteers typed on a real keyboard hidden under a cardboard box, and the model worked from half-second windows of signal cut around known key press times.

Jarod Lévy of Meta AI in Paris designed the model and the principal codebase, the author contributions state. Five of the seven authors are employed by Meta, the competing interests statement says.

The same model trained on electroencephalography, or EEG, which records electrical voltages at the scalp, averaged a character error rate of 65 percent, the Results report. MEG has a higher signal-to-noise ratio than EEG, meaning more brain signal against background noise, the introduction notes. In the Discussion the authors call the gap between those two rates substantial.

Thirty-five healthy adults took part, recruited at the Basque Center on Cognition, Brain and Language in San Sebastian, Spain. All were native Spanish speakers, right-handed and skilled typists, taken on only if their typing accuracy reached 80 percent. Their average age was 31.6 years and 77 percent were women, the Methods record.

Twenty were recorded with EEG and twenty with MEG, the introduction reports, and five did both, which is how the groups come to 35, according to the Methods. One MEG participant was excluded because of a metallic component present during the recording, so the MEG analyses rest on 19. Recording ran for roughly an hour per person with each method, the same section states.

The motivation set out in the introduction is clinical. A brain-computer interface records brain activity and converts it into computer output, such as text. Patients who had lost the ability to speak have produced full sentences through a neuroprosthesis, an implanted device that records and decodes neural activity from motor regions in the brain, the paper says.

Implanting those devices exposes patients to risks of brain haemorrhage and infection, the authors wrote. A noninvasive system would avoid the surgery. Such systems usually rely on scalp EEG, whose limited signal-to-noise ratio requires users to perform complex tasks, and decoding performance stays moderate, they add.

What the paper leaves open is whether decoding like this can carry over from healthy people making real movements to paralysed patients imagining or attempting them, with sensors outside the skull.

I think the real error rate cuts through the mind-reading hype around work like this. What I would carry away is the 29 percent average with MEG, on short sentences people typed with their fingers.

Each trial had three steps, the Methods say. A sentence appeared on screen one word at a time, then a fixation cross, a mark for the eyes to rest on, held for 1.5 seconds. Its disappearance cued typing from memory, with no letters shown on screen.

Standard keyboards contain electronic and metallic parts that generate artefacts in MEG, meaning unwanted signals, so the team used a custom keyboard in the standard QWERTY layout, with the standard metallic springs replaced by nonferromagnetic silver-spring mechanisms, the Methods state. Participants were told to type as accurately as possible without using backspaces to correct errors, according to the same section. All the words were presented in uppercase, and participants were instructed to think of writing in uppercase and without accents.

Each session used 128 unique Spanish sentences of five to eight words, all declarative, meaning each made a plain statement. Across participants that came to about 5,000 sentences and 193,000 characters for MEG, and 4,000 sentences and 146,000 characters for EEG, the paper reports.

The model has three stages, set out in the Methods. A convolutional module, the part of the network that scans the signal for local patterns, takes a half-second window of brain activity around every key press, from 0.2 seconds before to 0.3 seconds after.

A transformer module then takes the convolutional stage's outputs for a whole sentence and uses that context to refine the prediction for each character, the architecture description says. Its output passes to a pretrained character-level language model, trained on Spanish Wikipedia to predict the next character from the previous nine, which corrects those predictions.

To check the design, the authors retrained the convolutional module on its own, and then with the transformer. Adding the transformer improved character error rate for both methods, and the language model improved it again, they reported.

The 29 percent is an average across people. The best MEG participant reached 18 percent and the worst 47 percent, while the best EEG participant managed 61 percent, the Results report. Several sentences held out of the training data were decoded perfectly from MEG.

In one example the paper gives, the target sentence EL BENEFICIO SUPERA LOS RIESGOS came out of the model exactly, even though the participant had typed EK BENEFUCUI SYOERA KIS RUESGIS. The language model corrected those typing errors.

Because of those corrections, the analyses of word type and frequency, character frequency and training data used MEG predictions from the convolutional module and transformer, before language correction, the paper states. The comparison of correctly and incorrectly typed characters used those outputs and was repeated on the convolutional module alone, whose learned representations also fed the keyboard clustering analysis.

In the MEG analyses, the decoder's mistakes fell most often on keys physically close to the target letter, the authors reported. Sorting those representations into two groups by similarity separated left-hand keys from right-hand ones, which they said shows the keyboard layout is encoded in what the model learned. The authors read these errors as a sign that the decoder "primarily relies on motor representations", meaning activity tied to the movements that produced the keystrokes.

The paper also reports behavioural measurements from the MEG participants. Typing errors appeared in 65 percent of their sentences, and the mean interval before a correctly typed keystroke was 49 milliseconds, against 111 milliseconds before a mistyped one, the Results report.

On the convolutional and transformer output, before language correction, decoding was worse for mistyped characters, 69 percent error against 36 percent for correctly typed ones. The same comparison on the convolutional module alone gave 72 percent against 49 percent, the authors reported.

The authors say the gap between correct and mistyped keystrokes confirms that the decoded signal is degraded during behavioural errors. They also say it can be interpreted in several ways, and that the current protocol cannot definitively isolate execution precision from cognitive intent.

Performance was linked to the amount of training data. Error fell as the training set grew, a correlation of minus 0.93 across 20 differently sized subsets, the paper reports. The paper did not show decoding of z, k and w above its chance baseline, a model that always predicts the most frequent character, though each makes up less than 0.1 percent of the characters in these sentences.

The task was physical typing. Participants pressed real keys with their fingers, from sentences they had just memorised, and imagined or attempted speech was not tested. The authors call the move to paralysed patients using motor imagery, meaning imagining a movement without making it, or attempted movement, meaning trying to make a movement the body cannot carry out, a necessary next step not yet validated with noninvasive signals.

The system also does not run in real time. The transformer and the language model both work at sentence level, so the trial must finish before an output appears. The MEG segments must also be aligned to keystroke onsets, the moments keys were pressed. The path to continuous decoding without those triggers remains uncertain, the Discussion says.

The MEG recordings used a MEGIN laboratory scanner with 306 channels, 102 magnetometers and 204 planar gradiometers, the Methods state. The authors point to new MEG sensors based on optically pumped magnetometers, a type of magnetic field detector, which they say "might someday offer the sensitivity of MEG in a wearable form".

They call the study a proof-of-concept, meaning a demonstration that the method can work rather than a finished system, "designed to efficiently test the capabilities and limits of noninvasive decoding before deploying better-suited approaches".

The model code is published as supplementary information with the paper. The underlying dataset is not. It goes to academic researchers on request, because of legal constraints, the availability statement says.

In the Discussion the authors say their results narrow the gap between invasive and noninvasive methods, and that the gap "remains significant". The same section cites an implanted speech device evaluated on a dataset of 372 unique words, comparable in size to the vocabulary here, where it reached a character error rate of 15.2 percent at 79 words per minute. Those electrodes sat inside the brain.

Sources

From around the web