ABSTRACT
Accounting for interindividual variability in brain function is key to precision medicine. Here, by considering functional interindividual variability as meaningful data rather than noise, we introduce VarCoNet, an enhanced self‐supervised framework for robust functional connectome (FC) extraction from resting‐state fMRI (rs‐fMRI) data. VarCoNet employs self‐supervised contrastive learning to exploit inherent functional interindividual variability, serving as a brain function encoder that generates FC embeddings readily applicable to downstream tasks even in the absence of labeled data. Contrastive learning is facilitated by a novel augmentation strategy based on segmenting rs‐fMRI signals. At its core, VarCoNet integrates a 1D‐convolutional neural network (CNN) with a Transformer encoder for advanced time‐series processing, enhanced with robust Bayesian hyperparameter optimization. Our VarCoNet framework is evaluated on two downstream tasks: (i) subject fingerprinting, using rs‐fMRI data from the Human Connectome Project (2117 recordings), and (ii) autism spectrum disorder (ASD) classification, using rs‐fMRI data from the Autism Brain Imaging Data Exchange (ABIDE) I (995 recordings) and II (730 recordings) datasets. Using different brain parcellations, our extensive testing against state‐of‐the‐art methods, including 13 deep learning methods, demonstrates VarCoNet's superiority, robustness, interpretability, and generalizability, achieving up to 98% subject fingerprinting accuracy and an area under the curve (AUC) of 72.6% for ASD classification. Overall, VarCoNet provides a versatile and robust framework for FC analysis in rs‐fMRI.
Keywords: autism spectrum disorder classification, functional connectome, interindividual variability, resting‐state fMRI, self‐supervised learning, subject‐fingerprinting
VarCoNet is a robust framework for functional connectome estimation from rs‐fMRI. Using contrastive learning, it trains a 1D‐CNN–Transformer encoder to improve the intra‐ to intersubject variability ratio. VarCoNet achieves state‐of‐the‐art subject fingerprinting and outperforms existing methods in ASD classification.

Each brain exhibits distinct anatomical and functional traits shaped by genetic and environmental factors (Gu and Kanai 2014; Kosslyn et al. 2002). Consequently, brain structure and function vary across individuals, even among those with similar demographics (e.g., age, gender, handedness) (Seghier and Price 2018). Functional interindividual variability is depicted as differences across subjects in regional brain activations or interregional functional connectivity (Vogel and Machizawa 2004; Miller et al. 2012), the latter typically represented through functional connectomes (FCs) derived from resting‐state fMRI (rs‐fMRI) data. Such variability holds useful information about the individual's traits that should be taken into account when studying brain function. Indeed, understanding variability is key to advancing precision medicine (Seghier and Price 2018). However, popular FC analysis frameworks rarely consider variability across subjects as a source of meaningful information about brain function in group studies.
Interindividual differences in brain function can predict task performance at the individual level (Mennes et al. 2010; Tavor et al. 2016), showing high reliability over time (Miller et al. 2002). On a practical level, the capability to detect and characterize differences among individuals depends on the relative contribution of two primary components or sources: within‐subject variation and between‐subject variation (Xu et al. 2023).
Within‐subject variation pertains to the variability in brain function observed within the same individual at different times (e.g., in multi‐session protocols and test–retest studies). The human brain is a dynamic system, continuously altering its functions in response to internal and external stimuli. Nevertheless, despite the constant changes, there is an equilibrium maintained through homeostatic processes. This equilibrium enables the brain to preserve order despite its dynamic nature and allows brain measures to approach consistency over time (Laumann et al. 2017; Poldrack et al. 2015).
On the other hand, between‐subject variation pertains to the variability in brain function observed across individuals. Reliable detection of individual‐specific patterns requires minimizing the ratio of within‐ to between‐subject variation (Xu et al. 2023). Put another way, reproducible and reliable neurophysiological representations are those that exhibit low ratios of within‐ to between‐subject variation. Indeed, taking into account interindividual variability is critical for advancing precision medicine, including brain disorder detection (Finn and Constable 2016; Demeter and Greene 2025). Therefore, considering both within‐ and between‐subject variation when designing models or frameworks for brain disorder detection is crucial. For a visual illustration of how within‐ and between‐subject variation can influence brain disorder detection, we refer readers to Figure S1.
Direct assessment of within‐ to between‐subject variation ratio requires collecting multiple fMRI recordings from multiple subjects across different days (Xu et al. 2023), which is often impractical. One framework that only requires two rs‐fMRI sessions per subject is subject fingerprinting, which can provide insights on whether the within‐ to between‐subject variation ratio is adequately small (Finn et al. 2015; Xu et al. 2023). More specifically, in subject fingerprinting, identification is performed using pairs of FC features derived from rs‐fMRI scans collected on two different visits (e.g., Time 1 and Time 2). Each subject's feature from Time 1 is then compared against all subjects' features from Time 2. If the highest similarity is found between the same subject's features, the identification is considered correct. The fingerprinting accuracy is then computed as the ratio of correctly identified subjects to the total number of subjects.
Since low within‐ to between‐subject variation is crucial for high subject fingerprinting accuracy, this framework serves as a robust method for evaluating the reliability of brain function encoding techniques. Similarly, improving FC‐based brain disorder classification requires better characterization of functional interindividual variability. In this context, it would be of interest to examine whether a model optimized for subject fingerprinting can be successfully applied to a brain disorder classification task.
Here, we present VarCoNet, 1 a novel deep learning (DL) framework designed to enhance FC estimation. Following our recent prior work (Lamprou et al. 2025), VarCoNet leverages contrastive self‐supervised learning (SSL) to train a combined 1D‐convolutional neural network (CNN)‐transformer encoder that processes rs‐fMRI time‐series without requiring labeled data. Rather than computing FCs directly from raw time‐series, VarCoNet derives FCs by assessing the similarity between the learned embeddings. To enable contrastive learning, augmented views are generated by segmenting the input signals. For each subject in a training batch, the model increases the similarity between FCs computed from two different segments of that subject's data while decreasing similarity with FCs from other subjects. This core mechanism of contrastive learning naturally aligns with the key principles of interindividual variability analysis, namely, reducing within‐subject variation while maintaining higher between‐subject variation.
Our study introduces several practical contributions grounded in the optimal design and implementation of all VarCoNet components, including the contrastive learning framework, model architecture, and data augmentation strategy. These contributions address the following key gaps in current fMRI‐based encoding approaches:
Overfitting to task‐specific labels: Most fMRI encoding methods rely on supervised learning (Riaz et al. 2020; Bedel et al. 2023; Meng et al. 2024; Kan, Cui, et al. 2022; Nguyen et al. 2020), which can lead to “attentive overfitting,” where models focus on label‐specific features and neglect broader patterns (Zagoruyko and Komodakis 2016). In contrast, VarCoNet employs contrastive learning to learn task‐agnostic representations. Importantly, this approach is physiologically interpretable and grounded in the principle that taking into account interindividual variability is key to precision medicine (Seghier and Price 2018).
Limited integration of local and global temporal features: Recent studies have indicated that both local and global temporal patterns in rs‐fMRI, reflecting short‐ and long‐range dependencies, carry stable, meaningful, individual‐specific information (Shinn et al. 2023; Zhang et al. 2021). However, many existing models rely on 1D‐CNNs or gated recurrent units (Riaz et al. 2020; Kan, Cui, et al. 2022), which may struggle to capture temporal features at different scales. VarCoNet addresses this limitation through a hybrid 1D‐CNN‐Transformer architecture, where convolution extracts local temporal features and attention mechanisms model long‐range temporal dependencies.
Inefficient attention computation on raw time‐series: Another advantage of combining 1D‐CNNs with Transformers, as opposed to using Transformers alone as in (Nguyen et al. 2020; Thomas et al. 2022; Malkiel et al. 2022; Bedel et al. 2023; Meng et al. 2024), is improved attention efficiency. Transformers are designed for natural language processing, where tokens have clear semantic meaning. In contrast, individual fMRI time points lack such semantic structure, making direct attention computation on raw time‐series suboptimal. By introducing a 1D‐CNN before the Transformer, VarCoNet produces more structured and informative intermediate representations, enabling the attention mechanism to operate more effectively.
Inefficient handling of variability in acquisition duration: Existing methods often overlook variability in acquisition duration, a common challenge in multisite datasets (Birn et al. 2013). Pearson's correlation coefficient (PCC)‐based FC approaches (Cai et al. 2021; Kan, Dai, et al. 2022; Zhang et al. 2023; Lu et al. 2024; Zheng et al. 2025; Wang et al. 2025) inherit the sensitivity of PCC to signal duration (Finn et al. 2015), while other methods crop all recordings to the shortest length (Riaz et al. 2020), leading to substantial information loss. VarCoNet addresses this limitation through an augmentation strategy that introduces three key improvements over prior approaches employing similar strategies (Wang et al. 2023): (1) segment lengths are sampled from a continuous range of physiologically plausible values, rather than fixed lengths, improving robustness to signal duration; (2) the minimum and maximum lengths are carefully chosen to ensure sufficient variation without causing large fluctuations in fingerprinting accuracy; and (3) segmentation windows are placed at random positions rather than fixed ones, yielding more diverse training samples and better exploitation of the hybrid 1D‐CNN‐Transformer architecture.
The performance of VarCoNet is evaluated on two key tasks: subject fingerprinting, to assess its ability to enhance interindividual variability characterization using rs‐fMRI data from the Human Connectome Project (HCP), and autism spectrum disorder (ASD) classification using rs‐fMRI data from the Autism Brain Imaging Data Exchange (ABIDE) I and II, where ABIDE II is used exclusively for external testing. Performance is benchmarked against state‐of‐the‐art brain activity encoding methods. Subject fingerprinting is evaluated across a range of signal lengths commonly found in multisite rs‐fMRI datasets. ASD classification is assessed using repeated K‐fold cross‐validation (CV) and external testing, ensuring a robust and generalizable evaluation. Our findings show that VarCoNet consistently outperforms baseline methods on both tasks. Moreover, explanatory analyses identify key functional connections associated with ASD detection, providing interpretability into the model's learned representations.
1. Methods
1.1. Datasets and Preprocessing
1.1.1. HCP
The HCP dataset is a widely‐used publicly available dataset comprising rs‐fMRI data from 1113 participants (ages 22–36), collected using a 3 T Siemens Connectome‐Skyra scanner (Van Essen et al. 2013). Each subject underwent two scanning sessions on separate days, with each session consisting of two runs: one employing echo‐planar‐imaging (EPI) with right‐to‐left phase encoding and the other with left‐to‐right phase encoding. To avoid session bias, data were randomly selected from both phase encodings. Each rs‐fMRI run lasted 14.33 min and was acquired using an EPI sequence with a repetition time (TR) of 0.72 s and an echo time (TE) of 33.1 ms, resulting in 1200 volumes per run. During scans, participants were instructed to keep their eyes open, fixate on a crosshair, and remain still. The data utilized in this study underwent preprocessing with the HCP minimal preprocessing pipeline (Glasser et al. 2013), which includes artifact removal, motion correction, and registration to standard space. Additionally, we applied bandpass filtering (0.01–0.1 Hz). In addition, a T1‐weighted MPRAGE structural scan was obtained in each session (acquisition time: 7.6 min; TR: 2.4 s; TE: 2.14 ms; TI: 1 s; isotropic spatial resolution: ). Out of 1113 HCP subjects, 1092 subjects were included in this study, after excluding subjects with corrupted data.
1.1.2. ABIDE I
The ABIDE I dataset comprises rs‐fMRI data from 17 international sites, acquired using different scanners and imaging protocols (Di Martino et al. 2014). It includes 539 individuals diagnosed with ASD and 573 neurotypical controls (NCs), with ages ranging from 7 to 64 years and acquisition durations ranging from 3.32 to 10 min. Several preprocessed versions of the dataset are publicly available, each generated using different preprocessing pipelines. For this study, we used data processed with the fMRIPrep pipeline (Esteban et al. 2019), which includes rs‐fMRI reference image estimation, head‐motion and slice‐timing correction, and susceptibility distortion correction. The rs‐fMRI volumes were then normalized to the MNI152 NLIN 2009b template. ICA‐AROMA (Pruim et al. 2015) was applied to remove motion‐related artifacts, after which cerebrospinal fluid and white matter signals were regressed out. Finally, the signals were bandpass‐filtered to the typical [0.01–0.1] Hz range. Out of 1112 ABIDE I subjects, 946 subjects were included in this study, after excluding subjects with missing information.
1.1.3. ABIDE II
The ABIDE II dataset consists of rs‐fMRI scans from 19 international sites, collected using diverse scanners and imaging protocols (Di Martino et al. 2017). It includes 521 individuals with ASD and 593 NCs, with ages ranging from 5 to 64 years and scan durations between 5.14 and 16.21 min. As with ABIDE I, we used data preprocessed with the fMRIPrep pipeline (Esteban et al. 2019), applying the same preprocessing steps. Of the 1114 available subjects, 730 were included in this study. Subjects with missing functional scans or incomplete metadata were excluded.
Table 1 summarizes the number of subjects and recordings used from the HCP, ABIDE I, and ABIDE II datasets, along with key demographic details and acquisition duration.
TABLE 1.
Demographic information of utilized subjects in HCP, ABIDE I, and ABIDE II datasets.
| Dataset | Subjects | Recordings | Gender (F/M) | Age | Acq. Dur. (min) |
|---|---|---|---|---|---|
| HCP | 1092 | 2117 | 593/499 | 28.87 ± 3.58 | 14.33 |
| ABIDE I | 500 NC and 446 ASD | 995 | 155/791 | 16.13 ± 7.49 | 6.47 ± 1.79 |
| ABIDE II | 323 NC and 256 ASD | 730 | 151/428 | 13.89 ± 8.13 | 6.67 ± 1.97 |
Abbreviation: Acq. Dur., acquisition duration.
Data from the HCP, ABIDE I and ABIDE II datasets were parcellated into regions of interest (ROIs) using two popular brain parcellations: the 166‐ROIs automatic anatomic labeling v3 (AAL3) (Rolls et al. 2020) and the 384‐ROIs atlas of intrinsic connectivity of homotopic areas (AICHA) (Joliot et al. 2015) atlases. These atlases were selected to assess the impact of parcellation resolution: AAL3 provides a lower‐resolution anatomical parcellation with fewer ROIs, whereas AICHA offers a much more detailed functional parcellation.
To ensure temporal consistency across datasets, all rs‐fMRI data were resampled to a uniform TR of 1.5 s. After resampling, ABIDE I data varied in length from 120 to 320 time points. For acquisitions at one of the sites (University of Michigan) that exceeded 8 min, data were cropped to match this duration. These data manipulations were performed here for consistency purposes across the three datasets, as VarCoNet can handle any rs‐fMRI durations and temporal resolutions.
1.2. Contrastive Learning
Contrastive‐based SSL enables models to capture intricate data structures without relying on labeled data, addressing a key limitation of large‐scale supervised learning models, particularly in medical applications. In this work, contrastive training is implemented using the simple framework for contrastive learning (SimCLR) (Chen et al. 2020), as depicted in Figure 1. Given a batch of samples, two augmented views are generated for each sample. SimCLR optimizes representations by increasing similarity between embeddings of the same sample while reducing similarity among different samples. This is achieved through the following loss function.
FIGURE 1.

