A Systematic Evaluation of Sample-Level Tokenization Strategies for MEG Foundation Models
Organizations: Oxford Centre for Human Brain Activity, University of Oxford, Oxford OX3 7JX, U.K. · Nuffield Department of Clinical Neurosciences, University of Oxford, Oxford OX3 9DU, U.K. · Department of Psychiatry, University of Oxford, Oxford OX3 7JX, U.K. · Oxford Robotics Institute, Department of Engineering Science, University of Oxford, Oxford OX2 6NN, U.K.
Abstract
Recent success in natural language processing has motivated growing interest in large-scale foundation models for neuroimaging data. Such models often require discretization of continuous neural time series data, a process referred to as 'tokenization'. However, the impact of different tokenization strategies for neural data is currently poorly understood. In this work, we present a systematic evaluation of sample-level tokenization strategies for transformer-based large neuroimaging models (LNMs) applied to magnetoencephalography (MEG) data. We compare learnable and non-learnable tokenizers by examining their signal reconstruction fidelity and their impact on subsequent foundation modeling performance (token prediction, biological plausibility of generated data, preservation of subject-specific information, and performance on downstream tasks). For the learnable tokenizer, we introduce a novel approach based on an autoencoder. Experiments were conducted on three publicly available MEG datasets spanning different acquisition sites, scanners, and experimental paradigms. Our results show that both learnable and non-learnable discretization schemes achieve high reconstruction accuracy and broadly comparable performance across most evaluation criteria, suggesting that simple fixed sample-level tokenization strategies can be used in the development of neural foundation models. The code is available at https://github.com/OHBA-analysis/Cho2026_Tokenizer.
Figures & tables
| Causal | Noncausal | -Transform | Standard Quantile | |||||
| Tokenizer | # Runs | 10 | 10 | - | - | |||
| Mean Std. | 0.0258 8.58e-4 | 0.0277 5.33e-3 | - | - | ||||
| Best Final Loss | 0.0245 | 0.0170 | - | - | ||||
| # Tokens | 97 | 121 | 256 | 182 | 108 | 54 | 108 | |
| MEG-GPT | Train Loss | 1.7540 | 1.8740 | 3.6158 | 3.3824 | 3.0263 | 2.5492 | 3.2217 |
| Train Top 1 Acc. | 0.3353 | 0.3426 | 0.0721 | 0.0873 | 0.1172 | 0.1728 | 0.0944 | |