arXiv:2609.09433cs.LGSep 2026

Manuscript Offprint

arXiv:2609.09433

Efficient Leakage-Free Neural Architecture Search under Leave-One-Subject-Out Evaluation

Heinke Hihn

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Leave-One-Subject-Out (LOSO) evaluation estimates generalisation performance for subject-based classification but makes Neural Architecture Search (NAS) computationally expensive because a fully nested implementation requires NN independent architecture searches and, assuming approximately linear training cost, scales as O(N2)\mathcal{O}(N^2). We propose a leakage-free, block-based approach that shares NAS runs across subjects. On the BioVid Heat Pain dataset, our approach increased the mean accuracy from 82.79% to 83.39% while reducing the number of parameters by up to 99.2%.

1 Method

Automated pain assessment aims to build systems classifying the pain level a subject experiences (Khan et al., 2026). Although deep learning has become standard, architecture design has remained a manual task despite the potential benefits of Neural Architecture Search (NAS) (Ren et al., 2021). We argue that the main reason is the computational cost of NAS in the LOSO setting. NAS has been applied to physiological signals and multimodal fusion (Wu et al., 2023; Duan et al., 2022; Ghebriout et al., 2024), but to our knowledge no previous method has addressed the repeated architecture searches required by subject-wise outer evaluation.

Formally, the accuracy of Leave-One-Subject-Out cross-validation is AccLOSO=1N∑j=1NAcc(D−j,Dj)\mathrm{Acc}_{\mathrm{LOSO}} = \frac{1}{N}\sum_{j=1}^N \mathrm{Acc}\big(D_{-j}, D_j\big), where Acc(D−j,Dj)\mathrm{Acc}\big(D_{-j}, D_j\big) denotes the classification accuracy of a model trained on D−jD_{-j}, which excludes subject jj, and evaluated on that subject's data DjD_j. Given NN subjects, NAS and final model fitting are performed independently for each of the NN folds using the remaining N−1N-1 subjects. To avoid data leakage, no samples of the held-out subject are used during optimisation. Thus, the total runtime is proportional to TLOSO−NAS=N[TNAS(N−1)+Tfit(N−1)+Ttest(1)]∈O(N2)T_{\mathrm{LOSO-NAS}} = N\left[T_{\mathrm{NAS}}(N-1) + T_{\mathrm{fit}}(N-1) + T_{\mathrm{test}}(1)\right] \in \mathcal{O}(N^2), assuming TNAS(n),Tfit(n)∈O(n)T_{\mathrm{NAS}}(n), T_{\mathrm{fit}}(n) \in \mathcal{O}(n). To reduce the number of NAS runs, we divide the subjects S\mathcal{S} into disjoint outer blocks G1,…,GB\mathcal{G}_1, \ldots, \mathcal{G}_B. For each outer block bb, NAS uses only the training set Tb=S∖Gb\mathcal{T}_b = \mathcal{S} \setminus \mathcal{G}_b. To evaluate a proxy for LOSO generalisation, we further split Tb\mathcal{T}_b into KK subject-disjoint inner folds: For each candidate architecture aa and inner fold kk, a model is initialised independently, fitted on the other K−1K-1 folds, and validated on fold kk. The selection objective is given as

Aˉb(a)=1Nb∑i∈TbAi(a),σ^b(a)=1Nb−1∑i∈Tb(Ai(a)−Aˉb(a))2,Jb(a)=Aˉb(a)−βσ^b(a)Nb,(1)\bar{A}_{b}(a)=\frac{1}{N_{b}}\sum_{i\in\mathcal{T}_{b}}A_{i}(a),\qquad \widehat{\sigma}_{b}(a)=\sqrt{\frac{1}{N_{b}-1}\sum_{i\in\mathcal{T}_{b}}\left(A_{i}(a)-\bar{A}_{b}(a)\right)^2},\qquad J_{b}(a)=\bar{A}_{b}(a)-\beta\frac{\widehat{\sigma}_{b}(a)}{\sqrt{N_{b}}}, \tag{1}

AutoML 2026 Non-Archival Track

© 2026 the authors, released under CC BY 4.0

Table 1: LOSO accuracies. Standard deviations are shown in parentheses where available. Bold indicates the best overall result, whereas underlining indicates the best result obtained using early fusion.

MethodFusionAccuracyMethodFusionAccuracy
Farmani et al. (2025)LF87.52% (±11.0)Steur and Schwenker (2025)LF84.22% (±13.2)
Thiam et al. (2025)LF85.32% (±13.7)Thiam et al. (2019)EF82.79% (±15.2)
Jiang et al. (2024)LF84.58% (±13.3)Werner et al. (2016)EF72.4%
Thiam et al. (2019)LF84.40% (±14.4)Werner et al. (2014)EF77.8%
Thiam et al. (2021)LF84.20% (±13.7)Kächele et al. (2015)EF78.9%
Ours (block specific architectures)EF83.39% (±14.4)

where Aˉb(a)\bar{A}_b(a) is the mean subject-level validation accuracy of architecture aa over Tb\mathcal{T}_b, Nb=∣Tb∣N_b = |\mathcal{T}_b| is the number of subjects in Tb\mathcal{T}_b, σ^b(a)\widehat{\sigma}_b(a) is the sample standard deviation of the subject-level accuracies over Tb\mathcal{T}_b, and Jb(a)J_b(a) defines a selection score. It rewards mean subject-level accuracy and penalises estimates that exhibit high inter-subject variance controlled by a factor β\beta. We used β=1.0\beta = 1.0. Algorithm 1 gives a high-level overview.

After the inner folds, we retain the checkpoint with the highest validation score of the architecture found by optimising Eq. 1. The model is then trained for additional epochs using the samples of all 86 non-target subjects, including the former inner-validation subjects and the other members of Gb\mathcal{G}_b – subjects in Gb∖{j}\mathcal{G}_b \setminus \{j\} are included in the final fitting, whereas target subject jj remains completely excluded. Finally, it is evaluated once on the held-out data DjD_j. The final reported metric is the mean accuracy across all target-subjects. To implement NAS, we use an Optuna study (Akiba et al., 2019) with a tree-structured Parzen estimator on Eq. 1. The implementation is made available at this repo.

References (18)