Block diagram of VarCoNet's contrastive training. For illustration purposes, a batch of two subjects is shown. After parcellation using one of two atlases, each rs‐fMRI signal is augmented to generate a pair of views. These views are processed by a shared 1D‐CNN‐transformer encoder, producing embeddings of size , where is the number of ROIs and denotes the number of tokens. Cosine similarity is then computed among the ROIs to obtain the VarCoNet‐based FCs as matrices. These matrices are vectorized by discarding the lower triangular part and undergo a contrastive process that favors similarity between FCs of the same subject while minimizing similarity between FCs of different subjects. The lower part of the figure provides a detailed view of embedding computation. Specifically, the 1D‐CNN slides over each ROI's time‐series of length , extracting tokens of shape , where , the number of kernels. Global average pooling (GAP) reduces each token to shape . Positional encodings are then added before the Transformer processes the token sequence.
Denoting cosine similarity between any two vectors and as , the SimCLR loss for a positive pair is formulated as
| (1) |
where is an indicator function set to 1 if k i and zero otherwise, and a temperature parameter.
1.3. VarCoNet
The framework of our proposed VarCoNet is illustrated in Figure 1. Parcellated rs‐fMRI time‐series are fed into the VarCoNet framework to produce learned FCs (VarCoNet‐based FCs) that are subsequently used for subject fingerprinting and ASD classification. The implementation of VarCoNet consists of three key components: data augmentation, a 1D‐CNN‐transformer encoder, and hyperparameter optimization.
1.3.1. Data Augmentation
An effective augmentation strategy is crucial for successful contrastive learning. It is essential to ensure that the two augmented views of the same sample retain similar information. In VarCoNet, rs‐fMRI signals are augmented by segmenting them into multiple segments. This induces the encoder to produce similar embeddings for segments of the same signal while ensuring dissimilarity between embeddings from different signals.
There are different ways to segment the rs‐fMRI signals. In our preliminary implementation (Lamprou et al. 2025) following the work of (Peng et al. 2022), two segmentation strategies were used: (1) segments of different lengths ( and ) centered at the same time point, and (2) segments of equal length () with randomly selected centers. All segment lengths (, , and ) were chosen from a fixed set of five possible values. Here, our new implementation illustrated in Figure 1 adopts a more efficient unified segmentation approach. Specifically, both the segment lengths ( and ) and their centers are randomly selected at each epoch, increasing variation between segments for the encoder while reducing computational complexity. Moreover, the segment lengths and are allowed to take any value within a predefined range [, ]. These limits are carefully chosen to optimize contrastive learning efficiency, as detailed in Section 1.4.
1.3.2. rs‐fMRI Encoder
The core component of VarCoNet is its encoder, which combines a 1D‐CNN with a Transformer encoder, as illustrated in Figure 1, following a similar rationale to wav2vec (Baevski et al. 2020), a successful model developed by Facebook AI for audio signal processing. As mentioned above, individual time points in continuous rs‐fMRI signals lack semantic meaning, making direct attention computation suboptimal. To address this, the 1D‐CNN acts as a feature extractor, sliding across the time‐series to produce meaningful tokens that are then processed by the Transformer encoder.
Given an input of shape , where represents the number of ROIs and denotes the number of time points, an instance normalization layer first normalizes each sample within the batch. The 1D‐CNN then processes the time‐series of each ROI independently, producing an output of shape , where is the number of kernels and is the reduced time dimension due to convolutional operations (). Then, global average pooling is applied along the third dimension, yielding a representation of shape . Each of the columns in this representation serves as a token for the Transformer encoder. Furthermore, trainable positional encodings are added to preserve temporal information. The Transformer processes these inputs and yields output representations of shape . Finally, VarCoNet‐based FC matrices of size are computed using cosine similarity. To eliminate redundancy of information due to symmetry, the lower triangular part of each VarCoNet‐based FC matrix is removed, resulting in a final embedding vector of shape .
1.3.3. Bayesian Hyperparameter Optimization
Bayesian optimization is a powerful approach for tuning the hyperparameters of DL models (Snoek et al. 2015). By efficiently exploring a large hyperparameter space, it enhances model performance while reducing the computational cost of hyperparameter selection. In this study, the tree‐structured parzen estimator (TPE) is employed to optimize key hyperparameters of the encoder over 125 trials, including: (1) number of Transformer encoder layers , (2) number of attention heads per layer , (3) feedforward dimension , (4) batch size, (5) temperature parameter (see Equation 1), and (6) learning rate .
At each iteration of the TPE, the aforementioned hyperparameters are set to specific values. VarCoNet is then trained using those hyperparameters and at each epoch it is evaluated based on subject fingerprinting performance using a validation set of subjects, each with two scanning sessions. From each validation, 30 segments of the rs‐fMRI signal of lengths (45 s with a TR of 1.5 s), (4.375 min with a TR of 1.5 s), and (8 min with a TR of 1.5 s) samples (time points) are extracted, with 10 segments per length exhibiting minimum overlap (or no overlap for segments of length 30).
Subject fingerprinting is then performed under six different combinations of segment lengths: (1) 30 samples for Session 1 and Session 2, (2) 175 samples for Session 1 and Session 2, (3) 320 samples for Session 1 and Session 2, (4) 30 samples for Session 1 and 175 for Session 2, (5) 30 samples for Session 1 and 320 for Session 2, and (6) 175 samples for Session 1 and 320 for Session 2. For each combination, fingerprinting accuracies are computed and averaged across the 10 segments. The optimization objective is defined as the sum of the average and the minimum of these six fingerprinting accuracies. Since this evaluation is conducted after each epoch, a single optimizer iteration involves as many evaluations as the number of epochs. To update the TPE, the value from the epoch with the best validation score is used. This process, that is, extracting segments of different lengths from the validation data, obtaining VarCoNet‐based FCs, performing intra‐ and inter‐length subject fingerprinting, and using the resulting fingerprinting accuracies to compute the objective function, is detailed in Figure 2.
FIGURE 2.

