BrainMosaic: Semantic Intent Decoding
- BrainMosaic is a deep learning architecture that translates EEG/SEEG signals into natural language through compositional semantic intent decoding.
- It employs a modular pipeline of semantic decomposition, optimal set matching via the Hungarian algorithm, and LLM-based sentence reconstruction.
- Experimental validation shows superior UMA, MUS, and SRS performance over conventional BCI frameworks, enhancing interpretability and adaptability.
BrainMosaic is a deep learning architecture for semantic intent decoding from neural signals, specifically EEG and SEEG, enabling the translation of brain activity into natural language by modeling meaning as flexible sets of compositional semantic units. Designed to overcome the interpretability and semantic expressiveness limitations of conventional brain–computer interface (BCI) decoding frameworks, BrainMosaic operationalizes the Semantic Intent Decoding (SID) paradigm, providing a compositional, continuous, and extendable approach to BCI-mediated communication (Li et al., 28 Jan 2026).
1. Conceptual Foundations: Semantic Intent Decoding (SID)
BrainMosaic is a concretization of the SID framework, which is based on three core principles:
- Compositionality: Communicative intent is modeled as a finite, unordered set of semantic units, denoted . This mirrors psycholinguistic theories where meaning is constructed from flexible “chunks” rather than linear, class-constrained units.
- Continuity and Expandability: Each semantic unit exists as a vector in a continuous open embedding space , where cosine similarity quantifies graded semantic similarity.
- Fidelity: The system enforces semantic and linguistic faithfulness by ensuring generated sentences are grounded in decoded semantic units and manifested as grammatically and contextually appropriate natural language.
The SID pipeline comprises three sequential modules:
- Semantic Decomposer: Extracts candidate semantic representations from neural data.
- Semantic Retriever (Set Matching): Selects the optimal set of semantic units using bipartite set matching.
- Semantic-Guided Reconstruction: Assembles the final output sentence from the retrieved set.
2. BrainMosaic Architecture
BrainMosaic employs a modular architecture, structured as follows:
2.1. EEG/SEEG Encoder
A ModernTCN (Temporal Convolutional Network) combined with a Transformer encodes raw, multi-channel time series signals into feature tokens . A set of learnable slot queries then attends over to produce candidate embeddings: 0.
2.2. Semantic Unit Matcher (Retriever)
For each candidate slot embedding 1, the retriever performs bipartite optimal assignment (using the Hungarian algorithm) to align 2 with a continuous text embedding 3 or a “no-object” class, producing slot activity scores 4 and a global sentence embedding 5 augmented with attribute predictions.
2.3. Semantic-Guided Sentence Reconstructor
Retrieved units 6 and global attributes 7 are converted into a structured prompt, 8, which is then fed into a LLM, such as GPT-4o-mini, to generate the final natural language output: 9
3. Mathematical Formulation and Optimization
3.1. Set Matching and Assignment
The assignment problem is: 0 where 1 is the per-slot matching loss, 2 is an optimal permutation of slots, and 3 is the symmetric group on 4 elements.
3.2. Objective Losses
- Hungarian Loss: Aggregates per-slot assignments.
- Per-Slot Matching Loss:
5
with 6 as the binary activity label and 7 is cosine similarity.
- Global Intent Loss:
8
where 9 is cross-entropy.
- Total Retriever Loss:
0
- Total Training Loss:
1
with 2 a contrastive margin loss for “no-object” slots.
3.3. Metrics
- Unit Matching Accuracy (UMA):
3
- Mean Unit Similarity (MUS):
4
- Sentence Reconstruction Similarity (SRS):
5
- BERTScore-F1 is used as a secondary measure; perplexity/BLEU and WER are de-emphasized due to limited semantic fidelity capture.
4. Experimental Validation
BrainMosaic was evaluated using multiple datasets:
- Public multilingual EEG: Chisco (Chinese, imagined speech), ChineseEEG-2 (Chinese), ZuCo 1.0/2.0 (English).
- Private clinical SEEG: 1 subject, 515 imagined Chinese sentences across five topics.
Key comparative baselines include Cls-Align (fixed-label classification with embedding alignment), Multi-Cls (multi-label classification), Seq-Decode (LSTM-based sequential decoding), and Neuro2Semantic (end-to-end embedding alignment plus a generator).
| Level | Cls-Align | Multi-Cls | Seq-Decode | BrainMosaic |
|---|---|---|---|---|
| UMA | — | 0.0359 ± 0.0006 | 0.1786 ± 0.0126 | 0.6596 ± 0.0102 |
| MUS | — | 0.6739 ± 0.0061 | 0.6503 ± 0.0115 | 0.8124 ± 0.0108 |
| SRS | 0.5976 ± 0.0030 | 0.4400 ± 0.0082 | 0.5104 ± 0.0114 | 0.6651 ± 0.0045 |
| BERT-F1 | — | 0.6173 ± 0.0075 | 0.6126 ± 0.0121 | 0.6629 ± 0.0137 |
All leading metrics (UMA > 0.65, SRS > 0.62 for clinical SEEG) reflect pronounced superiority over prior paradigms (6).
As the retrieval vocabulary expands (base to base +30,000 words), UMA and MUS decline modestly, while SRS remains robust. Scaling the training data from 10% to 100% yields monotonic increases in both UMA and SRS, supporting continuous space learnability.
5. Interpretability and Open-Set Generalization
BrainMosaic enables granular inspection at the semantic unit level. The intermediate unit set 7 permits transparent error analysis; slot activity 8 reflects per-unit confidence. The continuous nature of the embedding space enables retrieval of unseen concepts via nearest-neighbor search in 9. Use of definition-based embedding (rather than word-only) further extends semantic coverage.
Open-set generalization is supported by the embedding architecture, enabling BrainMosaic to effectively decode out-of-vocabulary meanings—a critical limitation in conventional classification approaches.
6. Regional Contributions and Neurophysiological Correlates
Gradient-based saliency analysis in the clinical SEEG data shows moderate correlation (0) between slot decoding and regional neural activity, with strongest contributions from the superior temporal gyrus/sulcus (STG/STS) and middle temporal cortex. These findings align with established roles for these regions in semantic representation and decoding.
7. Significance and Implications
BrainMosaic operationalizes a major advance in BCI decoding by integrating set-based compositionality, continuous embeddings, and LLM-constrained language generation. The architecture’s alignment with psycholinguistic theory, its transparency at the semantic chunk level, and its adaptability across languages and open vocabularies constitute significant steps for natural and interpretable BCI-mediated communication (Li et al., 28 Jan 2026). A plausible implication is the potential for more naturalistic, expressive BCIs capable of adapting to user-specific or context-dependent semantics without reengineering for each new vocabulary.