People with ALS, locked-in syndrome, or anarthria lose the ability to speak or move — but their brains keep generating language. Invasive brain-computer interfaces (BCIs) have restored communication for some patients, at the cost of neurosurgery, infection risk, and long-term implant maintenance. For years, non-invasive alternatives have lagged far behind.
On June 25, 2026, Meta FAIR published Brain2Qwerty v2, a model that decodes full typed sentences solely from magnetoencephalography (MEG) signals — no implants, no surgery. The average word error rate across 9 participants: 39%. The best participant: 22% WER, with 47% of sentences decoded within one word of the target.
That is not perfect. But it is the first time non-invasive brain-to-text decoding has operated anywhere near the accuracy range once thought exclusive to surgical implants.
Invasive BCIs — electrodes implanted directly over the motor cortex — pick up clean, high-resolution neural signals. They have restored typed communication at near-natural rates for patients with ALS and locked-in syndrome. The catch: neurosurgery carries real risks (infection, inflammation, signal degradation over months). Scaling this to millions of patients is practically impossible.
Non-invasive alternatives like EEG suffer from poor signal-to-noise ratio. MEG offers better temporal resolution, but until Brain2Qwerty, decoding full sentences from it was considered too hard. The v1 paper (Lévy et al., 2025) achieved 32% character error rate (CER) — but it required knowing the exact timing of each keystroke in advance, making real-time use impossible.
Brain2Qwerty v2 removes all of these constraints at once.
How Brain2Qwerty v2 Works
The pipeline has three jointly trained components, each handling a different level of linguistic abstraction.
1. The Encoder: Asynchronous Character Decoding via CTC
The Encoder takes a continuous MEG window — no keystroke timing required — and outputs a sequence of character predictions. It uses a BrainModule (convolutional feature extractor + subject-specific spatial merging) followed by a 4-layer Conformer, trained with a Connectionist Temporal Classification (CTC) objective.
The key insight: asynchronous CTC decoding previously underperformed synchronous (keystroke-locked) decoding on small datasets. With 10× more data per subject (10 hours vs. 1 hour in v1), the gap collapsed to just 2%. Data scale unlocked asynchronous decoding.
Performance scales log-linearly with training data volume (Pearson r = −0.99 between log₁₀(hours) and CER). The scaling curve shows no saturation at 90 hours of pooled data — meaning more recording time is a direct path to better performance.
2. The Aligner: Bridging Brain Signals to Language Models
Raw MEG embeddings cannot be fed directly into an LLM. The Aligner uses a SigLIP contrastive loss to learn word-level alignment between the Encoder's MEG embeddings and the LLM's word embedding space.
The team's CTC Tokenizer segments the continuous MEG stream into word-like chunks wherever the CTC path predicts a space character. Since spaces are frequent (19% of characters) and robustly predicted, 86% of sentences have their word count estimated within ±1 word of the ground truth. This is far more accurate than fixed-patch tokenization or single-sentence embeddings — and it's what enables the LLM to read MEG as structured token input.
3. The LLM: Qwen3-4B Fine-Tuned With LoRA Per Subject
The final stage is a Qwen3-4B language model, fine-tuned with LoRA (Low-Rank Adaptation) using a technique called Model Soup. Rather than training one joint adapter on all 9 subjects, the team trained a separate LoRA adapter per subject, then averaged the weights uniformly. This single averaged adapter outperformed both per-subject adapters and a jointly trained adapter as LLM size scaled from 0.6B → 1.7B → 4B parameters.
The LLM receives: CTC: [character predictions]\nMEG: [word embeddings]\nOutput: — and autoregressively generates the decoded sentence. Ablating the MEG tokens (leaving only CTC text) degrades WER by 5.6 points — confirming the LLM is actively reading neural signal, not just correcting character-level noise.
Auto Research: Claude Opus 4.6 Agents Improved the Pipeline
One of the most striking elements of Brain2Qwerty v2 is the use of autonomous AI coding agents to optimize the training pipeline — a technique the authors call Auto Research, inspired by Karpathy's autoresearch project.
Three independent agents (Cursor, powered by Claude Opus 4.6) each ran 10 rounds of 50 SLURM jobs, starting from a deliberately minimal configuration with only 4 exposed hyperparameters: learning rate, weight decay, LoRA rank, and batch size. Each agent had full filesystem and terminal access to a dedicated git worktree.
The results:
Optuna (classical Bayesian optimization): 8.6% relative WER improvement on the target subject. Gains did not hold across all 9 subjects.
AutoResearch Agent 1: 16% relative improvement, held on all 9 subjects (p < 10⁻⁶)
AutoResearch Agent 2: 10% relative improvement
AutoResearch Agent 3: 12.7% relative improvement
All three agents independently discovered the same core improvements:
Modality dropout (drop CTC tokens during training, forcing LLM to rely on MEG tokens)
Beam search decoding (beam size 16 at inference)
Contrastive sentence-level loss (auxiliary CLIP-style loss)
Minimal prompts (short CTC:, MEG:, Output: instead of verbose instructions)
This is the same pattern we are starting to see across AI research: human researchers define the search space and constraints, then AI agents discover optimal configurations within it. What Auto Research could not do: start from v1 and recreate v2 from scratch. When given an open-ended objective with no architecture constraints, agents produced broken jobs and stalled. Human-defined structure remains essential.
Why Sentence Diversity Matters as Much as Data Volume
The team ran a controlled experiment: 128 unique sentences × 2 repetitions versus 256 unique sentences × 1 repetition (matched total sentence count, matched subjects). Unique-sentence training achieved significantly lower CER than repeated-sentence training (0.45 vs. 0.65, p < 0.001).
The takeaway: diversity is an independent axis of data quality. More repetitions of the same sentences do not substitute for more varied sentences. This has direct implications for future data collection protocols — and parallels debates in LLM pre-training about data diversity vs. volume.
Joint Training on Multiple Subjects Is Critical
Three training regimes were compared:
Regime
Best Subject WER
Median Subject WER
Per-subject only
38.3%
66.5%
Leave-one-out + finetune
32.8%
58.6%
Joint training (all subjects)
22.6%
47.8%
Joint training provides the biggest gains, but the LOO + finetune result matters most for clinical deployment: you can pretrain on existing subjects, then fine-tune on a new patient with the Conformer frozen — and recover most of the performance without a full retrain. This is the path toward adapting non-invasive BCIs to patients who cannot generate labeled training data the same way healthy volunteers can.
Sensor Count Ablation: 150 Sensors Gets You Most of the Way
The 306-channel cryogenic MEG system used in this study is large, expensive, and requires magnetic shielding. Optically pumped MEG (OPM) devices are emerging alternatives — wearable, room-temperature, typically 50–150 sensors.
The team ran sensor subsampling ablations:
Sensors
WER Change vs. Full Array
230 sensors (75%)
+3.4 pp
153 sensors (50%)
+5.7 pp total
76 sensors (25%)
+11.4 pp total
An OPM-class helmet with ~150 sensors loses only ~5.7 WER points versus the 306-channel baseline — suggesting that once the pipeline matures, portable non-invasive decoding is within reach.
What the LLM Gets Right (and Gets Wrong)
Brain2Qwerty v2 produces either near-perfect output or coherent but incorrect sentences — a qualitatively different failure mode than the character-level N-gram model.
For the best subject, 28% of test sentences are decoded perfectly and 47% within one word error. For the worst subject: 4% perfect, but errors are still grammatical ("my homework is due tomorrow" instead of "cars are not allowed on this road").
The N-gram model produces lower CER — it makes smaller local corrections — but generates lexically incoherent output ("WAS THE DISH THAT YOU NIGHTY IN THE LP BUT"). Brain2Qwerty v2 generates sentences that are wrong in a human-like way, not a character-soup way. For actual communication, that is the right trade-off.
Limitations Worth Knowing
The medical AI landscape is expanding rapidly — from AI-generated imaging in clinical contexts to non-invasive brain decoding. Each wave surfaces its own set of safety questions that researchers and regulators have yet to fully resolve.
Not real-time: The current architecture processes a full sentence at once. Real-time streaming is a future research direction.
Healthy volunteers only: All 9 participants are healthy, right-handed, proficient typists. Adapting to ALS patients — who cannot generate labeled keystroke data in the same way — is the critical open problem.
Inter-subject variability is large: N-gram CER ranges from 17.1% (best) to 41.0% (worst) across subjects. Subject-level consistency is still a challenge.
MEG is not portable (yet): The Megin 306-channel system requires a shielded room. OPM devices are improving but not yet at this scale.
Connection to Meta's Broader Open Source AI Work
Brain2Qwerty v2 used Llama 4 to generate the 20,000-sentence training stimulus pool — selected from a filtered, contraction-free subset. The training code is open at github.com/facebookresearch/brain2qwerty, covering both v1 and v2 pipelines. The BCBL Spanish dataset (v1) is also being released.
This is consistent with Meta's research philosophy: publish the method, release the code, enable the community to extend it. For background on Meta's open-source AI strategy, see our Meta Llama 4 guide. The same open science ethos is emerging in AI-assisted biology — see Biohub's Virtual Biology Initiative for a parallel bet on open multimodal data for medicine.
On the memory and context side, the use of an LLM to maintain sentence-level semantic coherence in the decoder parallels what Perplexity is doing with persistent memory in agentic contexts — see our coverage of Perplexity Brain for comparison.
PyTorch 2.1+ with CUDA (training on CPU is impractical)
At minimum 1× A100 80 GB GPU for the LLM fine-tuning stage; 8× for full end-to-end training
MEG data in MNE-compatible format (.fif or similar)
Clone and Install
bash
git clone https://github.com/facebookresearch/brain2qwerty.git
cd brain2qwerty
pip install -e ".[dev]"
The repo uses the neuralset and neuraltrain libraries (also from Meta FAIR) for data loading and training infrastructure.
Dataset
The SpanishBCBL dataset (v1, 19 participants) is being released by the Basque Center on Cognition, Brain and Language (BCBL). The EnglishBCBL dataset (v2, 9 participants, 22,000 sentences, ~90 hours) has a separate release timeline — check the repo README for updates.
If you have your own MEG data in a delayed-typing paradigm, preprocessing steps are:
Bandpass filter: 0.5–45 Hz, notch at 50 Hz
Downsample to 100 Hz
Per-channel RobustScaler normalization (median and IQR per recording)
Clamp values exceeding ±5 robust standard deviations
The decoder outputs the most likely sentence for each continuous MEG segment. With beam size 16 and a Qwen3-4B backbone, inference takes a few seconds per sentence on a single GPU.
Key Config Tips
Use label smoothing 0.02 on the LLM cross-entropy loss — the biggest single gain found by the Auto Research agents
Enable modality dropout (rate 0.1) on both CTC tokens and MEG tokens during LLM training
Set LoRA targets to all linear projections (not just attention) for the best Model Soup scaling
For the full hyperparameter grid and ablation configs, refer to configs/ in the repository.
The paper's scaling law result is the most important long-term signal. With no saturation at 90 hours of data per 9 subjects, there is a direct lever: record more data from more subjects and performance will continue to improve log-linearly. If that trend holds into the hundreds of hours range, the gap with invasive BCIs may start to close materially.
The path to a clinical device requires:
Demonstrating the approach on patients without motor output for labeled training
Enabling real-time causal decoding
Validating on smaller OPM sensor arrays
Running safety and feasibility studies outside a magnetically shielded laboratory
None of those are easy. But for the first time, non-invasive brain-to-text has crossed a threshold where the research question is no longer "is this possible?" — it is "how much data do we need?"
Statistics and architecture details in this article are accurate as of June 29, 2026, based on the Brain2Qwerty v2 preprint (Zhang, Lévy, et al., June 25, 2026). Performance metrics may improve as training scales and the EnglishBCBL dataset is released publicly.