Block diagram of the subject fingerprinting‐based objective function used in Bayesian optimization. Given a set of hyperparameters proposed by the optimizer, VarCoNet is initialized and trained on the training data. At each epoch, rs‐fMRI signals from the validation set ( subjects) are segmented using sliding windows of lengths , , and (10 segments per length). VarCoNet extracts vectorized FC embeddings of shape , where is the number of ROIs. Subject fingerprinting is then performed across all six segment‐length combinations (–, –,…,–) using data from both sessions. Each combination yields 10 fingerprinting scores, which are averaged to obtain six final scores. The objective function is computed as the harmonic mean of the average and minimum of these six scores. The highest objective function value across all training epochs is used to update the optimizer.
The chosen objective function (i.e., the harmonic mean of the average and minimum performance) is designed to enhance overall performance while ensuring that the lowest performance remains high. This approach enhances the model's robustness across different signal lengths, which is crucial when working with multisite datasets that might have variable acquisition durations.
1.3.4. Measuring Functional Connectivity
Throughout the paper, we refer to the embeddings produced by VarCoNet as FCs. Here, we clarify our rationale under the broader meaning of functional connectivity and its distinction from other forms of brain connectivity (Horwitz 2003; Friston 2011). First, in fMRI, connectivity between regions is typically defined as the similarity between their representations, which need not be limited to time‐series. Prior work showed that connectivity can be computed on transformed representations, such as frequency‐domain coherence (Horwitz 2003; Friston 2011; Friston et al. 2014). In this sense, VarCoNet‐based connectomes, which quantify similarity between learned regional embeddings produced by the 1D‐CNN‐Transformer encoder, satisfy the general definition of a connectivity measure. Second, as discussed in Friston (2011), any connectivity derived from BOLD signals as (statistical) associations or dependencies is considered “functional.” This distinguishes it from effective connectivity, which focuses on causal relationships between brain regions, and from structural connectivity in diffusion tensor imaging. Under those definitions, the connectomes generated by VarCoNet fall within the broader concept of functional connectivity.
1.4. Hyperparameter Settings
The 1D‐CNN in the model architecture consists of a single convolutional layer with 16 kernels, a kernel size of 8, and a stride of 4. The kernel size was chosen to match the typical duration of the hemodynamic response function (approximately 12 s (Voss 2016), corresponding to 8 samples with a TR of 1.5 s). This duration of 12 s should suffice to capture the major temporal dynamics of a typical hemodynamic response, ignoring between‐ROI variations in neurovascular coupling and the small signal change during the undershoot phase (Taylor et al. 2018; Miezin et al. 2000). The stride of 4 ensures that neighboring tokens are sufficiently different, reducing redundancy in the attention operations performed by the transformer.
In preliminary experiments, we also evaluated shorter and longer kernels. Shorter kernels did not reliably capture even the fastest fluctuations within the 0.01–0.1 Hz band, whereas substantially longer kernels yielded too few tokens for the Transformer, given the finite length of the fMRI time series, thereby degrading performance. Thus, the selected 8‐TR window reflects a trade‐off between physiological interpretability, spectral coverage, and the practical need to maintain a sufficient number of Transformer tokens. For studies working with substantially longer acquisitions, longer kernel lengths might be considered.
Regarding the Transformer architecture and the critical hyperparameters temperature and learning rate , the Bayesian optimizer produced the results shown in Table 2.
TABLE 2.
Hyperparameters obtained through bayesian optimization.
| Atlas |
|
|
Batch size |
|
|
|
|||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AAL3 | 1 | 1 | 64 | 2048 |
|
0.054 | |||||
| AICHA | 1 | 2 | 64 | 512 |
|
0.054 |
For the data augmentation hyperparameters and , their selection was guided by the varying sequence lengths in the ABIDE I dataset. Specifically, was set to 320 samples (8 min) to match the longest sequence in ABIDE I. The choice of was constrained by two factors: it had to be below 120 samples (3 min) to enable effective augmentation, because drawing sufficiently distinct segments becomes infeasible due to excessive overlap, but it also needed to be sufficiently large to prevent excessive disparity between the shortest and longest sequences, which could hinder contrastive learning. To determine an appropriate , we trained models using different values of while keeping other hyperparameters fixed (as shown in Table 2). Subject fingerprinting was then evaluated using sequences of length , , and , as described in Section 1.3.3. The goal was to identify an that maintained balanced fingerprinting accuracy across all six test conditions (see Section 1.3.3). Our results indicated that samples (2 min) provided stable fingerprinting accuracies. To facilitate training, all inputs are zero‐padded to samples.
1.5. Competing Methods
We compare VarCoNet with two DL‐based subject fingerprinting methods and the conventional PCC benchmark, as well as with 11 DL‐based methods for ASD classification. A detailed summary of the motivations, technical characteristics, and implementation details of all examined baseline methods is provided in Data S1. For methods with publicly available code, we use the original implementations, modifying only the data preparation process to ensure all methods are trained, validated, and tested on the same subjects. For methods without available code, we provide our own implementations, which we release alongside VarCoNet, closely following the details in the original manuscripts. In cases where models were implemented from scratch, we optimized key hyperparameters, such as the learning rate and the batch size, and monitored the training loss to ensure convergence. A brief description of the baseline methods is provided below.
1.5.1. Subject Fingerprinting Baselines
Finn et al. (2015): The conventional PCC‐based FC method is used as a benchmark for subject fingerprinting, providing a comparison against VarCoNet and other DL‐based approaches.
Cai et al. (2021): This method combines an autoencoder for reconstructing parcellated fMRI time‐series with the K‐singular value decomposition (SVD) algorithm. The autoencoder is implemented from scratch, while K‐SVD is adapted from https://github.com/syanga/ksvd‐sparse‐dictionary. To accelerate computations, we convert the original NumPy‐based implementation to PyTorch for GPU compatibility.
Lu et al. (2024): This method integrates an autoencoder that reconstructs PCC‐based FCs with the K‐SVD algorithm. The autoencoder is implemented from scratch.
1.5.2. ASD Classification Baselines
DeepFMRI (Riaz et al. 2020): DeepFMRI consists primarily of 1D‐CNN and linear layer computations. As the method's code is not publicly available, we implemented it from scratch
Brain attend and decode (BAnD) (Nguyen et al. 2020): For BAn, we use the implementation provided by the authors at https://github.com/LLNL/BAnD.
Functional brain network generation (FBNETGEN) (Kan, Cui, et al. 2022): For FBNETGEN, we use the implementation provided by the authors at https://github.com/Wayfear/FBNETGEN.
Causal sequence modeling (CSM) (Thomas et al. 2022): This work investigates several SSL strategies to pretrain a Transformer model, with CSM achieving the best performance. To compare with VarCoNet, we fine‐tune the Transformer model trained on thousands of fMRI scans, following the authors' instructions and publicly available code at https://github.com/athms/learning‐from‐brains. This is the only method for which we do not use the AAL3 and AICHA atlases. Since the pretrained model requires input data with the exact same shape as used during training, we adopt the dictionary of functional modes (DiFuMo) atlas to ensure compatibility with the original implementation.
Brain network transformer (BNT) (Kan, Dai, et al. 2022): For BNT, we use the implementation provided by the authors at https://github.com/Wayfear/BrainNetworkTransformer.
Unsupervised contrastive graph learning (UCGL) (Wang et al. 2023): For UCGL, we use the implementation provided by the authors at https://github.com/xiaochuanwang‐1005/UCGL.
Adversarial graph contrastive learning (A‐GCL) (Zhang et al. 2023): For A‐GCL, we use the implementation provided by the authors at https://github.com/qbmizsj/A‐GCL.
Blood‐oxygen‐level‐dependent transformer (BolT) (Bedel et al. 2023): For BolT, we use the implementation provided by the authors at https://github.com/icon‐lab/BolT.
Cross‐view transformer (CVFormer) (Meng et al. 2024): CVFormer primarily consists of transformer and linear layers. As no official code is publicly available, we implement it from scratch.
Brain information bottleneck (BrainIB) (Zheng et al. 2025): For BrainIB, we use the implementation provided by the authors at https://github.com/SJYuCNEL/brain‐and‐Information‐Bottleneck.
Graph contrastive learning framework with diffusion augmentation (GCDA) (Wang et al. 2025): For GCDA, we use the implementation provided by the authors at https://github.com/xiaochuanwang‐1005/GCDA.
1.6. Evaluation Strategies
1.6.1. Subject Fingerprinting Evaluation
For subject fingerprinting, we first split the HCP data into training, validation, and test sets. Since fingerprinting strongly depend on the number of subjects, given that for subjects, there are negatives and only one positive, we use data from 200 subjects for validation and 393 subjects for testing, both exceeding the 126 subjects used in (Finn et al. 2015). The remaining 931 recordings, comprising 67 from distinct subjects and 864 from 432 subjects, are used for training. To maintain the contrastive learning process, during training, recordings from the same subject were excluded from the same batch.
At each epoch of VarCoNet's contrastive training, fingerprinting performance is evaluated on the validation set using the same metric employed in Bayesian hyperparameter optimization (see Section 1.3.3 and Figure 2), with the only difference being that the signal lengths and are set to 80 and 200, respectively, as explained in Section 1.4. In brief, this metric is the harmonic mean of the average and the minimum fingerprinting accuracies across six distinct fingerprinting procedures, derived from different combinations of three signal lengths (80, 200, and 320 samples). For each length, 10 segments are extracted per signal using a sliding window optimized for maximal distance between windows, and the mean value is used to compute the aforementioned metric. The model weights from the epoch with the highest validation score are restored for testing. In testing, the same procedure is applied, except that the six fingerprinting accuracies are reported separately (mean and standard deviation across the 10 segments) rather than being summarized into a single metric.
As previously discussed, low variability in fingerprinting accuracy across different signal lengths is highly desirable, particularly in multisite datasets where acquisition durations may vary substantially. To assess this, we compute and report the standard deviation of fingerprinting accuracy across the six scan‐duration combinations. For a fair comparison across methods, this standard deviation is normalized by the corresponding mean since methods with lower overall fingerprinting accuracy inherently exhibit lower raw standard deviation due to their smaller accuracy values rather than genuinely reduced variability. Paired t‐tests were further conducted to determine whether the normalized variability of VarCoNet was significantly lower than that of the competing methods.
The selected signal lengths were chosen to illustrate fingerprinting performance across a representative range of recording durations: very short (80 samples, 2 min), medium (200 samples, 5 min), and long (320 samples, 8 min). Acquisitions shorter than 2 min are highly uncommon, while durations beyond 8 min typically do not provide additional discriminative information, as indicated by saturation in fingerprinting accuracy. This saturation effect has also been reported in (Finn et al. 2015) and is further confirmed by our own results.
To perform subject fingerprinting, we follow the approach of (Finn et al. 2015). Specifically, we use the trained encoder to extract VarCoNet‐based FCs from each session of each subject. For subjects, this results in two matrices of shape , corresponding to the two sessions. Each row contains the flattened upper triangular part of the VarCoNet‐based FC. Let and represent the matrices corresponding to the first and second sessions, respectively. We compute the PCC between each row of and all rows in . If the highest PCC for a row in corresponds to the same subject's row in the identification is counted as correct. Fingerprinting accuracy is defined as the proportion of correctly identified subjects. The procedure is then repeated using as the anchor. The final reported fingerprinting accuracy is the harmonic mean of the accuracies obtained when using and as anchors. Additionally, we provide the average correlation matrix between and , across all duration combinations, which shows the similarities between the first and second sessions across 100 subjects from the test set. The diagonal of this matrix represents within‐subject similarities, while off‐diagonal elements represent between‐subject similarities. This allows us to assess whether the obtained fingerprinting accuracies are primarily driven by low within‐subject variation (high correlation between the two sessions of the same subject) or high between‐subject variation (low correlation between the two sessions of different subjects).
1.6.2. ASD Classification Evaluation
For ASD classification, we employ a single linear layer with an input size matching the embeddings of VarCoNet and an output size of two (corresponding to the two classes). This layer is followed by a Softmax function and it is trained using binary cross entropy (BCE) loss.
To ensure a thorough and fair comparison among competing methods we employ repeated K‐fold CV, widely recognized as the gold standard for evaluating machine learning and DL models (Raschka 2018), particularly when model selection is involved. Here, the best model in each fold is selected based on the epoch with the lowest validation loss. As noted in (Raschka 2018; Kohavi 1995), 10‐fold CV provides an optimal balance between bias and variance, leading us to set . Furthermore, based on (Raschka 2018; Efron and Tibshirani 1994), 50–200 performance samples are generally sufficient for reliable estimation. Thus, we conduct 10 independent 10‐fold CV runs, yielding 100 performance samples, and report the mean and standard deviation. In each CV iteration, nine folds are used for training, while the remaining fold is used for testing. To restore the model at the epoch of minimum validation loss, the training set is further divided into 85% training and 15% validation. All subjects with multiple recordings are assigned exclusively to the training set, where all of their recordings are used. This prevents information leakage across training, validation, and test splits.
Beyond CV, we incorporate an external test set, following best practices recommended by (Colliot 2023) for brain disorder classification. Specifically, we hold separately all rs‐fMRI data from the Caltech site in the ABIDE I dataset, comprising 37 subjects (18 ASD, 19 NC), to form an independent test set. These subjects are not included in the 10‐fold CV. After completing CV, the remaining ABIDE I data are split into 90% for training and 10% for validation to train VarCoNet and determine the epoch of minimum validation loss. The Caltech data are used solely for final testing.
To ensure robustness, this procedure is repeated 10 times using different random seeds, minimizing the chance that results are influenced by particularly favorable or unfavorable validation splits. Subsequently, both VarCoNet and the best competing method are evaluated on the ABIDE II dataset using the same 10 models (corresponding to the 10 random seeds) previously used for classification of data from the Caltech site.
We also assess prediction stability between VarCoNet and the best competing method. Since the rs‐fMRI data collected at the Caltech site are 5 min long, we use sliding windows of 3 and 4 min to extract three segments per window length, taken from the beginning, middle, and end of the time‐series, yielding six cropped signals per subject. The durations of 3 and 4 min were chosen as they represent plausible acquisition lengths in real‐world rs‐fMRI studies. This analysis aims to test whether a model's prediction for a given subject changes when only a segment of the full signal is used, effectively simulating slightly shorter acquisitions starting at different time points. Ideally, a robust model should maintain consistent predictions across all cropped segments, as the data originate from the same subject and are of realistic duration.
To quantify stability, we record how often the model's decision changes when using these partial signals. This is repeated across all 10 trained models used in the evaluation on the data from the Caltech site, and we report the percentage of instances where prediction inconsistency occurs.
In all cases, we use fixed random seeds to ensure that all methods are trained, validated, and tested on identical data splits.
For model evaluation, we use BCE loss, the area under the receiver operating characteristic curve (AUC), and the F1‐score, three widely used metrics for assessing classification performance. Although BCE is not typically used as a standalone performance metric due to its unbounded nature, it is particularly effective for comparing models evaluated on the same test sets. This is because it directly reflects how well‐calibrated the model's probabilistic outputs are, favoring confidence scores that align with the true class probabilities. AUC quantifies the model's ability to discriminate between ASD and NC subjects across all possible classification thresholds, making it robust to class imbalance. The F1‐score, computed at the optimal decision threshold determined using Youden's index, provides a balanced measure of precision and recall, offering a meaningful summary of classification performance. Paired t‐tests were further used to compare the AUC and F1‐scores of VarCoNet against those of all competing methods.
1.7. Interpretation Approaches
1.7.1. Subject Fingerprinting Interpretation
To better understand the factors underlying fingerprinting performance, we use the ReX toolbox (Xu et al. 2023), which allows visual comparison of methods in terms of intra‐class correlation (ICC) and the gradient flow map of the individual variation field, two key measures of a method's ability to capture meaningful interindividual differences.
ICC quantifies the proportion of between‐subject variation that can be reliably recovered. ICC increases when within‐subject variation is reduced or between‐subject variation is increased. Conceptually, this can be understood by imagining two overlapping distributions, each representing a subject: the distributions can be separated either by narrowing them (reducing within‐subject variation) or by shifting them apart (increasing between‐subject variation). For a visual explanation, see Figure S1.
Practically, for a variable such as the connectivity between two regions across subjects with at least two sessions each, ReX estimates ICC using
| (2) |
where is between‐subject variance and is within‐subject variance. ReX then scatters (x‐axis) against (y‐axis), partitioning the plane into ICC regions that increase counter‐clockwise (see upper panel of Figure 9). Coloring points by method enables direct comparison of ICC across methods.
FIGURE 9.

