Manuscript Offprint

arXiv:2609.37642

Flattening the Connectome Spectrum: A Spectral Filter for FC Induces a Pretraining Target for fMRI Encoders

Giovanni Marraffini, Victoria Shevchenko, Carlo Alberto Barbano, Demian Wassermann

ABSTRACT

Self-supervised pretraining reshaped prediction in language and vision, and brain foundation models (BFMs) inherited its promise. Representations learned from large unlabelled corpora should capture individual functional dynamics and generalise across cohorts. However, kernel ridge regression (KRR) fitted on functional connectivity (FC) matrices still predicts individual phenotypes more accurately than any BFM we tested. In this paper, we show that KRR is weighted by the eigenvalues of the FC which are miscalibrated for phenotype prediction. We apply an efficient spectral filter to recalibrate the eigenvalues of each subject's FC matrix, enabling the model to exploit more inter-individual variance. Across the 5 datasets, 11 parcellations and 6 prediction targets we tested, we match or exceed the KRR baseline. Based on this finding, we then pretrain a small encoder model on about 4,000 hours of fMRI from 162 open datasets, whereby we align the pairwise similarities between the embeddings of recording snippets with those between the recalibrated connectomes. Our model performs on par with the best of the 6 published BFMs we tested while having an order of magnitude fewer parameters. Our encoder performs better than FC on short scans and in smaller cohorts, especially in fingerprinting. We release the pretrained model weights, the code and the pretraining data, preprocessed and parcellated.

1 INTRODUCTION

Functional connectivity (FC), the matrix of pairwise correlations between regional fMRI timeseries, reliably captures subject-specific variance, enabling the prediction of subject identity from distinct scanning sessions (Finn et al., 2015). FC also allows us to predict cognitive performance measures such as fluid and crystallized intelligence (Kong et al., 2023; Ooi et al., 2022). This capability is likely to stem from FC variance being dominated by stable individual and group factors rather than by the mental or physical state during the scanning session (Gratton et al., 2018). Ooi et al. (2022) built a prediction pipeline on these matrices: kernel ridge regression on the off-diagonal FC entries predicts cognitive ability and a wide range of behavioural measures.

In recent years, Brain Foundation Models (BFMs) pretrained on fMRI time-series brought the promise of surpassing such linear baselines in prediction from fMRI, and of representations that transfer across cohorts and tasks. Nevertheless, BFMs are currently underperforming simple linear estimators fitted on FC (He et al., 2020b; Marraffini et al., 2026). Most common explanations for this disparity are centered on data scarcity (Marek et al., 2022) and low signal-to-noise ratio (SNR) (Schulz et al., 2024). In particular, for low SNR data such as fMRI, the adequacy of the default masked-reconstruction pretraining objective has been questioned (Van Assel et al., 2025). All in all, they yield representations that do not capture as much behaviorally relevant information as FC (Zhou et al., 2025). Therefore, instead of simply assuming these models should scale to beat these baselines, we first study where the linear estimator on FC itself fails and we improve it. Then, leveraging this transformation, we craft a pretraining loss that makes a small model trained on open data match the best published BFMs we tested and beat KRR on short scans and fewer subjects.

(a) mean spectrum by rank

Figure

(b) eigenvalue distribution at each exponent α\alpha

Figure

eigenvalue λα\lambda^{\alpha} (all subjects pooled)

Figure 1: (a) The eigenvalue spectrum of the FCs from HCP-YA (Van Essen et al., 2013) by rank, averaged over the 955 subjects, before ( α=1\alpha = 1, red) and after raising the eigenvalues to α∗\alpha^* (blue). The transform is concave with a fixed point at λ=1\lambda = 1, so eigenvalues are pushed onto an increasingly compact support around 1, with their order preserved. (b) The distribution of eigenvalues pooled over the same 955 subjects, from α=1\alpha = 1 (red, raw FC) down to α=0.05\alpha = 0.05; the one at α∗\alpha^* is blue. Each is the histogram of log⁡10λα\log_{10} \lambda^\alpha; lowering α\alpha pulls the distribution toward λ=1\lambda = 1 from both sides (Appendix C).

We find that an answer lies in the spectrum of the FC matrix itself. We observe that the space spanned by a small percentage of the eigenvectors of a subject's FC matrix carries almost all of the weight the KR regression uses, while the variance that distinguishes individuals is spread over a larger space (Figure 1, Table 2). We also observe that flattening the FC's spectrum by applying an exponentiation between 0 and 1 improves the prediction on most phenotypes on every dataset and parcellation we test. In particular, it improves fingerprinting far more than sex or age prediction (Table 3). The same spectrum-flattened connectome serves as a pretraining target. We train a small encoder to preserve the pairwise similarities between the spectrum-flattened connectomes which then reaches comparable performance to the best published BFMs we tested on most datasets and tasks, with an order of magnitude fewer parameters. Furthermore, in some tasks and datasets it gets significantly better than every other tested BFM. In summary, our contributions are:

• Recovering individual variance from FC with a spectral transformation. We find that the eigenvalue distribution of each subject FC is extremely uneven. We derive how this concentrates the regression on a few percent of the eigenvectors (Section 3.2, Table 2, Appendix F). We recalibrate the matrix at the selected exponent α∗\alpha^* ( α∗=0.35\alpha^* = 0.35 throughout this paper, chosen in Section 3.3), which significantly improves prediction (Tables 1 and 3).

• A pretraining objective derived from the transformation. Using pairwise similarities between FCα∗FC^{\alpha^*} matrices as a pretraining target, an encoder learns to match these similarities in the encoded embeddings from only short windows of the full scan. This encoder matches or exceeds the best foundation models we tested on almost every dataset and task, with roughly an order of magnitude fewer parameters and trained fully on open and free data. In particular, given short scans and fewer subjects, the encoder outperforms FC on the cognitive composite and in fingerprinting (Tables 3 and 4). The objective applies to any multivariate timeseries for which a pairwise similarity between recordings can be computed.

We release the code, the encoders with 1M and 8M parameters and the pretraining data as used: 162 open datasets, 9,578 subjects, 27,835 recordings, preprocessed and parcellated. 1^{1}

1^{1}Code: https://github.com/GioMarraffini/fc-power

Encoders: https://huggingface.co/Marraffini-Giovanni/fbert-1m

https://huggingface.co/Marraffini-Giovanni/fbert-8m

Data: https://huggingface.co/datasets/Marraffini-Giovanni/fbert-corpus

References (100)

Couldn't load all references. Reload the page to try again.