Subject fingerprinting interpretation using the Rex toolbox. (a–c) Individual variation field and ICC of VarCoNet compared to PCC, Cai et al. (2021) and Lu et al. (2024). (d‐f) The relative change in variation, normalized along the optimal direction, using PCC, Cai et al. (2021) and Lu et al. (2024) as baselines and VarCoNet as the target method.
ReX also provides gradient flow maps to compare a target method against a baseline. These maps show the relative change in within‐subject variation (x‐axis) and in between‐subject variation (y‐axis) (see lower panel of Figure 9) and reveal whether switching from the baseline to the target method to estimate a variable (e.g., connectivity between two brain regions) improves the variable's capacity to capture individual differences. Points in the upper‐left quadrant indicate improved ICC (lower within‐subject and higher between‐subject variation), while points in the lower‐right quadrant indicate deterioration. In the remaining quadrants, points above the diagonal correspond to ICC improvements, and points below the diagonal to declines.
To compare VarCoNet with PCC and the methods of (Cai et al. 2021; Lu et al. 2024), we compute ICC and gradient flow maps using embeddings from all 393 subjects in the test set (each with two sessions), parcellated using the AICHA atlas. A segment length of 2 min is used to create a challenging evaluation scenario. With the 384 regions of the AICHA atlas, we have unique connectivity variables.
1.7.2. ASD Classification Interpretation
To identify the connections most strongly associated with ASD in VarCoNet's learned representations, we derive connection importance directly from the weights of the linear classification layer. This layer has shape , representing connections between all pairs of regions and their contributions to the two output classes (NC and ASD). These weights are split into two vectors, and , of shape , corresponding to the NC and ASD classes, respectively. Feature importance is then computed as , where a positive value indicates that a connection contributes toward classifying a sample as ASD, while a negative value favors the NC class. The absolute value of reflects the strength of that influence.
To ensure robust estimation, this feature importance score is computed for each of the 110 trained linear layers (100 from 10‐fold CV repeated 10 times, and 10 from the external test set, also repeated 10 times). The scores are then averaged across all repetitions, and the top 20 most influential connections are selected based on their absolute importance values. These connections are visualized using BrainNet Viewer (Xia et al. 2013).
1.8. Implementation Details
All experiments were implemented in PyTorch and executed on a single NVIDIA RTX 6000 Ada Generation GPU with 48 GB of VRAM. Our scripts, including rs‐fMRI postprocessing, VarCoNet training, and testing, were written in Python (3.11.8) and are publicly available at https://github.com/CharLamp10/VarCoNet‐V2. To ensure reproducibility, we provide clear instructions on accessing the preprocessed rs‐fMRI data, along with the subject IDs for the training, validation, and testing sets. VarCoNet was trained using the Adam optimizer with the learning rate and batch size specified in Table 2, and a linear warmup cosine annealing learning rate scheduler with 10 warmup epochs.
2. Results
2.1. VarCoNet Hyperparameters
Figure 3 summarizes key findings from the Bayesian hyperparameter optimization procedures. It shows that the optimizer converges toward a concentrated region of the hyperparameter space associated with improved performance, as indicated by yellow lines. For example, in Figure 3b, the number of Transformer encoder layers shows a strong concentration of yellow lines at , a few at , and none at or . Similarly, for the temperature parameter , the optimizer consistently selects low values, as indicated by the increased density of yellow lines at the lower end. Small values produce sharply peaked exponentials in Equation (1), emphasizing hard negatives (samples that are not true pairs but are close in representation space) and forcing positive pairs to be mapped very close together. This enhances the model's ability to capture subject‐specific traits, a desirable property for subject fingerprinting. Although small values are known to produce large gradient magnitudes even for minor sample differences, we observed no instability during training.
FIGURE 3.

Hyperparameter values for each Bayesian optimization trial and the corresponding objective function value. Each of the 125 runs, represented by a curved line, corresponds to a unique combination of , , , batch size, learning rate (), and temperature parameter (). These illustrations reveal two important findings: (1) the Bayesian optimization process converges toward a concentrated region of the hyperparameter space associated with improved performance and (2) there are several parameter combinations yielding substantially worse results, underscoring the importance of performing hyperparameter optimization rather than relying on arbitrary choices. (a) AAL3 atlas. (b) AICHA atlas.
Another finding is that large regions of the hyperparameter space yield substantially worse performance. This is clear from the objective function values in Figure 3a,b, where several lines in the orange‐yellow range underperform compared to the best. For instance, in the AAL3 atlas, the optimal objective function value is around 0.72, while many lines achieve values between 0.5 and 0.6. A similar pattern is observed for the AICHA atlas. These results highlight the importance of systematic hyperparameter optimization, as arbitrary choices can easily lead to sub‐optimal performance.
2.2. VarCoNet Convergence
Figure 4 shows the SimCLR contrastive loss over training epochs for VarCoNet, trained on 931 rs‐fMRI scans from the HCP dataset using both the AAL3 and AICHA atlases. The training curves exhibit a consistently smooth and decreasing loss, suggesting stable optimization and successful convergence. However, in contrastive SSL, convergence of the training loss does not always imply that the model has learned meaningful or transferable representations. To evaluate this, we assess the model's performance on two downstream tasks: subject fingerprinting and ASD classification, as presented below.
FIGURE 4.

Contrastive training loss of VarCoNet (Equation 1) across training epochs, where one epoch corresponds to a complete pass through all 931 rs‐fMRI scans from the HCP dataset. Results are shown for the AAL3 (a) and AICHA (b) atlases.
2.3. Subject Fingerprinting Performance
Figure 5 presents the performance of VarCoNet in subject fingerprinting, alongside two competing DL‐based methods and the conventional PCC across all duration combinations and atlases. Moreover, Table 3 provides the variation in fingerprinting accuracy across the six duration combinations, for all methods and atlases. Further insights are provided in Figure 6, which displays within‐ and between‐subject similarity matrices.
FIGURE 5.

Subject fingerprinting accuracy of VarCoNet compared to PCC and competing DL‐based methods across varying combinations of rs‐fMRI durations from the first and second sessions. (a) AAL3. (b) AICHA.
TABLE 3.
Standard deviation of fingerprinting accuracy (reported as mean standard deviation across 10 repetitions) for the six scan‐duration combinations.
| Method | p against VarCoNet | p against VarCoNet | ||||
|---|---|---|---|---|---|---|
| SD | AAL3 | SD | AICHA | |||
| PCC | 0.25 ± 0.05 |
|
0.17 ± 0.04 |
|
||
| Cai et al. (2021) | 0.27 ± 0.03 |
|
0.21 ± 0.01 |
|
||
| Lu et al. (2024) | 0.22 ± 0.03 |
|
0.08 ± 0.02 |
|
||
| VarCoNet | 0.11 ± 0.02 | — | 0.02 ± 0.01 | — |
Note: The last column reports statistical significance of each competing method against VarCoNet, assessed using paired t‐tests. Variability in fingerprinting accuracy was significantly lower for VarCoNet than the other methods, as indicated in the second and fourth columns of the table.
FIGURE 6.

Within‐ and between‐subject similarity matrices of VarCoNet and competing methods. Top and bottom rows correspond to the AAL3 and AICHA atlases, respectively. Each matrix contains 100 rows and 100 columns, representing 100 subjects from the test set. Rows correspond to the first session and columns to the second session; therefore, diagonal elements represent within‐subject similarities, while off‐diagonal elements represent between‐subject similarities. (a) PCC, AAL3. (b) Cai et al. (2021), AAL3. (c) Lu et al. (2024), AAL3. (d) VarCoNet, AAL3. (e) PCC, AICHA. (f) Cai et al. (2021), AICHA. (g) Lu et al. (2024), AICHA. (h) VarCoNet, AICHA.
As shown in Figure 5, compared to the methods of Lu et al. (2024) and Cai et al. (2021) and the standard PCC, VarCoNet consistently outperforms across all duration combinations and atlases, with particularly strong performance in combinations involving shorter time courses (e.g., 2 min). Two noteworthy trends emerge from Figure 5. First, fingerprinting accuracy improves as the duration increases. Second, except for the method of (Cai et al. 2021), the more fine‐grained functional AICHA atlas generally yields better results than the coarser anatomical AAL3 atlas.
Overall, all methods show a saturation effect, reflected by the diminishing performance gains as duration increases toward the right of the x‐axis. This aligns with prior findings (Finn et al. 2015), which suggest an upper limit on the additional information provided by longer acquisitions. Notably, VarCoNet under the AICHA atlas already achieves near‐perfect fingerprinting accuracy at the 8–8 min duration combination.
Perhaps most importantly, as shown in Table 3, VarCoNet achieves the lowest variability in fingerprinting accuracy across duration combinations, an advantageous property when working with multisite datasets, where differences in scan length should not introduce systematic bias.
Further insights are provided by examining within‐ and between‐subject similarities in Figure 6. The methods of Cai et al. (2021) and Lu et al. (2024) appear to improve fingerprinting primarily by reducing intersubject similarities. In contrast, VarCoNet improves fingerprinting by both reducing within‐subject similarities and increasing between‐subject similarities. As a result, the VarCoNet‐based FCs preserve interindividual variability that reflects useful population‐level characteristics.
2.4. ASD Classification Performance
Table 4 presents the ASD classification results of VarCoNet in comparison to competing DL methods. In addition, Table S1 reports paired statistical comparisons based on two‐sample t‐tests between VarCoNet and each competing approach. VarCoNet consistently outperforms all other approaches, achieving superior performance across evaluation settings and atlases. Specifically, the methods of Riaz et al. (2020), Nguyen et al. (2020), Wang et al. (2023, 2025), Zhang et al. (2023), and Meng et al. (2024), namely DeepFMRI, BAnD, UCGL, A‐GCL, CVFormer, and GCDA perform poorly on ASD classification, with AUC scores close to chance level in both the 10‐fold CV and the external test set. Possible explanations for their low performance are discussed in Section 3.3.
TABLE 4.
ASD classification results on the ABIDE I dataset (mean standard deviation).
| Method | 10‐Fold CV | Ext. test (Caltech) | ||||
|---|---|---|---|---|---|---|
| BCE loss (%) | AUC (%) | F1‐score (%) | BCE loss (%) | AUC (%) | F1‐score (%) | |
| DiFuMo | ||||||
| CSM (Thomas et al. 2022) | 0.664 ± 0.036 | 66.00 ± 4.91 | 64.02 ± 8.09 | 0.716 ± 0.009 | 55.32 ± 1.89 | 59.60 ± 9.12 |
| Volumetric | ||||||
| BAnD (Nguyen et al. 2020) | 0.694 ± 0.004 | 51.62 ± 5.66 | 58.10 ± 15.2 | 0.700 ± 0.007 | 45.85 ± 5.99 | 57.38 ± 12.6 |
| AAL3 | ||||||
| DeepFMRI (Riaz et al. 2020) | 0.692 ± 0.010 | 49.52 ± 4.66 | 52.24 ± 13.9 | 0.695 ± 0.020 | 47.89 ± 9.53 | 49.20 ± 19.2 |
| FBNETGEN (Kan, Cui, et al. 2022) | 0.688 ± 0.028 | 58.02 ± 6.04 | 57.65 ± 10.6 | 0.716 ± 0.054 | 55.32 ± 8.95 | 63.38 ± 9.46 |
| BNT (Kan, Dai, et al. 2022) | 0.703 ± 0.053 | 55.57 ± 6.55 | 56.74 ± 11.2 | 0.698 ± 0.017 | 61.82 ± 4.05 | 42.73 ± 26.4 |
| UCGL (Wang et al. 2023) | 0.703 ± 0.021 | 50.93 ± 6.03 | 52.10 ± 15.3 | 0.712 ± 0.038 | 52.8 ± 10.24 | 53.92 ± 12.2 |
| A‐GCL (Zhang et al. 2023) | 0.691 ± 0.007 | 52.31 ± 7.61 | 51.53 ± 17.1 | 0.697 ± 0.011 | 47.78 ± 11.68 | 45.56 ± 27.7 |
| BolT (Bedel et al. 2023) | 0.663 ± 0.026 | 66.36 ± 4.70 | 64.72 ± 5.75 | 0.728 ± 0.067 | 55.70 ± 4.32 | 64.83 ± 4.11 |
| CVFormer (Meng et al. 2024) | 0.730 ± 0.036 | 52.53 ± 5.94 | 50.88 ± 16.1 | 0.713 ± 0.048 | 53.52 ± 10.4 | 51.47 ± 10.7 |
| BrainIB (Zheng et al. 2025) | 0.682 ± 0.021 | 59.54 ± 6.21 | 58.63 ± 12.8 | 0.720 ± 0.029 | 46.49 ± 4.10 | 40.37 ± 25.7 |
| GCDA (Wang et al. 2025) | 0.708 ± 0.039 | 54.10 ± 6.70 | 54.05 ± 13.1 | 0.754 ± 0.053 | 41.61 ± 10.8 | 48.3 ± 24.2 |
| VarCoNet | 0.633 ± 0.030 | 69.91 ± 4.74 | 67.54 ± 5.25 | 0.653 ± 0.025 | 67.22 ± 3.71 | 73.63 ± 3.33 |
| AICHA | ||||||
| DeepFMRI (Riaz et al. 2020) | 0.698 ± 0.010 | 48.62 ± 7.11 | 45.82 ± 20.1 | 0.703 ± 0.010 | 51.40 ± 13.9 | 61.43 ± 16.4 |
| FBNETGEN (Kan, Cui, et al. 2022) | 0.691 ± 0.042 | 60.43 ± 6.63 | 60.87 ± 7.72 | 0.791 ± 0.116 | 51.64 ± 10.1 | 53.92 ± 19.8 |
| BNT (Kan, Dai, et al. 2022) | 0.696 ± 0.025 | 51.76 ± 7.55 | 54.11 ± 14.5 | 0.702 ± 0.016 | 59.78 ± 10.3 | 50.97 ± 21.8 |
| UCGL (Wang et al. 2023) | 0.715 ± 0.029 | 51.38 ± 6.37 | 49.02 ± 16.9 | 0.732 ± 0.032 | 47.78 ± 6.49 | 53.69 ± 18.1 |
| A‐GCL (Zhang et al. 2023) | 0.692 ± 0.007 | 51.00 ± 5.99 | 51.89 ± 16.9 | 0.693 ± 0.003 | 54.06 ± 16.0 | 47.53 ± 19.8 |
| BolT (Bedel et al. 2023) | 0.655 ± 0.036 | 69.23 ± 4.59 | 66.08 ± 6.57 | 0.685 ± 0.018 | 61.40 ± 5.31 | 67.27 ± 6.84 |
| CVFormer (Meng et al. 2024) | 0.742 ± 0.053 | 52.87 ± 5.88 | 52.96 ± 13.7 | 0.744 ± 0.066 | 51.55 ± 8.40 | 51.85 ± 8.32 |
| BrainIB (Zheng et al. 2025) | 0.677 ± 0.021 | 61.07 ± 6.20 | 60.42 ± 11.42 | 0.701 ± 0.021 | 53.89 ± 4.90 | 50.55 ± 18.7 |
| GCDA (Wang et al. 2025) | 0.710 ± 0.039 | 52.13 ± 7.02 | 51.19 ± 16.1 | 0.751 ± 0.082 | 52.72 ± 8.52 | 62.86 ± 6.49 |
| VarCoNet | 0.612 ± 0.036 | 72.62 ± 4.70 | 68.47 ± 5.62 | 0.650 ± 0.032 | 67.02 ± 5.04 | 71.41 ± 4.05 |
Note: Boldface indicates the best‐performing method for each metric.
The transformer model trained with the CSM framework (Thomas et al. 2022), fine‐tuned for ASD classification, shows moderate performance, consistently lower than VarCoNet across both evaluation settings and atlases. Similar moderate results are observed for FBNETGEN (Kan, Cui, et al. 2022), BNT (Kan, Dai, et al. 2022), and BrainIB (Zheng et al. 2025). Among existing approaches, BolT (Bedel et al. 2023) achieves the closest performance to VarCoNet, though the performance of BolT remains lower than that of VarCoNet.
Using the AAL3 atlas, VarCoNet achieves lower BCE loss than BolT in both the 10‐fold CV and the external test set. In the 10‐fold CV, VarCoNet improves AUC and F1‐score by approximately 3%. These gains become more pronounced in the external test set, reaching around 12% in AUC and 9% in F1‐score. Similar trends are observed with the AICHA atlas: under 10‐fold CV, VarCoNet shows improvements of roughly 3% in both AUC and F1‐score compared to BolT, which increase to about 5.5% and 4%, respectively, in the external test set. In all cases, VarCoNet also maintains consistently lower BCE loss than BolT. While both methods appear to benefit from the more fine‐grained AICHA atlas, these improvements are not statistically significant given the standard deviations.
Table 5 presents the performance of VarCoNet and its closest competitor, BolT, on 579 subjects from the independent ABIDE II dataset. Moreover, Table S2 reports the paired statistical comparisons based on two‐sample t‐tests between VarCoNet and BolT. Without fine‐tuning, VarCoNet consistently outperforms BolT across both atlases, achieving a BCE loss nearly half that of BolT, along with AUC improvements of approximately 6.5% (AAL3) and 5.5% (AICHA), and F1‐score gains of about 9% (AAL3) and 6% (AICHA). The much higher BCE loss of BolT indicates frequent high‐confidence misclassifications, a critical weakness in medical applications where predictive reliability is essential. By contrast, VarCoNet maintains BCE loss values consistent with those observed in 10‐fold CV and Caltech test evaluations. In addition, VarCoNet shows around 10% (AAL3) and 6% (AICHA) greater consistency when tested on different rs‐fMRI signal segments, further underscoring its robustness.
TABLE 5.
ASD classification results of BolT and VarCoNet on the ABIDE II dataset (mean standard deviation), along with the prediction change percentage on the Caltech subset of ABIDE I.
| Method | BCE loss (%) | AUC (%) | F1‐score (%) | Pred. change (%) |
|---|---|---|---|---|
| AAL | ||||
| BolT (Bedel et al. 2023) | 1.243 ± 0.076 | 61.58 ± 0.77 | 52.53 ± 4.74 | 21.53 |
| VarCoNet | 0.639 ± 0.007 | 68.42 ± 1.12 | 61.57 ± 2.17 | 11.40 |
| AICHA | ||||
| BolT (Bedel et al. 2023) | 1.050 ± 0.050 | 67.28 ± 1.15 | 59.10 ± 3.40 | 23.96 |
| VarCoNet | 0.609 ± 0.011 | 73.10 ± 1.30 | 65.01 ± 2.08 | 18.06 |
Note: Boldface indicates the best‐performing method for each metric.
2.5. Ablations
Figures 7 and 8 show the ablation results for the HCP and ABIDE I datasets, respectively. Detailed findings for each ablated parameter are provided below.
FIGURE 7.

Ablation studies on HCP. Top and bottom rows correspond to the AAL3 and AICHA atlases, respectively. (a, d) evaluate the effect of removing the transformer (yielding a 1D‐CNN‐only encoder); (b, e) assess the effect of removing the 1D‐CNN (yielding a transformer‐only encoder); (c, f) compare the proposed augmentation method with that of (Wang et al. 2023). Asterisks above the bars indicate statistical significance: ****, ***, **, *, ns, .
FIGURE 8.

Ablation studies on ABIDE I. Top and bottom rows correspond to the AAL3 and AICHA atlases, respectively. (a, e) test supervised training of the 1D‐CNN‐transformer encoder instead of using the VarCoNet framework; (b, f) assess the effect of removing the transformer (1D‐CNN‐based encoder); (c, g) evaluate the effect of removing the 1D‐CNN (transformer‐only encoder); (d, h) compare the proposed augmentation method with that of (Wang et al. 2023). Y‐axis (score) represents different metrics for each pair of barplots: BCE loss, AUC, and F1‐score, respectively. The asterisks above the bars indicate statistical significance: ****, ***, **, *, ns, .
2.5.1. Influence of Contrastive SSL
Figure 8a,e shows the effect of training the 1D‐CNN‐Transformer encoder within the contrastive SSL‐based VarCoNet framework, compared to conventional SL, for ASD classification with the AAL3 and AICHA atlases. Across both atlases and all metrics, VarCoNet consistently outperforms its supervised counterpart, with statistical significance except for the F1‐score on the AAL3 atlas.
The superior performance is attributed to the richer embeddings produced by VarCoNet (i.e., VarCoNet‐based FCs). These embeddings are not optimized solely for ASD classification but instead capture broader neurophysiological features that distinguish individuals, including, but not limited to, the presence of ASD. As a result, the learned representations are more generalizable and versatile, reflecting individual variability in brain connectivity.
Finally, by relying on SSL, VarCoNet can be extended to diverse downstream tasks beyond brain disorder classification without requiring task‐specific retraining. These findings align with prior studies (Zagoruyko and Komodakis 2016; Ericsson et al. 2021; Karthik et al. 2021).
2.5.2. Influence of Transformer
Figure 7a,d shows the effect of replacing the combined 1D‐CNN‐Transformer encoder with a 1D‐CNN architecture (as in Lamprou et al. (2025) and Kan, Cui, et al. (2022)) on subject‐fingerprinting accuracy using the AAL3 and AICHA atlases, respectively. Similarly, Figure 8b,f presents the corresponding results for ASD classification.
For subject fingerprinting, incorporating the transformer is critical, as it substantially increases accuracy across all duration combination settings. Significant gains are also observed in ASD classification, where the combined 1D‐CNN‐transformer consistently outperforms the 1D‐CNN baseline across all metrics and atlases, with results that are statistically significant. This ablation study establishes the Transformer as an essential component of VarCoNet.
2.5.3. Influence of 1D‐CNN
Figure 7b,e illustrates the effect of using a combined 1D‐CNN‐Transformer encoder, as opposed to a Transformer alone, on subject‐fingerprinting accuracy with the AAL3 and AICHA atlases, respectively. The corresponding impact on ASD classification performance is shown in Figure 8c,g.
For subject fingerprinting, adding the 1D‐CNN before the Transformer is particularly advantageous for shorter time courses (2–2, 2–5, and 2–8 min), where it yields substantial gains in fingerprinting accuracy. For ASD classification, the 1D‐CNN also provides significant improvements: across all metrics when using the AICHA atlas, and specifically for F1‐score when using the AAL3 atlas. Beyond accuracy, the 1D‐CNN improves training and inference efficiency. By reducing the temporal dimension, it decreases the computational load of the Transformer by limiting the number of attention operations, which leads to faster training and inference and lower memory usage. Empirical observations further indicate that models incorporating the 1D‐CNN converge more quickly and consistently.
In summary, inserting a 1D‐CNN before the Transformer enhances performance while also improving efficiency and stability. This ablation study establishes the 1D‐CNN as a key component of VarCoNet.
2.5.4. Influence of Augmentation Method
Figure 7c,f shows the effect of replacing the proposed augmentation method with that of the UCGL framework (Wang et al. 2023) on subject fingerprinting accuracy using the AAL3 and AICHA atlases, respectively. Likewise, Figure 8d,h presents the corresponding results for ASD classification.
For subject fingerprinting, the proposed augmentation provides clear gains in accuracy across both atlases and all duration combinations. With the AICHA atlas, improvements are statistically significant for all durations, while with the AAL3 atlas, significance is observed for combinations involving the shortest duration (2 min). The augmentation also benefits ASD classification: for the AAL3 atlas, all metrics improve, with a statistically significant gain in F1‐score; for the AICHA atlas, all metrics improve, with significance in loss and AUC.
Overall, this ablation confirms the importance of the proposed augmentation scheme and establishes the proposed augmentation as a core element of VarCoNet.
3. Discussion and Conclusion
3.1. Results Interpretation
3.1.1. Subject Fingerprinting Interpretation
Figure 9a–c presents the within‐ versus between‐subject variation scatter‐plots, comparing the ICC values of VarCoNet to those of PCC, Cai et al. (2021) and Lu et al. (2024), respectively. Across all comparisons, VarCoNet substantially reduces within‐subject variation while enhancing between‐subject variation, leading to a more favorable within‐ to between‐subject variation ratio, indicated by the presence of more orange points within planes of higher ICC values. These effects are more clearly observed in the corresponding gradient flow maps in Figure 9d–f. Across all three comparisons, the ICC consistently improves when switching to VarCoNet, as evidenced by the majority of points lying above the diagonal (bottom left to upper right), indicating meaningful gains in capturing individual‐specific signal. Indeed, all three scatter‐plots have several points within the upper left quadrant, which is associated with both decrease of within‐subject variation and increase of between‐subject variation.
3.1.2. ASD Classification Interpretation
Figure 10 displays the top 20 connections most influential for ASD classification using the best‐performing atlas (AICHA). Overall, the relevant connections for a successful distinction between a neurotypical and an ASD subject are in line with previous rs‐fMRI studies, including functional connections between temporo‐parietal regions involved in social cognition (Numssen et al. 2021; Schurz et al. 2017) and other frontal cortices identified in previous neuroimaging studies (Kaiser et al. 2010; Horien et al. 2022).
FIGURE 10.

Visualization of the most informative brain region connections for ASD classification. (a–c) The top 20 connections identified using the AICHA atlas, visualized in axial, coronal, and sagittal views, respectively.
3.2. From Contrastive Learning to Precision Medicine
While contrastive learning has been previously applied to rs‐fMRI for ASD classification (Zhang et al. 2023; Peng et al. 2022; Wang et al. 2023, 2025), our work provides the first systematic demonstration that contrastive objectives generalize across diverse fMRI tasks. SimCLR‐based contrastive learning naturally aligns with the notion of interindividual variability: it enforces similarity across augmented views of the same subject while maximizing dissimilarity across subjects, thereby promoting individualized representations. Building on the importance of taking into account interindividual variability (Seghier and Price 2018), VarCoNet is underpinned by a robust architecture and augmentation strategy designed to enhance subject‐specific features.
To validate that the learned embeddings capture meaningful individual fingerprints, VarCoNet is first evaluated on the subject‐fingerprinting task. It is then assessed on ASD classification to test whether representations that encode interindividual variability also improve discriminability between clinical populations. VarCoNet consistently outperforms its supervised counterpart and numerous DL baselines, providing strong empirical evidence for both its robustness and its relevance to precision medicine.
3.3. Performance of ASD Baselines
As presented in Section 2.4, some competing methods performed poorly in ASD classification, with AUC scores close to chance level or underperforming relative to their original implementations. Several factors may explain these outcomes. First, for methods that did not provide codes (Riaz et al. 2020; Meng et al. 2024), implementation discrepancies may have contributed to the reduced performance. Although considerable effort was made to accurately replicate the models based on the descriptions provided in the original publications, ensuring an exact replication is not straightforward given the large number of hyperparameters and implementation details that can significantly affect the performance of DL models.
Another possible factor is that some methods (Riaz et al. 2020; Bedel et al. 2023; Wang et al. 2023, 2025; Meng et al. 2024) were trained and tested only on single‐site or two‐site subsets of the ABIDE I dataset rather than on the entire dataset. Such subsets are often more “friendly” to DL models, as they exhibit less variability compared to multisite data. This reduced variability can improve performance for models trained on a single site, as they do not need to generalize across the greater variability present in multisite datasets.
Finally, the use of the ICA‐AROMA pipeline (Pruim et al. 2015) for motion artifact removal may have contributed to the performance gap between VarCoNet and competing methods. In our study, all methods were assessed on identically preprocessed data using fMRIPrep followed by ICA‐AROMA. By contrast, the original implementations of the competing methods did not employ comparably advanced motion correction strategies. Motion is well known to degrade rs‐fMRI data quality, while standard corrections such as 24‐parameter regression or spike regression are often inadequate. This issue is particularly critical in ASD studies, as individuals with ASD typically exhibit higher motion during scanning than NCs. Consequently, models lacking advanced motion correction strategies, such as ICA‐AROMA or ICA‐FIX (Griffanti et al. 2014), risk learning motion‐related features rather than true neural patterns, thereby introducing bias that can inadvertently boost classification results, because the presence and severity of motion are expected to vary with class (ASD vs. NC).
3.4. Varconet's ASD Classification Performance
The performance of VarCoNet in ASD classification is particularly notable given the heterogeneity of the datasets and the fact that it operates without label information during training. As highlighted by our ablation studies, VarCoNet's contrastive SSL‐based framework consistently outperforms traditional supervised learning. While this might initially seem counterintuitive, prior research has demonstrated that SSL frameworks often outperform supervised learning in various downstream tasks, including classification (Ericsson et al. 2021; Karthik et al. 2021). This advantage stems from the tendency of supervised models to overfit to label‐specific features, a phenomenon known as “attentive overfitting” (Zagoruyko and Komodakis 2016), whereas SSL models are less susceptible to this issue (Ericsson et al. 2021).
From a clinical perspective, ASD represents a broad spectrum of deficit types and severity, and thus a single cutoff‐based label may not adequately capture the heterogeneity of these deficits across individuals (Chapman and Veit 2020). This challenge can limit the effectiveness of supervised models, which depend on clearly defined classes. In contrast, VarCoNet employs a contrastive learning approach focused on distinguishing individual subjects, enabling it to learn subtle differences across various factors such as age, cognitive behavior, and the presence of disorders like ASD. The VarCoNet‐based FCs thus provide an ASD‐aware representation, which is further refined by the linear layer for classification. This approach enhances the model's ability to robustly distinguish between ASD and NC.
3.5. Implication, Limitations, and Future Work
Our work has several important implications. First, due to its SSL design, VarCoNet provides a general framework for extracting robust FC from rs‐fMRI data without relying on labels. This is particularly valuable in medicine, where collecting large volumes of labeled rs‐fMRI data is often difficult, expensive, and requires expert annotation. VarCoNet addresses this challenge by enabling training on unlabeled rs‐fMRI data and subsequent application to downstream tasks with minimal or no fine‐tuning. To support this, we release our trained model weights and implementation code. Second, as demonstrated here, VarCoNet is significantly more robust than both conventional PCC and other DL methods when processing short rs‐fMRI acquisitions. This makes it especially useful for clinical use, where shorter scans reduce costs and improve tolerability, particularly for children and individuals with ASD. Finally, VarCoNet's resilience to short rs‐fMRI durations makes it well‐suited for scenarios such as those described by (Fair et al. 2007), where brief “interleaved” resting blocks within task‐based fMRI are repurposed for resting‐state analysis. Since the residual signal following removal of task‐related segments is often limited, VarCoNet's ability to extract meaningful FC from short time series enables effective use of these datasets.
We acknowledge two limitations in the current implementation of our framework. First, although VarCoNet outputs FC matrices that can highlight important connections between brain regions, it still faces inherent issues associated with interpreting DL models applied to rs‐fMRI signals, namely, their complexity, non‐stationarity, existing artifacts, high dimensionality, and lack of meaning (unlike, for example, task‐induced variations in fMRI, Seghier and Price 2009). These issues hinder direct human interpretability. The use of Transformer architectures compounds this issue, as the underlying attention mechanisms are more opaque and harder to intuitively interpret than more straightforward models such as 1D‐CNNs. The second limitation is that VarCoNet was implemented to process rs‐fMRI data with a specific TR of 1.5 s. Standardizing all input data to this TR via resampling was needed because Transformers require input tokens of consistent temporal meaning. However, this resampling may introduce small interpolation errors or slightly alter the temporal properties of fMRI signals acquired at TRs very different from our selected TR of 1.5 s.
Future research could focus on how effectively VarCoNet extracts neural features that indicate individual traits. The method is designed to boost differences between individuals and reduce within‐subject variability, making it well‐suited for identifying stable individual characteristics. Assessing the consistency with which VarCoNet captures neural signatures across a range of clinical populations and conditions is essential for its application to rs‐fMRI data from individuals with various brain disorders. Moreover, future implementations should eliminate the need to resample input data to a fixed TR. Potential solutions include incorporating TR as an explicit input to the model or designing multiple 1D‐CNNs with varied kernel sizes to ensure consistent temporal interpretation across different sampling rates.
4. Conclusion
This study presents VarCoNet, a contrastive SSL framework designed to extract robust FCs in light of the existing functional interindividual variability. VarCoNet integrates a 1D‐CNN‐Transformer encoder, optimized via Bayesian search, for advanced processing of rs‐fMRI time‐series, along with a refined augmentation strategy that favors the learning of meaningful representations. Extensive evaluations on the HCP, ABIDE I, and ABIDE II datasets show that VarCoNet consistently outperforms prior methods in both subject fingerprinting and ASD classification. In‐depth ablation studies confirm the model's robustness and stability, while interpretability analyses identify brain region connections linked to enhanced discrimination between individuals with ASD and neurotypicals. Taken together, these findings underscore the importance of modeling interindividual variability in FCs to advance precision medicine. By emphasizing subject‐specific connectivity patterns, VarCoNet can serve as a robust and versatile rs‐fMRI encoder for diverse tasks.
Author Contributions
Charalampos Lamprou: conceptualization (lead), formal analysis (lead), methodology (lead), software (lead), validation (lead), original draft preparation (lead), review and editing (equal). Aamna Alshehhi: supervision, review and editing (equal). Leontios J. Hadjileontiadis: conceptualization, supervision, review and editing (equal). Mohamed L. Seghier: conceptualization, funding acquisition (lead), project administration (lead), supervision (lead), review and editing (equal).
Funding
This work was supported by Khalifa University of Science, Technology and Research, RC2‐2018‐022.
Conflicts of Interest
The authors declare no conflicts of interest.
Supporting information
Data S1: hbm70469‐sup‐0001‐supplementary_material.pdf.
Acknowledgments
This study was supported by Khalifa University of Science and Technology (grant number RC2‐2018‐022).
Endnotes
The name VarCoNet is derived from the first letters of three keywords: Variability, Connectivity, and Network.
Contributor Information
Charalampos Lamprou, Email: xaralabos10@hotmail.gr.
Mohamed L. Seghier, Email: mseghier@gmail.com.
Data Availability Statement
The data that support the findings of this study are openly available in VarCoNet‐V2 at https://github.com/CharLamp10/VarCoNet‐V2.
References
- Baevski, A. , Zhou Y., Mohamed A., and Auli M.. 2020. “wav2vec 2.0: A Framework for Self‐Supervised Learning of Speech Representations.” In Advances in Neural Information Processing Systems, edited by H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, 12449–12460. Curran Associates Inc. [Google Scholar]
- Bedel, H. A. , Sivgin I., Dalmaz O., Dar S. U., and Çukur T.. 2023. “BolT: Fused Window Transformers for fMRI Time Series Analysis.” Medical Image Analysis 88: 102841. 10.1016/j.media.2023.102841. [DOI] [PubMed] [Google Scholar]
- Birn, R. M. , Molloy E. K., Patriat R., et al. 2013. “The Effect of Scan Length on the Reliability of Resting‐State fMRI Connectivity Estimates.” NeuroImage 83: 550–558. 10.1016/j.neuroimage.2013.05.099. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Cai, B. , Zhang G., Zhang A., et al. 2021. “Functional Connectome Fingerprinting: Identifying Individuals and Predicting Cognitive Functions via Autoencoder.” Human Brain Mapping 42, no. 9: 2691–2705. 10.1002/hbm.25394. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chapman, R. , and Veit W.. 2020. “Representing the Autism Spectrum.” American Journal of Bioethics 20, no. 4: 46–48. 10.1080/15265161.2020.1730495. [DOI] [PubMed] [Google Scholar]
- Chen, T. , Kornblith S., Norouzi M., and Hinton G.. 2020. “A Simple Framework for Contrastive Learning of Visual Representations.” In International Conference on Machine Learning, edited by Hal Daumé III and Aarti Singh, 1597–1607. Proceedings of Machine Learning Research (PMLR). [Google Scholar]
- Colliot, O. 2023. Machine Learning for Brain Disorders. Springer Nature. [Google Scholar]
- Demeter, D. V. , and Greene D. J.. 2025. “The Promise of Precision Functional Mapping for Neuroimaging in Psychiatry.” Neuropsychopharmacology 50, no. 1: 16–28. 10.1038/s41386-024-01941-z. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Di Martino, A. , O'Connor D., Chen B., et al. 2017. “Enhancing Studies of the Connectome in Autism Using the Autism Brain Imaging Data Exchange Ii.” Scientific Data 4, no. 1: 1–15. 10.1038/sdata.2017.10. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Di Martino, A. , Yan C.‐G., Li Q., et al. 2014. “The Autism Brain Imaging Data Exchange: Towards a Large‐Scale Evaluation of the Intrinsic Brain Architecture in Autism.” Molecular Psychiatry 19, no. 6: 659–667. 10.1038/mp.2013.78. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Efron, B. , and Tibshirani R. J.. 1994. An Introduction to the Bootstrap. Chapman and Hall/CRC. [Google Scholar]
- Ericsson, L. , Gouk H., and Hospedales T. M.. 2021. “How Well Do Self‐Supervised Models Transfer?” In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 5414–5423. IEEE. [Google Scholar]
- Esteban, O. , Markiewicz C. J., Blair R. W., et al. 2019. “fMRIPrep: A Robust Preprocessing Pipeline for Functional MRI.” Nature Methods 16, no. 1: 111–116. 10.1038/s41592-018-0235-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Fair, D. A. , Schlaggar B. L., Cohen A. L., et al. 2007. “A Method for Using Blocked and Eventrelated fMRI Data to Study “Resting State” Functional Connectivity.” NeuroImage 35, no. 1: 396–405. 10.1016/j.neuroimage.2006.11.051. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Finn, E. S. , and Constable R. T.. 2016. “Individual Variation in Functional Brain Connectivity: Implications for Personalized Approaches to Psychiatric Disease.” Dialogues in Clinical Neuroscience 18, no. 3: 277–287. 10.31887/DCNS.2016.18.3/efinn. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Finn, E. S. , Shen X., Scheinost D., et al. 2015. “Functional Connectome Fingerprinting: Identifying Individuals Using Patterns of Brain Connectivity.” Nature Neuroscience 18, no. 11: 1664–1671. 10.1038/nn.4135. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Friston, K. J. 2011. “Functional and Effective Connectivity: A Review.” Brain Connectivity 1, no. 1: 13–36. 10.1089/brain.2011.000. [DOI] [PubMed] [Google Scholar]
- Friston, K. J. , Kahan J., Biswal B., and Razi A.. 2014. “A DCM for Resting State fMRI.” NeuroImage 94: 396–407. 10.1016/j.neuroimage.2013.12.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Glasser, M. F. , Sotiropoulos S. N., Wilson J. A., et al. 2013. “The Minimal Preprocessing Pipelines for the Human Connectome Project.” NeuroImage 80: 105–124. 10.1016/j.neuroimage.2013.04.127. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Griffanti, L. , Salimi‐Khorshidi G., Beckmann C. F., et al. 2014. “Ica‐Based Artefact Removal and Accelerated fMRI Acquisition for Improved Resting State Network Imaging.” NeuroImage 95: 232–247. 10.1016/j.neuroimage.2014.03.034. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gu, J. , and Kanai R.. 2014. “What Contributes to Individual Differences in Brain Structure?” Frontiers in Human Neuroscience 8: 262. 10.3389/fnhum.2014.00262. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Horien, C. , Floris D. L., Greene A. S., et al. 2022. “Functional Connectome–Based Predictive Modeling in Autism.” Biological Psychiatry 92, no. 8: 626–642. 10.1016/j.biopsych.2022.04.008. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Horwitz, B. 2003. “The Elusive Concept of Brain Connectivity.” NeuroImage 19, no. 2: 466–470. 10.1016/s1053-8119(03)00112-5. [DOI] [PubMed] [Google Scholar]
- Joliot, M. , Jobard G., Naveau M., et al. 2015. “AICHA: An Atlas of Intrinsic Connectivity of Homotopic Areas.” Journal of Neuroscience Methods 254: 46–59. 10.1016/j.jneumeth.2015.07.013. [DOI] [PubMed] [Google Scholar]
- Kaiser, M. D. , Hudac C. M., Shultz S., et al. 2010. “Neural Signatures of Autism.” Proceedings of the National Academy of Sciences of the United States of America 107, no. 49: 21223–21228. 10.1073/pnas.1010412107. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kan, X. , Cui H., Lukemire J., Guo Y., and Yang C.. 2022. “FBNETGEN: Task‐Aware GNN‐Based fMRI Analysis via Functional Brain Network Generation.” In International Conference on Medical Imaging With Deep Learning, edited by Ender Konukoglu, Bjoern Menze, Archana Venkataraman, Christian Baumgartner, Qi Dou, and Shadi Albarqouni, 618–637. Proceedings of Machine Learning Research (PMLR). [PMC free article] [PubMed] [Google Scholar]
- Kan, X. , Dai W., Cui H., Zhang Z., Guo Y., and Yang C.. 2022. “Brain Network Transformer.” In Advances in Neural Information Processing Systems, edited by S. Koyejo and S. Mohamed and A. Agarwal and D. Belgrave and K. Cho and A. Oh, 25586–25599. Curran Associates, Inc. [Google Scholar]
- Karthik, A. , Wu M., Goodman N., and Tamkin A.. 2021. “Tradeoffs Between Contrastive and Supervised Learning: An Empirical Study.” Preprint, arXiv. https://arxiv.org/abs/2112.05340.
- Kohavi, R. 1995. “A Study of Cross‐Validation and Bootstrap for Accuracy Estimation and Model Selection.” In IJCAI'95: Proceedings of the 14th International Joint Conference on Artificial Intelligence, edited by Chris S. Mellish, 1137–1145. Morgan Kaufmann Publishers. [Google Scholar]
- Kosslyn, S. M. , Cacioppo J. T., Davidson R. J., et al. 2002. “Bridging Psychology and Biology: The Analysis of Individuals in Groups.” American Psychologist 57, no. 5: 341. 10.1037/0003-066X.57.5.341. [DOI] [PubMed] [Google Scholar]
- Lamprou, C. , Hadjileontiadis L. J., AlShehhi A., and Seghier M. L.. 2025. “Improved Brain Disorder Classification in RS‐FMRI via Inter‐Individual Variability Characterization: A Self‐Supervised Learning Approach.” In 2025 IEEE 22nd International Symposium on Biomedical Imaging (ISBI), 1–5. IEEE. 10.1109/ISBI60581.2025.10981209. [DOI] [Google Scholar]
- Laumann, T. O. , Snyder A. Z., Mitra A., et al. 2017. “On the Stability of Bold fMRI Correlations.” Cerebral Cortex 27, no. 10: 4719–4732. 10.1093/cercor/bhw265. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lu, J. , Yan T., Yang L., et al. 2024. “Brain Fingerprinting and Cognitive Behavior Predicting Using Functional Connectome of High Intersubject Variability.” NeuroImage 295: 120651. 10.1016/j.neuroimage.2024.120651. [DOI] [PubMed] [Google Scholar]
- Malkiel, I. , Rosenman G., Wolf L., and Hendler T.. 2022. “Self‐Supervised Transformers for fMRI Representation.” In International Conference on Medical Imaging With Deep Learning, edited by Ender Konukoglu, Bjoern Menze, Archana Venkataraman, Christian Baumgartner, Qi Dou, and Shadi Albarqouni, 895–913. Proceedings of Machine Learning Research (PMLR). [Google Scholar]
- Meng, X. , Wei W., Liu Q., Wang Y., Li M., and Wang L.. 2024. “Cvformer: Cross‐View Transformers With Pre‐Training for fMRI Analysis of Human Brain.” Pattern Recognition Letters 186: 85–90. 10.1016/j.patrec.2024.09.010. [DOI] [Google Scholar]
- Mennes, M. , Kelly C., Zuo X.‐N., et al. 2010. “Inter‐Individual Differences in Resting‐State Functional Connectivity Predict Task‐Induced Bold Activity.” NeuroImage 50, no. 4: 1690–1701. 10.1016/j.neuroimage.2010.01.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Miezin, F. , Maccotta L., Ollinger J., Petersen S., and Buckner R.. 2000. “Characterizing the Hemodynamic Response: Effects of Presentation Rate, Sampling Procedure, and the Possibility of Ordering Brain Activity Based on Relative Timing.” NeuroImage 11, no. 6: 735–759. 10.1006/nimg.2000.0568. [DOI] [PubMed] [Google Scholar]
- Miller, M. B. , Donovan C.‐L., Bennett C. M., Aminoff E. M., and Mayer R. E.. 2012. “Individual Differences in Cognitive Style and Strategy Predict Similarities in the Patterns of Brain Activity Between Individuals.” NeuroImage 59, no. 1: 83–93. 10.1016/j.neuroimage.2011.05.060. [DOI] [PubMed] [Google Scholar]
- Miller, M. B. , Van Horn J. D., Wolford G. L., et al. 2002. “Extensive Individual Differences in Brain Activations Associated With Episodic Retrieval Are Reliable Over Time.” Journal of Cognitive Neuroscience 14, no. 8: 1200–1214. 10.1162/089892902760807203. [DOI] [PubMed] [Google Scholar]
- Nguyen, S. , Ng B., Kaplan A. D., and Ray P.. 2020. “Attend and Decode: 4D fMRI Task State Decoding Using Attention Models.” In Machine Learning for Health, edited by Emily Alsentzer, Matthew B. A. McDermott, Fabian Falck, Suproteem K. Sarkar, Subhrajit Roy, and Stephanie L. Hyland, 267–279. Proceedings of Machine Learning Research (PMLR). [Google Scholar]
- Numssen, O. , Bzdok D., and Hartwigsen G.. 2021. “Functional Specialization Within the Inferior Parietal Lobes Across Cognitive Domains.” eLife 10: e63591. 10.7554/eLife.63591. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Peng, L. , Wang N., Xu J., Zhu X., and Li X.. 2022. “Gate: Graph Cca for Temporal Self‐Supervised Learning for Label‐Efficient fMRI Analysis.” IEEE Transactions on Medical Imaging 42, no. 2: 391–402. 10.1109/TMI.2022.3201974. [DOI] [PubMed] [Google Scholar]
- Poldrack, R. A. , Laumann T. O., Koyejo O., et al. 2015. “Long‐Term Neural and Physiological Phenotyping of a Single Human.” Nature Communications 6, no. 1: 8885. 10.1038/ncomms9885. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Pruim, R. H. , Mennes M., van Rooij D., Llera A., Buitelaar J. K., and Beckmann C. F.. 2015. “Ica‐Aroma: A Robust Ica‐Based Strategy for Removing Motion Artifacts From fMRI Data.” NeuroImage 112: 267–277. 10.1016/j.neuroimage.2015.02.064. [DOI] [PubMed] [Google Scholar]
- Raschka, S. 2018. “Model Evaluation, Model Selection, and Algorithm Selection in Machine Learning.” Preprint, arXiv. https://arxiv.org/abs/1811.12808.
- Riaz, A. , Asad M., Alonso E., and Slabaugh G.. 2020. “DeepFMRI: End‐to‐End Deep Learning for Functional Connectivity and Classification of Adhd Using fMRI.” Journal of Neuroscience Methods 335: 108506. 10.1016/j.jneumeth.2019.108506. [DOI] [PubMed] [Google Scholar]
- Rolls, E. T. , Huang C.‐C., Lin C.‐P., Feng J., and Joliot M.. 2020. “Automated Anatomical Labelling Atlas 3.” NeuroImage 206: 116189. 10.1016/j.neuroimage.2019.116189. [DOI] [PubMed] [Google Scholar]
- Schurz, M. , Tholen M. G., Perner J., Mars R. B., and Sallet J.. 2017. “Specifying the Brain Anatomy Underlying Temporo‐Parietal Junction Activations for Theory of Mind: A Review Using Probabilistic Atlases From Different Imaging Modalities.” Human Brain Mapping 38, no. 9: 4788–4805. 10.1002/hbm.23675. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Seghier, M. L. , and Price C. J.. 2009. “Dissociating Functional Brain Networks by Decoding the Betweensubject Variability.” NeuroImage 45, no. 2: 349–359. 10.1016/j.neuroimage.2008.12.017. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Seghier, M. L. , and Price C. J.. 2018. “Interpreting and Utilising Intersubject Variability in Brain Function.” Trends in Cognitive Sciences 22, no. 6: 517–530. 10.1016/j.tics.2018.03.003. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Shinn, M. , Hu A., Turner L., et al. 2023. “Functional Brain Networks Reflect Spatial and Temporal Autocorrelation.” Nature Neuroscience 26, no. 5: 867–878. 10.1038/s41593-023-01299-3. [DOI] [PubMed] [Google Scholar]
- Snoek, J. , Rippel O., Swersky K., et al. 2015. “Scalable Bayesian Optimization Using Deep Neural Networks.” In International Conference on Machine Learning, edited by Francis Bach and David Blei, 2171–2180. Proceedings of Machine Learning Research (PMLR). [Google Scholar]
- Tavor, I. , Jones O. P., Mars R. B., Smith S., Behrens T., and Jbabdi S.. 2016. “Task‐Free MRI Predicts Individual Differences in Brain Activity During Task Performance.” Science 352, no. 6282: 216–220. 10.1126/science.aad8127. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Taylor, A. J. , Kim J. H., and Ress D.. 2018. “Characterization of the Hemodynamic Response Function Across the Majority of Human Cerebral Cortex.” NeuroImage 173: 322–331. 10.1016/j.neuroimage.2018.02.061. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Thomas, A. , Ré C., and Poldrack R.. 2022. “Self‐Supervised Learning of Brain Dynamics From Broad Neuroimaging Data.” In Advances in Neural Information Processing Systems, edited by S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh, vol. 35, 21255–21269. Curran Associates Inc. [Google Scholar]
- Van Essen, D. C. , Smith S. M., Barch D. M., Behrens T. E., Yacoub E., and Ugurbil K.. 2013. “The Wu‐Minn Human Connectome Project: An Overview.” NeuroImage 80: 62–79. 10.1016/j.neuroimage.2013.05.041. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Vogel, E. K. , and Machizawa M. G.. 2004. “Neural Activity Predicts Individual Differences in Visual Working Memory Capacity.” Nature 428, no. 6984: 748–751. 10.1038/nature02447. [DOI] [PubMed] [Google Scholar]
- Voss, M. W. 2016. “The Chronic Exercise–Cognition Interaction: fMRI Research.” In Exercise‐Cognition Interaction, edited by Terry McMorris, 187–209. Academic Press. [Google Scholar]
- Wang, X. , Chu Y., Wang Q., et al. 2023. “Unsupervised Contrastive Graph Learning for Resting‐State Functional MRI Analysis and Brain Disorder Detection.” Human Brain Mapping 44, no. 17: 5672–5692. 10.1002/hbm.26469. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wang, X. , Fang Y., Wang Q., Yap P.‐T., Zhu H., and Liu M.. 2025. “Self‐Supervised Graph Contrastive Learning With Diffusion Augmentation for Functional MRI Analysis and Brain Disorder Detection.” Medical Image Analysis 101: 103403. 10.1016/j.media.2024.103403. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Xia, M. , Wang J., and He Y.. 2013. “Brainnet Viewer: A Network Visualization Tool for Human Brain Connectomics.” PLoS One 8, no. 7: e68910. 10.1371/journal.pone.0068910. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Xu, T. , Kiar G., Cho J. W., et al. 2023. “Rex: An Integrative Tool for Quantifying and Optimizing Measurement Reliability for the Study of Individual Differences.” Nature Methods 20, no. 7: 1025–1028. 10.1038/s41592-023-01901-3. [DOI] [PubMed] [Google Scholar]
- Zagoruyko, S. , and Komodakis N.. 2016. “Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer.” Preprint, arXiv. https://arxiv.org/abs/1612.03928.
- Zhang, S. , Chen X., Shen X., et al. 2023. “A‐GCL: Adversarial Graph Contrastive Learning for fMRI Analysis to Diagnose Neurodevelopmental Disorders.” Medical Image Analysis 90: 102932. 10.1016/j.media.2023.102932. [DOI] [PubMed] [Google Scholar]
- Zhang, S. , Spoletini L. J., Gold B. P., Morgan V. L., Rogers B. P., and Chang C.. 2021. “Interindividual Signatures of fMRI Temporal Fluctuations.” Cerebral Cortex 31, no. 10: 4450–4463. 10.1093/cercor/bhab099. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zheng, K. , Yu S., Li B., Jenssen R., and Chen B.. 2025. “Brainib: Interpretable Brain Network‐Based Psychiatric Diagnosis With Graph Information Bottleneck.” IEEE Transactions on Neural Networks and Learning Systems 36, no. 7: 13066–13079. 10.1109/TNNLS.2024.3449419. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data S1: hbm70469‐sup‐0001‐supplementary_material.pdf.
Data Availability Statement
The data that support the findings of this study are openly available in VarCoNet‐V2 at https://github.com/CharLamp10/VarCoNet‐V2.
