June 03, 2026
Reliable neural architecture selection is an open challenge in time-series forecasting under limited, noisy, and heterogeneous data, where standard heuristic architecture design and validation approaches fail to ensure accurate and reliable prediction and generalization. We propose EVIDENT (EVidence-based IDEntification of Neural archiTectures), a framework for architecture selection that integrates Bayesian training, evidence-based ranking, and task-specific validation under uncertainty. The framework explores the candidate architecture pool and identifies the lowest-capacity model that satisfies a prescribed validation criterion. We demonstrate this method using temporal convolutional networks (TCNs) for individualized blood glucose forecasting in type 1 diabetes patients. The results show that EVIDENT systematically rejects both under- and over-parameterized TCN architectures on population-level diabetes data, while identifying models that generalize reliably to unseen patients. When multiple architectures are competitive, the framework further supports plausibility-weighted ensemble predictions that enhance predictive performance. Compared with a random-search baseline, EVIDENT identified smaller architectures with more consistent forecasting performance on unseen patients. These findings establish EVIDENT as a strategy to neural architecture discovery, enabling reliable model selection for high-consequence forecasting in data-limited and heterogeneous settings.
Bayesian neural networks, Architecture selection, Model evidence, Time-series modeling, Temporal convolutional networks
Neural network architecture and hyperparameter selection remains a central challenge in time-series learning [1]–[3], particularly in regimes with limited, noisy, and heterogeneous data. This challenge becomes more pronounced when the objective extends beyond pointwise accuracy to reliable forecasting for consequential decision making in physical and biomedical systems. In such settings, architecture design must balance temporal expressivity, effective parameter learning from available data, and generalization to unseen conditions. In practice, however, architecture choice often relies on trial-and-error tuning or heuristic selection based on held-out performance comparisons. While these approaches can yield accurate models for a given data split, they provide limited insight into whether the selected architecture’s trainable parameters are appropriately informed by the available data, how sensitive the architecture choice is to data partitioning, and whether the resulting predictions are sufficiently reliable for the intended task. Subject-specific blood glucose forecasting in type 1 diabetic patients provides a high-consequence testbed for this problem. The goal is to predict future glucose trajectories from continuous glucose monitoring (CGM) data together with recorded meal intake and insulin delivery, enabling patient-specific treatment decisions such as optimizing insulin profile. This setting is particularly challenging due to complex and delayed glucose-insulin dynamics, strong inter- and intra-patient variability, and wearable sensor noise. Consequently, architectures that perform well on retrospective historical patient data may still fail to generalize to prospective, subject-specific predictions, making this application a stringent benchmark for neural architecture selection.
Despite rapid progress in neural architectures and training algorithms, current approaches for constructing and validating neural network prediction remain limited in several key aspects. Neural architecture search and related design strategies often rely on heuristic exploration or metaheuristic optimization [4]–[8], yielding architectures that are sensitive to data splits and may not generalize beyond the observed training distribution. More fundamentally, model validation is typically driven by empirical performance assessment, often under large-data assumptions, or by problem-specific heuristics [9]–[13]. These approaches provide limited insight into whether a given architecture is adequately supported by the available data or whether its predictive uncertainty is acceptable for the intended task. Such limitations are particularly pronounced in biomedical and clinical time-series forecasting, where inter-subject variability and limited patient data can lead to unstable architecture rankings, and where average test-set accuracy alone is insufficient to assess whether predictions are sufficiently accurate and reliable for the intended forecasting task.
To address these limitations, we propose EVIDENT (Evidence-based Identification of Neural network archiTectures), a framework for neural architecture selection that integrates Bayesian training [14]–[18], evidence-based ranking [19], [20], and task-specific validation under uncertainty [21], [22]. Instead of exhaustively searching large architecture spaces or selecting models solely based on held-out error, EVIDENT evaluates candidate architectures in a systematic level-wise manner and returns the lowest-capacity architecture, i.e., lowest number of trainable parameters, that satisfies a prescribed reliability criterion. The underlying idea is to decouple model ranking from model validation, such that Bayesian evidence is used to identify high model plausibility regions of the architecture space, while model acceptance is based on task-specific validation that explicitly accounts for predictive uncertainty. In this work, we instantiate EVIDENT using temporal convolutional networks (TCNs) for subject-specific blood glucose forecasting, and demonstrate that approximate evidence consistently localizes a narrow intermediate-capacity regime, within which validated predictors are identified.
The remainder of the paper is organized as follows. Section 2 develops the proposed methodology, including the glucose forecasting formulation, the feasible TCN architecture space, Bayesian learning, approximate evidence-based architecture ranking of TCN predictors, and the EVIDENT algorithmic framework. Section 3 presents the numerical results including a set of plausibility-guided analysis to examine the behavior of TCN architectures, and then apply EVIDENT to type 1 diabetes population-level architecture selection under patient-specific validation. Section 4 discusses the broader implications, limitations, and extensions of the approach, and Section 5 provides concluding remarks.
We consider multi-step blood-glucose (BG) forecasting from multichannel time series consisting of glucose, meal intake, and insulin delivery sequences. At discrete time index \(k\), the model maps a window of recent observations to a future glucose trajectory over a prediction horizon of length \(H\). Let \(G^{(k-d_G:k)} \in \mathbb{R}^{d_G}\), \(M^{(k-d_M:k)} \in \mathbb{R}^{d_M}\), and \(I^{(k-d_I:k)} \in \mathbb{R}^{d_I}\) denote the corresponding input histories of glucose, meal intake, and insulin delivery, respectively. The forecasting model is posed as a nonlinear operator \(\mathcal{T}_{w, \xi} : \mathbb{R}^{d_G} \times \mathbb{R}^{d_M} \times \mathbb{R}^{d_I} \rightarrow \mathbb{R}^{H},\) where \(\xi\) is the architecture parameters and \(w \in \mathbb{R}^{W}\) denotes all trainable parameters. The predictor is then written as \[{G}^{(k+1:k+H)} = \mathcal{T}_{w,\xi}\!\left( G^{(k-d_G:k)},\, M^{(k-d_M:k)},\, I^{(k-d_I:k)} \right), \label{eq:tcn95operator}\tag{1}\] where \({G}^{(k+1:k+H)} \in \mathbb{R}^{H}\) denotes the predicted future BG trajectory. In this work, \(\mathcal{T}_{w,\xi}\) is implemented using an encoder–decoder temporal convolutional network (TCN) [23], [24], as illustrated in Figure 1. The input is represented as a multichannel sequence with three channels corresponding to \(G^{(k-d_G:k)}\), \(M^{(k-d_M:k)}\), and \(I^{(k-d_I:k)}\). The encoder consists of \(N\) stacked temporal blocks. Each encoder block \(j\) maps an input feature tensor to an output feature tensor with \(c_j\) channels and is implemented as a temporal residual block composed of two Bayesian dilated causal 1D convolutional layers (Conv1D) with filter size \(f\), followed by ReLU nonlinearities and a residual skip connection. When the input and output channel dimensions differ, a point-wise \(1 \times 1\) Conv1D is applied on the skip path to linearly project the input channels before element-wise addition. This residual-block structure is inspired by ResNets [25] and improves training of deeper TCNs by facilitating gradient flow across blocks. The convolutional layers use causal padding so that the temporal dimension is preserved within each block. The dilation factor in encoder block \(j\) is defined as \(\delta_j = b^{j-1}\), where \(b\) is the dilation base. Dilation determines the spacing between adjacent filter operations and when \(\delta_j=1\), the convolution uses consecutive time samples, while for \(\delta_j>1\), the filter skips intermediate samples and therefore covers a wider temporal range without increasing the filter size. The geometric growth of \(\delta_j\) with depth \(j\) enlarges the receptive field and enables the network to capture long-range temporal dependencies while preserving causality. Following each encoder block, except the last, an average pooling layer (AvgPool) reduces the temporal resolution, yielding a compact latent representation. The decoder maps the latent sequence back to the forecast resolution through \(N\) decoder blocks with number of channels \(\tilde{c}_1,\ldots,\tilde{c}_N\). Each decoder block follows the same residual structure, consisting of two causal Conv1D layers with filter size \(f\), ReLU activations, and a residual connection with a \(1 \times 1\) projection when the block’s input and the second convolution’s output have different channel dimensions, so that the two tensors can be summed element-wise in the residual connection. In contrast to the encoder, the decoder convolutions use unit dilation (i.e., \(\delta_j=1\) for all decoder blocks \(j=1,\ldots,N\)). Between successive decoder blocks, upsampling layers increase the temporal resolution. Finally, a Bayesian Conv1D layer maps the decoder feature tensor to the predicted BG trajectory \({G}^{(k+1:k+H)}\).
Within this architecture family, the receptive field is a derived quantity determined by \(\xi\), indicating set of entries of the input that affect a specific entry of the output. For the temporal blocks in Figure 1, each of which contains two causal dilated convolutions, the resulting receptive field is \[\mathrm{RF} = 1+2(f-1)\sum_{j=0}^{N-1} b^j = 1+2(f-1)\frac{b^N-1}{b-1}. \label{eq:rf95closed}\tag{2}\] The feasible architecture space is defined by the finite combinations of discrete architecture parameters (number of blocks \(N\), dilation base \(b\), filter size \(f\), number of channels in encoder \(\{c_j\}_{j=1}^N\) and decoder \(\{\tilde{c}_j\}_{j=1}^N\), stride \(s\), input lengths \(\{d_G, d_M, d_I\}\), and output horizon \(H\)), subject to structural and temporal constraints, \[\Xi = \left\{ \xi : \mathrm{RF}\geq \tau_{\min}, \; f \geq b \right\}, \label{eq:feasible95space}\tag{3}\] where \(\tau_{\min}\) denotes the minimum temporal extent required to capture relevant glucose dynamics (e.g., delayed effects of meals and insulin), and \(f \geq b\) enforces a no-holes condition for dilated convolutions such that every input in the sequence contributes to the output. Additional problem-specific constraints may be imposed based on the desired prediction horizon and computational budget. Despite these restrictions, the combinatorial structure of \(\xi\) induces a large candidate architecture space, motivating the need for a principled architecture discovery strategy.
We pose the training of the TCN predictor in a Bayesian setting by placing a probability distribution over the trainable parameters, i.e., convolutional weights \(w\). The Bayesian training is motivated by the limited and heterogeneous nature of the data, the need for quantifying uncertainty in the forecasts, and the requirement that architecture selection be robust to overconfident data fits. In our particular problem, training is performed using population-level data obtained from multichannel time series across multiple type 1 diabetes patients. The TCN is trained using a sliding-window procedure with stride \(s\), applied over the full dataset. The retrospective data associated with patient \(i\) is written as \[\mathcal{D}_i = \left\{ \left( G_{\mathrm{data}, i}^{(k-d_G:k)},\, M_{\mathrm{data}, i}^{(k-d_M:k)},\, I_{\mathrm{data}, i}^{(k-d_I:k)},\, G_{\mathrm{data}, i}^{(k+1:k+H)} \right) \right\}_{k=1}^{N_{D_i}}.\] Here, \(G_{\mathrm{data}, i}\) denotes the observed glucose trajectory from continuous glucose monitoring (CGM), \(M_{\mathrm{data}, i}\) denotes the recorded meal-related input, and \(I_{\mathrm{data}, i}\) denotes the recorded insulin delivery. Each index \(k\) corresponds to a sliding temporal window extracted from the trajectory of patient \(i\), and \(N_{D_i}\) denotes the total number of admissible input-output windows obtained from that patient. The complete population-based training dataset constructed from \(N_{\mathrm{patient}}\) patients is then given by \[\mathcal{D} = \bigcup_{i=1}^{N_{\mathrm{patient}}} \mathcal{D}_i .\] For a given architecture \(\xi\), Bayesian training is defined by a prior distribution on the weights and a likelihood function for the observed trajectories. We use a Gaussian prior \(\pi_{\mathrm{pr}}(w | \sigma_{\mathrm{pr}},\xi) = \mathcal{N}\!\left(0,\sigma_{\mathrm{pr}}^2 I_{W}\right),\) and assume additive Gaussian noise model with variance \(\sigma_{\mathrm{noise}}^2\), leading to log-likelihood being proportional to \[\log \pi_{\mathrm{like}}(\mathcal{D} \mid w,\sigma_{\mathrm{noise}},\xi) \;\propto\; -\frac{1}{2\sigma_{\mathrm{noise}}^2} \sum_{k=1}^{N_D} \left\| G_{\mathrm{data}}^{(k+1:k+H)} - \mathcal{T}_{w,\xi}\!\big(G^{(k-d_G:k)}, M^{(k-d_M:k)}, I^{(k-d_I:k)}\big) \right\|_2^2,\] where \(\sigma=(\sigma_{\mathrm{pr}},\sigma_{\mathrm{noise}})\) is called inference hyperparameters and \(N_D\) denotes the number of training input–output windows over all patients. Under these assumptions, the posterior distribution over the trainable parameters is given by \[\label{eq:bayes95w} \pi_{\mathrm{post}}(w\mid \mathcal{D},\sigma,\xi) = \frac{\pi_{\mathrm{like}}(\mathcal{D}\mid w,\sigma_{\mathrm{noise}},\xi)\,\pi_{\mathrm{pr}}(w\mid \sigma_{\mathrm{pr}},\xi)}{\pi_{\mathrm{evid}}(\mathcal{D}\mid \sigma_{\mathrm{pr}},\sigma_{\mathrm{noise}},\xi)}.\tag{4}\] Bayesian inference is intractable for TCNs with high-dimensional parameters using sampling methods. We thus employ variational inference with a tractable variational distribution \(q_{\eta}(w)\), parameterized by \(\eta\), chosen here as a mean-field Gaussian. The optimal variational distribution is obtained by minimizing the Kullback–Leibler divergence to the true posterior, equivalently by maximizing the evidence lower bound (ELBO): \[\eta^{\mathrm{opt}} = \arg\min_{\eta} \left[ \mathrm{KL}\!\left( q_{\eta}(w)\,\|\,\pi_{\mathrm{pr}}(w \mid \sigma_{\mathrm{pr}},\xi) \right) - \mathbb{E}_{q_{\eta}(w)} \left[ \log \pi_{\mathrm{like}}(\mathcal{D} \mid w,\sigma_{\mathrm{noise}},\xi) \right] \right].\] This yields an approximate posterior over the TCN weight parameters. Given the posterior distribution over \(w\) and fixed \(\sigma\) and \(\xi\), the predictive distribution for a new input sequence is \[\begin{align} \pi\!\left( G^{*(k+1:k+H)} \,\middle|\, G^{(k-d_G:k)},\, M^{(k-d_M:k)},\, I^{(k-d_I:k)},\, \mathcal{D},\, \sigma,\, \xi \right) = \nonumber \\ \int \pi\!\left( G^{*(k+1:k+H)} \,\middle|\, G^{(k-d_G:k)},\, M^{(k-d_M:k)},\, I^{(k-d_I:k)},\, w,\, \sigma,\, \xi \right) \pi_{\mathrm{post}}(w\mid \mathcal{D},\sigma,\xi)\,dw, \label{eq:posterior95predictive} \end{align}\tag{5}\] which integrates the TCN predictions over the learned weight posterior. In practice, this distribution is approximated via Monte Carlo sampling from \(q_{\eta^{\mathrm{opt}}}(w)\), yielding predictive mean trajectories and corresponding uncertainty.
To move from single-model Bayesian training to architecture discovery, we use the evidence distribution in 4 as the scoring function for selecting the inference hyperparameters \(\sigma=(\sigma_{\mathrm{pr}},\sigma_{\mathrm{noise}})\) and for comparing candidate architectures \(\xi\). The evidence provides a principled trade-off between data fit and learned parameter uncertainty [16], [19], [21], and thereby expected to favor models with robust predictive performance based on the available data. For fixed \(\sigma\) and \(\xi\), the evidence is defined as \(\pi_{\mathrm{evid}}(\mathcal{D} | \sigma,\xi) = \int \pi_{\mathrm{like}}(\mathcal{D} | w,\sigma_{\mathrm{noise}},\xi)\, \pi_{\mathrm{pr}}(w | \sigma_{\mathrm{pr}},\xi)\,dw.\) This quantity evaluates how well the architecture \(\xi\), together with \(\sigma\), explains the training data after marginalizing over parameter uncertainty. The posterior over the inference hyperparameters is given by \[\pi_{\mathrm{post}}(\sigma\mid \mathcal{D},\xi) = \frac{ \pi_{\mathrm{evid}}(\mathcal{D}\mid \sigma,\xi)\, \pi_{\mathrm{pr}}(\sigma\mid \xi) }{ \pi_{\mathrm{evid}}(\mathcal{D}\mid \xi) }. \label{eq:sigma95post}\tag{6}\] In this work, 6 is approximated using a Laplace approximation, yielding a maximum a posteriori estimate of \(\sigma_{\mathrm{MAP}}\). Details of this approximation are provided in 6 and follow [21]. Given \(\sigma_{\mathrm{MAP}}\), the architecture-level evidence is obtained by marginalizing over \(\sigma\), \(\pi_{\mathrm{evid}}(\mathcal{D}| \xi) = \int \pi_{\mathrm{evid}}(\mathcal{D} | \sigma,\xi)\, \pi_{\mathrm{pr}}(\sigma | \xi)\,d\sigma,\) which is again approximated via Laplace Approximation (see 6). Let \(\mathcal{M}=\{\xi_m\}_{m=1}^{M}\) denote the finite candidate architecture set. The posterior plausibility of architecture \(\xi_m\) is defined as \[\rho_m = \pi_{\mathrm{post}}(\xi_m\mid \mathcal{D}) = \frac{ \pi_{\mathrm{evid}}(\mathcal{D}\mid \xi_m)\, \pi_{\mathrm{pr}}(\xi_m) }{ \sum_{j=1}^{M} \pi_{\mathrm{evid}}(\mathcal{D}\mid \xi_j)\, \pi_{\mathrm{pr}}(\xi_j) }, \qquad m=1,\ldots,M. \label{eq:rho95m}\tag{7}\] Under a uniform prior over architectures, \(\rho_m\) reduces to normalized evidence. The plausibility weights \(\{\rho_m\}_{m=1}^{M}\) can be used either to select the most plausible architecture \(\xi_{\mathrm{plausible}}=\arg\max_{\xi \in \Xi} \rho\) or to form a plausibility-weighted ensemble predictor: \[\begin{align} \pi\!\left( G^{* (k+1:k+H)} \,\middle|\, G^{(k-d:k)},\,M^{(k-d:k)},\,I^{(k-d:k)},\,\mathcal{D} \right) = \nonumber \\ \sum_{m=1}^{M} \rho_m\, \pi\!\left( G^{* (k+1:k+H)} \,\middle|\, G^{(k-d:k)},\,M^{(k-d:k)},\,I^{(k-d:k)},\,\mathcal{D},\,\xi_m \right). \label{eq:bma} \end{align}\tag{8}\]
EVIDENT is a iterative architecture discovery strategy that combines Bayesian training, evidence-based ranking, and validation under uncertainty to identify TCN predictors with accurate and reliable task-specific performance. Rather than exhaustively searching a potentially large candidate pool, EVIDENT proceeds level by level, determining high-plausibility regions of the architecture space and testing whether the resulting models satisfy the prescribed validation criteria. In this way, the framework balances predictive performance and model complexity while avoiding unnecessary exploration of architectures that are either insufficiently expressive or overly parameterized. An algorithmic summary of EVIDENT is provided in Figure 2 and various components are described here.
Let \(\mathcal{M}_{\mathrm{initial}}=\{\xi_m\}_{m=1}^{M}\) denote the finite, but potentially large, candidate architecture set induced by the feasible architecture space. EVIDENT partitions this set into ordered capacity levels, \(\mathcal{M}_{\mathrm{initial}} = \bigcup_{l=1}^{L}\mathcal{M}^{(l)}, \; \mathcal{M}^{(l)}\cap \mathcal{M}^{(r)}=\varnothing \;\text{for}\;l\neq r,\) where the levels are arranged from lower to higher model capacity according to a prescribed complexity measure, such as the number of trainable parameters. This construction avoids committing apriori to either overly small architectures, which may lack sufficient expressive power, or highly over-parameterized architectures, whose parameters cannot be reliably informed by the available data. Instead, EVIDENT searches progressively over increasingly expressive architecture classes guided by posterior plausibility.
For each level \(l\), every candidate architecture \(\xi \in \mathcal{M}^{(l)}\) is trained using the Bayesian learning procedure in 4 . The corresponding posterior plausibility values \(\rho(\xi)\) are then computed from 7 , and the architectures are ranked accordingly. Let \(\widehat{\mathcal{M}}^{(l)} \subseteq \mathcal{M}^{(l)}\) denote the resulting shortlist of top-ranked architectures. In the simplest case, \(\widehat{\mathcal{M}}^{(l)}\) contains only the most plausible architecture in level \(l\); more generally, it may include several architectures with comparable evidence. Only the architectures in \(\widehat{\mathcal{M}}^{(l)}\) are then advanced to the validation process.
This stage is the central step in EVIDENT as it is not intended to measure prediction accuracy on arbitrary held-out dataset; rather, it tests whether an architecture delivers sufficiently accurate and reliable predictions for the intended deployment regime. Accordingly, the validation design must be problem-specific and aligned with the target use case. In the diabetes application considered in the next section, validation is designed to identify TCN architectures that generalize from population-level training data to unseen individual patients and remain trustworthy for insulin-control decisions. Validation is performed across holdout folds. In each fold, the posterior predictive distribution of competitive architectures, is compared against the observed trajectories of the held-out individual patients. Acceptance is determined using one or more probabilistic validation criteria together with a prescribed tolerance \(Tol\). In this work, the primary validation metric is the negative log predictive density (NLPD), \[\mathrm{NLPD} = \frac{1}{N_{\mathrm{val}}} \sum_{i=1}^{N_{\mathrm{val}}} \left[ \frac{ \left\| G_{\mathrm{data},i}^{(k+1:k+H)} - \overline{\mathcal{T}}_{w,\xi}\!\left( G_{\mathrm{data},i}^{(k-d_G:k)}, M_{\mathrm{data},i}^{(k-d_M:k)}, I_{\mathrm{data},i}^{(k-d_I:k)} \right) \right\|_2^2 }{2\sigma_i^2} + \frac{H}{2}\log \sigma_i^2 \right], \label{eq:nlpd}\tag{9}\] where \(N_{\mathrm{val}}\) is the number of validation windows in the holdout fold, \(\overline{\mathcal{T}}_{w,\xi}\) denotes the posterior predictive mean of the TCN forecast, and \[\sigma_i^2 = \sigma_{\mathrm{data}}^2 + \mathrm{Var}\!\left[ \mathcal{T}_{w,\xi}\!\left( G_{\mathrm{data},i}^{(k-d_G:k)}, M_{\mathrm{data},i}^{(k-d_M:k)}, I_{\mathrm{data},i}^{(k-d_I:k)} \right) \right]. \label{eq:sigma95nlpd}\tag{10}\] Here, \(\sigma_{\mathrm{data}}^2\) represents the intrinsic uncertainty of the glucose measurements such as CGM sensor noise, while the second term captures predictive variance induced by the Bayesian TCN. NLPD penalizes both inaccurate forecasts and unreliable predictive, making it a natural criterion for assessing probabilistic forecasting. A candidate architecture is accepted as “trustworthy predictor” if it satisfies a prescribed tolerance, i.e., \(\mathrm{NLPD} \leq Tol\), possibly together with additional task-dependent validation requirements.
If at least one candidate in level \(l\) satisfies the validation criteria, the search terminates and EVIDENT returns the corresponding architecture as trustworthy predictor(s). Otherwise, the algorithm advances to the next level, \(l \leftarrow l+1\), and repeats the training, architecture ranking, and validation under uncertainty cycle. EVIDENT therefore discovers the lowest-capacity architecture that satisfies the fit-for-purpose validation requirements under predictive uncertainty. If no candidate passes validation in the final level, the candidate architecture set must be expanded. The resulting workflow favors plausible architectures supported by the training data and validated for the intended predictive task.
This section evaluates the Bayesian TCN and the proposed EVIDENT framework through two numerical studies. We first consider a single-patient setting to analyze how evidence varies across the TCN architecture space and whether it identifies architectures that balance expressivity and reliable forecasting. We then apply EVIDENT to population-based type 1 diabetes data from in silico patients to perform architecture discovery under inter-patient variability, with the goal of identifying TCN predictors that generalize reliably to unseen subjects. All Bayesian TCN models were implemented in PyTorch [26] and trained using the variational inference code adapted from the open-source repository by [27], [28].
We begin with a single-patient forecasting study to examine how Bayesian evidence responds to TCN architecture choices and whether it provides a consistent criterion for navigating the architecture space. This includes the analyses of how evidence varies with architectural complexity and its relationship to accuracy and uncertainty in predicted blood glucose trajectories. This experiment isolates the role of evidence as a selection metric before moving to population-level architecture discovery in the next section.



Figure 3: Single-patient training data used in the plausibility analysis: (a) blood glucose (CGM), (b) meal intake, and (c) insulin delivery, generated using the Bergman minimal model with Dalla Man meal absorption dynamics..
Figure 3 shows the dataset generated from the Bergman minimal model with meal disturbances modeled via the Dalla Man absorption model [29], [30]. To introduce variability, meal size and timing are randomly perturbed around nominal values, while insulin is administered using a deterministic basal–bolus protocol. Detailed model equations and parameter values are provided in the 7. In all TCNs, the input sequences for glucose \(G\), meal \(M\), and insulin \(I\) share a common history window, i.e., \(d_G = d_M = d_I\) in 1 . All the upcoming results in this section were obtained using the same 90% train and 10% test split of the time series shown in Figure 3. The training set corresponds to \(0\text{--}10000\) minutes (\(\approx 7\) days) and the test set corresponds to \(10000\text{--}11520\) minutes (\(\approx 1\) day).
We first examine how Bayesian evidence varies across TCN architectures with different receptive fields and model capacities. Figure 4 (a and b) show that both the number of temporal blocks \(N\) and the dilation base \(b\) increase the receptive field, while model size, measured by the number of trainable parameters, is primarily driven by \(N\). The evidence landscape of the 136 architectures in Figure 4 (c) is highly non-uniform, with high-evidence models concentrated in an intermediate region of the \((N,b)\) architecture space. This indicates that neither larger receptive fields nor larger model sizes alone improve model plausibility. Instead, evidence favors architectures that provide sufficient temporal context to capture meal and insulin dynamics while avoiding weakly informed parameters. The forecast behavior of three representative architectures (A, B, and C) from different regions of the architecture space is shown in Figure 4 (d–f). Architectures A and B, located in high-evidence regions, produce accurate forecasts with tighter uncertainty bands. In contrast, architecture C, selected from a low-evidence region, yields less reliable predictions despite its larger number of temporal blocks. These results suggest that evidence is not merely measuring goodness-of-fit, but also identifying architectures with improved predictive reliability under uncertainty.
In addition to architecture’s structural parameters, evidence also provides guidance for training and forecasting choices in TCN. Figure 5 (a-c) shows the effect of stride in constructing overlapping input–output windows and the evidence surface over input length \(d\) and prediction horizon \(H\). The evidence peaks at stride \(s=3\), indicating a balance between highly redundant training windows at small stride and reduced sample efficiency at large stride. This suggests that evidence also captures the effective information content of the training set induced by the windowing training scheme. Figure 5 (d) shows that evidence decreases as the prediction horizon increases, indicating that longer-horizon forecasts are less supported by the available data. For a fixed horizon, the evidence surface also localizes a favorable range of input history lengths rather than increasing monotonically with longer input windows. To identify this region efficiently, we first evaluate a coarse grid over input and output lengths and then refine the high-evidence region using a finer search. Overall, the results of this section show that evidence can be used to identify both the structural specification of TCN architecture and the temporal configuration of the forecasting problem.
We now implement EVIDENT in a clinical forecasting setting involving inter-patient variability and data noise from CGM sensor. The objective is to leverage retrospective population data to identify TCN architectures that can reliably generalize to unseen individual T1D patients for predicting BG trajectory.
Population-level type 1 diabetes (T1D) trajectories are generated using the UVA/Padova T1D simulator [31]. The dataset consists of 10 adult in silico subjects, each providing continuous glucose monitoring (CGM) data together with the corresponding meal and insulin inputs, as shown in Figure 6. To evaluate generalization under inter-patient variability, we use a 5-fold cross-validation protocol: in each fold, 8 patients are used for population training and the remaining 2 subjects are held out for patient-specific validation, as summarized in Table 1.
| Fold | Training | Held out validation |
|---|---|---|
| 1 | Patients [1–8] | Patients [9, 10] |
| 2 | Patients [1–5, 8–10] | Patients [6, 7] |
| 3 | Patients [3–10] | Patients [1, 2] |
| 4 | Patients [1, 2, 5–10] | Patients [3, 4] |
| 5 | Patients [1–4, 6, 7, 9, 10] | Patients [5, 8] |
The candidate TCN pool is constructed from the feasible architecture space in 3 . To ensure adequate temporal context for glucose dynamics, architectures are constrained to satisfy \(1~\text{day} \le \mathrm{RF}(\xi) \le 2000~\text{min},\) where the lower bound ensures access to at least one daily cycle and the upper bound avoids unnecessarily long temporal context. We also enforce the no-holes condition \(f\geq b\) for dilated convolutions. Additional implementation bounds on filter size, depth, and channel width are imposed to keep the search computationally tractable. These constraints yield a finite pool of 61 candidate TCN architectures. For EVIDENT, the candidates are partitioned into six ordered capacity levels according to the number of trainable parameters, as summarized in Table 2. Full architecture specifications are provided in 8.
The training and validation protocol is designed to emulate deployment to unseen T1D subjects with limited subject-specific data. In each cross-validation fold, candidate architectures are first trained on population data using input–output windows extracted from inter-meal intervals. The output horizon is set to 285 minutes, corresponding to the minimum inter-meal gap, and windows containing meal events within the prediction horizon are excluded. For each held-out subject, the posterior distribution obtained from population training is subsequently used as the prior for subject-specific adaptation using four days of that subject’s data. Validation is then performed using rolling one-hour prediction windows shifted to cover the full day 5, while excluding windows intersecting meal events and truncating predictions 10 minutes before meal onset to avoid scoring across unobserved disturbances. A candidate architecture is considered acceptable if its NLPD remains below the prescribed tolerance \(Tol=14.5\) across all one-hour validation windows for both held-out subjects.
| Capacity level \(l\) | Parameter range | Number of architectures | Number of temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Starting number of channels \(c_1\) |
|---|---|---|---|---|---|---|
| Capacity level \(l\) | Parameter range | Number of architectures | Number of temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Starting number of channels \(c_1\) |
| \(\le 30\)k | 10 | \([3-4]\) | \([7- 13]\) | \([4- 9]\) | \([2, 4]\) | |
| 2 | \(30\)k–\(100\)k | 9 | \([3- 6]\) | \([3- 13]\) | \([3- 9]\) | \([2, 8]\) |
| 3 | \(100\)k–\(400\)k | 10 | \([3- 6]\) | \([3- 13]\) | \([2- 9]\) | \([2, 16]\) |
| 4 | \(400\)k–\(1\)M | 11 | \([3- 7]\) | \([3- 13]\) | \([2- 9]\) | \([2, 32]\) |
| 5 | \(1\)M–\(5\)M | 11 | \([3- 7]\) | \([3- 13]\) | \([2- 9]\) | \([4, 64]\) |
| 6 | \(\ge 5\)M | 10 | \([3- 7]\) | \([7- 13]\) | \([2-9]\) | \([8, 128]\) |
The lowest-capacity TCN candidates with less than \(3 \times 10^4\) parameters, that still satisfy the receptive-field feasibility constraints, are in Level 1. As shown in Figure 7, model evidence is not uniformly distributed within this level and it concentrates on a small subset of architectures in each held-out validation fold. Despite this, none of the Level 1 architectures satisfy the validation criterion. As illustrated in Figure 7, predictions on held-out subjects frequently violate the NLPD tolerance across one-hour windows (shown in red). These failures indicate that, although some architectures are favored by the population-based training data, their representational capacity is insufficient to generalize to subject-specific glucose dynamics. Consequently, EVIDENT rejects Level 1 and proceeds to the next capacity level.







Figure 7: Level 1 architecture ranking and validation outcome. (a) Posterior plausibility \(\rho\) versus model size (number of parameters) for Level 1 architectures across validation folds (left to right: folds 1–5). (b,c) Representative validation failure for most plausible architectures on held-out subjects: (b) Patient 2 from fold 3, Architecture: \(Level_1Arch_4\), (c) Patient 3 from fold 4, Architecture: \(Level_1Arch_6\). Red segments indicate one-hour prediction windows that violates the acceptance criterion \(NLPD \leq Tol\)..
Level 2 contains the intermediate-capacity regime (\(3\times10^4 - 1\times10^5\) parameters) in which EVIDENT identifies architectures that are both plausible and validation-acceptable. Figure 8 (a) summarizes, for each held-out validation fold, the variation of posterior plausibility \(\rho\) and the corresponding MAP estimate of \(\sigma_{\text{noise}}\) across the candidate architectures in this level. It is observed that a small subset of architectures receives substantial posterior model plausibility, while the most plausible architecture varies across folds, reflecting the inter-patient heterogeneity of the population-based training data in Figure 6. While most subjects exhibit comparable glucose ranges and excursion patterns, Patient 7 and Patient 5 display substantially larger amplitudes, which changes the temporal structure seen during training. As a result, EVIDENT favors different architectures across folds. Nevertheless, \(Level_2Arch_4\) with 43268 parameters, which consists of 5 temporal blocks with dilation base \(b=3\), filter size \(f=9\), and encoder channels \([2,4,8,16,32]\), emerges as a competitive architecture in three validation folds. This architecture achieves a one-day receptive field through gradual dilation growth across depth, while retaining sufficient local temporal resolution to capture meal-driven glucose excursions. The \(\sigma_{{\rm noise}_{MAP}}\) trends provide a diagnostic such that low-plausibility architectures require inflated noise levels, indicating that unresolved temporal structure is absorbed as noise, whereas competitive models achieve high plausibility without such inflation.
















Figure 8: Level 2 architecture ranking and validation outcomes. (a) Posterior plausibility \(\rho\) and MAP estimate of \(\sigma_{\text{noise}}\) as functions of model size (number of trainable parameters) for Level 2 architectures across validation folds (left to right: folds 1–5). (b, c) Representative validation failures for most plausible architecture (\(Level_2Arch_2\)) on held-out patients 9 and 10 from Fold 1. Red segments indicate one-hour prediction windows that violate the acceptance criterion \(\mathrm{NLPD} \leq Tol\). (d–g) Validation results for the EVIDENT-selected architecture (\(Level_2Arch_4\)) across multiple folds and held-out patients: (d,e) patients 1–2 and (f,g) patients 3–4. The one-hour forecasts of (\(Level_2Arch_4\)) passes all the validation tests, demonstrating EVIDENT identified trustworthy predictor..
The top-ranked architectures in each fold are subsequently evaluated on the held-out subjects using the validation protocol. Although Level 2 architectures exhibit improved predictive performance relative to Level 1, most candidates still fail the validation criterion by violating the NLPD tolerance in a subset of one-hour prediction windows (representative failure cases are shown in Figure 8 (b,c)). EVIDENT, however, identifies a single architecture, \(Level_2Arch_4\), that satisfies the validation criterion across all folds and held-out subjects. As shown in Figure 8 (d–g), this model produces consistent one-hour forecasts that remain within the prescribed tolerance across all validation windows. This architecture is therefore selected as the trustworthy predictor.




Figure 9: Comparison of single-architecture and plausibility-weighted ensemble predictions for representative Level 2 candidates in fold 2. (a—b) Predictions from a single architecture (\(Level_2Arch_7\)) for Patients 6–7 in fold 2, and (c—d) corresponding ensemble predictions from all architectures in Level 2. Red segments indicate one-hour prediction windows that violates the acceptance criterion \(NLPD \leq Tol\)..
In addition to single-architecture selection, EVIDENT also supports a plausibility-weighted ensemble predictor when multiple architectures remain competitive. To assess this, we compare the predictions of the most plausible architecture with the ensemble prediction defined in 8 over all Level 2 architectures for fold 2 (Figure 9). The ensemble achieves improved predictive accuracy and lower NLPD relative to individual architectures, while producing wider uncertainty bands due to aggregation across models. This behavior reflects an ensemble effect, where different architectures capture complementary temporal patterns and their combination mitigates individual model deficiencies. These results indicate that, although a single architecture can satisfy the validation criterion, the plausibility-weighted ensemble provides a mechanism for improving predictive performance while capturing model uncertainty in the presence of multiple candidates.
Level 3 contains higher-capacity architectures (\(10^5\)–\(4\times10^5\) parameters). Despite their increased representational capacity, these models do not improve validation performance and frequently violate the NLPD criterion across multiple prediction windows (Figure 10). The additional parameters at this level are not sufficiently learned by the available data, leading to degraded generalization under inter-patient variability. In contrast to Level 2, where intermediate-capacity architectures satisfy the validation criterion, increasing capacity beyond this regime yields no consistent improvement and introduces prediction errors.


Figure 10: Representative validation failures for Level 3 architectures on held-out patients. (a) Patient 1 from fold 3 using \(Level_3Arch_{10}\) and (b) Patient 4 from fold 4 using \(Level_3Arch_4\). Red segments indicate one-hour prediction windows that violate the acceptance criterion \(NLPD \leq Tol\)..
To complement NLPD-based validation, we evaluate representative rejected and accepted architectures using the Parkes error grid [32], [33], a clinically established mapping for assessing the impact of glucose prediction errors on treatment decisions. The grid partitions errors into risk zones including no clinical impact (Zone A), minimal clinical consequence (Zone B), incorrect action affecting clinical outcome (Zone C), significant medical risk (Zone D), and to dangerous treatment decisions (Zone E). Figure 11 compares a rejected Level 1 architecture with the selected Level 2 model. To account for uncertainty, we overlay uncertainty bands from both CGM measurements noise and TCN predictions. While the mean predictions of the Level 1 model appear reasonable, its uncertainty spreads into higher-risk regions (primarily Zone B), indicating potential for clinically suboptimal decisions. In contrast, the selected Level 2 architecture concentrates predictions and associated uncertainty within Zone A, indicating clinically safe behavior. This comparison confirms that EVIDENT’s validation under uncertainty step also aligned with clinically meaningful risk criteria.
To provide a baseline for architecture discovery, we compared EVIDENT against random search with similar budget. Random search is a standard baseline for hyperparameter and architecture selection because it provides a non-adaptive sampling strategy and has been shown to be competitive with grid search under fixed computational budgets [34]. In contrast to EVIDENT, which progressively narrows the candidate space through evidence-guided ranking and validation across ordered capacity levels, random search samples architectures uniformly from the feasible pool and selects models solely based on held-out performance.
The baseline study uses the same pool of 61 feasible TCN architectures and the same population-based to subject-specific prediction protocol employed in the EVIDENT experiments. To approximately match the computational budget required by EVIDENT up to acceptance, random search samples 19 architectures uniformly without replacement from the feasible candidate pool, corresponding to the total number of architectures evaluated in Levels 1 and 2. The sampled architectures are listed in 8 where to distinguish incomplete architecture coverage from the selection rule itself, we considered a random-search subset that included the EVIDENT-selected architecture, denoted here as \(RandArch_6=Level_2Arch_4\). Each sampled architecture is first trained on the population training subjects within the corresponding fold. For each held-out subject, the resulting population posterior is then used as the prior for subject-specific adaptation using three days of patient data. Architecture selection is subsequently performed on day 4 using rolling one-hour prediction windows, where the selected architecture minimizes the NLPD across the held-out subjects. Consistent with the EVIDENT protocol, day 5 is excluded from model selection and reserved exclusively for final comparison with EVIDENT results.
The random-search criterion selects \(RandArch_8\) due to lowest average day 4 validation NLPD for held-out patients even though \(RandArch_6=Level_2Arch_4\) is in the 19 randomly selected architectures in Table 7. \(RandArch_8\) contains 133424 trainable parameters, with \(N=4\), \(f=7\), \(b=5\), encoder channels \([8,16,32,64]\), and \(\mathrm{RF}=1873\). In comparison, \(Level_2Arch_4\) contains 43268 trainable parameters and has a similar receptive field, \(\mathrm{RF}=1937\); its full architectural specification is reported in Table 5. Thus, the two models have comparable temporal coverage, but \(RandArch_8\) achieves it through a larger dilation base, wider filter size and more number of channels, leading to approximately three times more trainable parameters.
Figure 12 compares the 1-hour rolling predictions of \(RandArch_8\) for the held-out patients 3 and 4 in Fold 4. For the diagnostic comparison in this figure, we also report the rolling-window root mean-squared error (RMSE) and coefficient of variation (CV), representing accuracy and reliability of TCN forecast respectively, \[\mathrm{RMSE} = \left[ \frac{1}{H} \left\| G_{\mathrm{data}}^{(k+1:k+H)} - \overline{\mathcal{T}}_{w,\xi}\!\left( G_{\mathrm{data}}^{(k-d_G:k)}, M_{\mathrm{data}}^{(k-d_M:k)}, I_{\mathrm{data}}^{(k-d_I:k)} \right) \right\|_2^2 \right]^{1/2}, \label{eq:rmse}\tag{11}\] and \[\mathrm{CV} = \frac{100}{H} \sum_{h=1}^{H} \frac{ \sqrt{ \mathrm{Var}\!\left[ \mathcal{T}_{w,\xi}^{(k+h)}\!\left( G_{\mathrm{data}}^{(k-d_G:k)}, M_{\mathrm{data}}^{(k-d_M:k)}, I_{\mathrm{data}}^{(k-d_I:k)} \right) \right] } }{ \left| \overline{\mathcal{T}}_{w,\xi}^{(k+h)}\!\left( G_{\mathrm{data}}^{(k-d_G:k)}, M_{\mathrm{data}}^{(k-d_M:k)}, I_{\mathrm{data}}^{(k-d_I:k)} \right) \right| }. \label{eq:cv}\tag{12}\] Here, \(h\) indexes the forecast step within the \(H\)-step prediction horizon, \(\overline{\mathcal{T}}_{w,\xi}\) is the posterior predictive mean, and \(\mathrm{Var}[\mathcal{T}_{w,\xi}^{(k+\ell)}]\) is the posterior predictive variance at forecast step \(k+\ell\). The rolling-window RMSE and CV show that this additional capacity does not translate into more reliable validation performance. For patient 3, \(RandArch_8\) exhibits larger RMSE over several one-hour windows and higher predictive CV, resulting in failure under the NLPD validation criterion. For patient 4, \(RandArch_8\) attains lower RMSE in some windows, but this subject-specific improvement is not consistent across the held-out set. In contrast, \(Level_2Arch_4\) satisfies the NLPD criterion for both held-out patients while using a substantially smaller architecture. These results demonstrate that EVIDENT improves the reliability of architecture discovery compared to random search, not because random sampling may fail to include the appropriate architecture, but because architecture selection based solely on held-out validation performance is not sufficiently robust for future-day probabilistic forecasting. By coupling Bayesian model evidence guided search and held-out validation, EVIDENT avoids selecting larger architectures whose forecast does not generalize consistently to unseen subjects.
The primary methodological insight of this work is that Bayesian model evidence provides a natural criterion for architecture and prior selection, particularly in data-limited and heterogeneous settings. In practice, both quantities are approximated. For example, the posterior over network weights is obtained through variational inference, the evidence is evaluated using a Laplace approximation, and the search is restricted to a finite, pre-defined pool of feasible TCN architectures. Across this finite TCN candidate pool, the approximate evidence landscape is highly non-uniform and concentrates on a narrow intermediate-capacity regime, rather than favoring architectures with the largest receptive field or parameter count. This behavior suggests that strong predictive performance in this setting arises from a balance between temporal expressivity and the degree to which model parameters are learned from the available data. At the same time, the results demonstrate that evidence alone is insufficient for accepting a model as an accurate and reliable predictor under uncertainty. Because the evidence is evaluated on the training data used for model construction, it can still favor architectures that explain that data well without satisfying the desired generalization behavior on unseen subjects. This observation motivates a clear separation between model ranking and model validation with quantified uncertainty. Within EVIDENT, approximate Bayesian evidence is used to rank candidate architectures within a prescribed search space, while task-specific validation under predictive uncertainty determines whether a candidate satisfies the requirements of the intended forecasting task. Consequently, EVIDENT identifies architectures that remain credible under validation under uncertainty, rather than selecting models solely based on training or validation error. Comparison against a random-search baseline further highlights the importance of separating evidence-guided ranking from validation. In particular, selection based only on held-out validation performance can favor larger architectures that achieve competitive short-term accuracy but exhibit reduced robustness and less reliable generalization to unseen subjects.
Beyond the glucose forecasting application, EVIDENT can be applied to neural forecasting problems characterized by noisy measurements, limited data, and heterogeneous operating conditions. In such settings, architecture selection is better viewed as a model selection problem under task-specific constraints, rather than a purely hyperparameter optimization. From this perspective, EVIDENT contributes two key elements. First, the level-wise search imposes structure on the otherwise large combinatorial architecture space by progressively exploring increasingly expressive model classes, reducing the need for across all candidates at once. Second, the framework couples the evidence-based ranking with task-specific validation, so that model acceptance depends on predictive accuracy and reliability for the target task rather than training fit alone. The plausibility-weighted ensemble results further suggest that when approximate evidence is distributed across multiple competitive architectures, EVIDENT can be extended from selecting a single model to combining a small set of candidates, improving predictive robustness while better representing prediction uncertainty. To this end, this work positions architecture discovery as a principled selection process that balances the model capacity and task-dependent evaluation. We emphasize that, the EVIDENT is explicitly task-specific that the discovered architecture is validated for a particular forecasting context, not as a universally optimal model.
Several limitations of the present study demands extension and improvement for future works. First, the current implementation evaluates architectures over a finite, discrete candidate pool defined by receptive-field and structural constraints tailored to glucose dynamics. While this restriction provides an interpretable architecture pool, it is not intrinsic to the EVIDENT framework. The same evidence-guided ranking and validation strategy can be applied to continuous or hybrid architecture spaces by integrating with standard architecture search methods (e.g., [4], [7]) to propose candidates within and across capacity levels. Moreover, the Bayesian formulation employed in this work relies on several approximations. The posterior over network weights is approximated using mean-field variational inference, while the model evidence is estimated through a Laplace approximation based on the calculated variational posterior. Although these approximations provide a computationally tractable alternative to exact Bayesian inference, they can influence the resulting plausibility landscape and, consequently, the ranking of candidate architectures. Future work will investigate more expressive posterior representations, including Markov chain Monte Carlo methods and richer variational families, e.g., [35], as well as alternative evidence estimators that may improve the robustness and stability of architecture ranking. Finally, the type 1 diabetes study is based on a small number patients and a relatively small cohort, which is appropriate for methodology development but does not substitute for evaluation on real clinical datasets with more complex sources of variability, CGM sensor noise, and recording meals.
This paper introduced EVIDENT, a framework for neural architecture discovery that systematically integrates Bayesian learning, evidence-based ranking, and task-specific validation to identify the lowest-capacity, i.e., most parsimonious, architecture that is both supported by the available data and satisfies the prescribed validation criterion thus delivers reliable forecasting under uncertain time-series data. Applied to Bayesian TCNs for subject-specific blood glucose forecasting, the results show that validation-accepted predictors lie in an intermediate-capacity regime, while both under- and over-parameterized models fail to generalize to unseen patients. These findings highlight the importance of combining evidence-guided ranking with task-specific validation for architecture design in limited and uncertain data for consequential forecasting settings.
Md Azharul Islam, Tarunraj Singh, and Danial Faghihi acknowledge support from the National Science Foundation (NSF) under award number DMS-2533946. The authors also acknowledge computational support provided by the Center for Computational Research at the University at Buffalo.
This work was supported by the NSF under award number DMS-2533946. NSF had no role in the analysis, interpretation of results, writing of the manuscript, or decision to submit the article for publication.
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
The data used in this study were generated from the Bergman minimal model and the UVA/Padova Type 1 Diabetes simulator, as described in the manuscript. The generated datasets and implementation code will be made available in a public GitHub repository upon publication. During peer review, they are available from the corresponding author upon request.
During the preparation of this work, the authors used Grammarly and ChatGPT to assist with language editing, clarity, and readability. After using this tool, the authors reviewed and edited the manuscript as needed and take full responsibility for the content of the published article.
This appendix summarizes the Laplace approximations used to evaluate the evidence terms introduced in Section 2.3. For a fixed architecture \(\xi\) and inference hyperparameters \(\sigma=(\sigma_{\mathrm{pr}},\sigma_{\mathrm{noise}})\), the evidence distribution in 4 is approximated by \[\begin{align} \log \pi_{\mathrm{evid}}(\mathcal{D}\mid \sigma,\xi) \approx\;& -\frac{1}{2\sigma_{\mathrm{noise}}^{2}} \sum_{k=1}^{N_D} \left\| G_{\mathrm{data}}^{(k+1:k+H)} - \mathcal{T}_{w_{\mathrm{MAP}},\xi} \!\big( G_{\mathrm{data}}^{(k-d_G:k)}, M_{\mathrm{data}}^{(k-d_M:k)}, I_{\mathrm{data}}^{(k-d_I:k)} \big) \right\|_2^{2} \nonumber\\ &-\frac{N_D H}{2}\log\!\big(2\pi\sigma_{\mathrm{noise}}^{2}\big) -\frac{1}{2\sigma_{\mathrm{pr}}^{2}}\|w_{\mathrm{MAP}}\|_2^{2} -\frac{W}{2}\log\!\big(2\pi\sigma_{\mathrm{pr}}^{2}\big) \nonumber\\ &-\frac{1}{2}\log\det\!\left(\frac{P}{2\pi}\right). \label{eq:log95evid} \end{align}\tag{13}\] Here, \(N_D\) denotes the number of training input–output windows and \(H\) the prediction horizon, so that \(N_DH\) is the total number of blood glucose observations. The data-misfit term is evaluated at \(w_{\mathrm{MAP}}\), approximated by the mean of the variational posterior. The matrix \(P\) denotes the Hessian of the negative log-posterior with respect to the trainable weights. Rather than computing \(P\) explicitly, we approximate \(P^{-1}\) using the diagonal covariance of the mean-field variational posterior, yielding \(\log\det(P)\) as the negative sum of the logarithms of the posterior variances.
The evidence distribution in 6 for architecture comparison under Laplace approximation is obtained by marginalizing the inference hyperparameters around their MAP estimate: \[\pi_{\mathrm{evid}}(\mathcal{D}\mid \xi) \approx \pi_{\mathrm{evid}}(\mathcal{D}\mid \sigma_{\mathrm{MAP}},\xi)\, \pi_{\mathrm{pr}}(\sigma_{\mathrm{MAP}}\mid \xi)\, \Big[ 2\pi\sqrt{ \mathrm{Var}(\sigma_{\mathrm{pr}}^{2})\, \mathrm{Var}(\sigma_{\mathrm{noise}}^{2}) } \Big]. \label{eq:evid3}\tag{14}\] The variances in 14 correspond to the Gaussian approximation of the posterior over the inference hyperparameters.
This appendix provides the simulator equations and parameter values used to generate the single-patient dataset in Figure 3. The Bergman states are plasma glucose \(G(t)\) [mg/dL], remote insulin action \(X(t)\) [min\(^{-1}\)], and plasma insulin \(I(t)\) [mU/L], with basal values \(G_b\) and \(I_b\). For a Type-1 diabetic (T1D) subject, endogenous pancreatic secretion is removed and insulin is administered externally. The stabilized T1D model is \[\begin{align} \dot{G}(t) &= -\big(X(t)+p_1\big)\,G(t) + p_1 G_b + \frac{R_{ag}(t)}{V_g}, \tag{15}\\ \dot{X}(t) &= -p_2 X(t) + p_3\big(I(t)-I_b\big), \tag{16}\\ \dot{I}(t) &= -p_4\big(I(t)-I_b\big) + U(t), \tag{17} \end{align}\] where \(V_g\) [dL] is the glucose distribution volume and \(U(t)\) is the insulin control input around basal. This form is obtained by writing the physical infusion as \[U_0(t) = U(t) + p_4 I_b,\] so that \(p_4 I_b\) mimics the basal insulin dose required to prevent the open-loop glucose drift in T1D. Meal absorption is modeled with stomach–gut compartments whose output is \(R_{ag}(t)\). Let \(q_{\mathrm{sto}1}(t)\) and \(q_{\mathrm{sto}2}(t)\) [mg] denote stomach glucose in solid and liquid phases, and \(q_{\mathrm{gut}}(t)\) [mg] denote intestinal glucose. A meal of size \(D\) [mg] consumed at time \(t_m\) is injected using a Dirac impulse: \[\begin{align} \dot{q}_{\mathrm{sto}1}(t) &= -k_{21}\,q_{\mathrm{sto}1}(t) + D\,\delta(t-t_m), \tag{18}\\ \dot{q}_{\mathrm{sto}2}(t) &= -k_{\mathrm{empt}}\!\big(q_{\mathrm{sto}}(t)\big)\,q_{\mathrm{sto}2}(t) + k_{21}\,q_{\mathrm{sto}1}(t), \tag{19}\\ \dot{q}_{\mathrm{gut}}(t) &= -k_{\mathrm{abs}}\,q_{\mathrm{gut}}(t) + k_{\mathrm{empt}}\!\big(q_{\mathrm{sto}}(t)\big)\,q_{\mathrm{sto}2}(t), \tag{20}\\ R_{ag}(t) &= f\,k_{\mathrm{abs}}\,q_{\mathrm{gut}}(t), \qquad q_{\mathrm{sto}}(t)=q_{\mathrm{sto}1}(t)+q_{\mathrm{sto}2}(t), \tag{21} \end{align}\] where \(k_{21}\) [min\(^{-1}\)] governs transfer from solid to liquid stomach phase, \(k_{\mathrm{abs}}\) [min\(^{-1}\)] governs intestinal absorption, and \(f\) is a dimensionless bioavailability factor. Gastric emptying is modeled as a smooth nonlinearity between \(k_{\min}\) and \(k_{\max}\): \[\begin{align} k_{\mathrm{empt}}(q_{\mathrm{sto}}) &= k_{\min} + \tfrac12\big(k_{\max}-k_{\min}\big)\Big( \tanh\!\big[\alpha(q_{\mathrm{sto}}-bD)\big] -\tanh\!\big[\beta(q_{\mathrm{sto}}-cD)\big] + 2\Big), \tag{22}\\ \alpha &= \frac{5}{2D(1-b)}, \qquad \beta = \frac{5}{2Dc}, \tag{23} \end{align}\] with \(b,c\in(0,1)\) dimensionless shape parameters.
| Parameter | Value | Units |
|---|---|---|
| \(p_1\) | \(0.028735\) | min\(^{-1}\) |
| \(p_2\) | \(0.028344\) | min\(^{-1}\) |
| \(p_3\) | \(5.035\times 10^{-5}\) | min\(^{-2}\cdot\)L/mU |
| \(p_4\) | \(5/54\) | min\(^{-1}\) |
| \(G_b\) | \(119.1858\) | mg/dL |
| \(I_b\) | \(15.3872\) | mU/L |
| \(V_g\) | \(128.8237\) | dL |
| \(k_{\max}\) | \(0.0429\) | min\(^{-1}\) |
| \(k_{\min}\) | \(0.0141\) | min\(^{-1}\) |
| \(k_{\mathrm{abs}}\) | \(0.2062\) | min\(^{-1}\) |
| \(k_{21}\) | \(0.0558\) | min\(^{-1}\) |
| \(b\) | \(0.7612\) | – |
| \(c\) | \(0.1372\) | – |
| \(f\) | \(0.9\) | – |
| \(\gamma\) | N/A (T1D) | – |
| \(h\) | N/A (T1D) | mg/dL |
For creating the training data in Figure 3, meal variability is introduced by perturbing both meal size and meal timing. For each meal, the carbohydrate amount is sampled as \(D \sim \mathcal{U}(0.7D_{\mathrm{nom}},1.3D_{\mathrm{nom}})\), with \(D_{\mathrm{nom}}\in\{20,40,60\}\) g for breakfast, lunch, and dinner, respectively. Meal timing is independently jittered by an offset sampled from \(\mathcal{U}(-50,50)\) minutes.
This appendix reports the implementation constraints and detailed architecture specifications used to construct the 61 candidate TCNs summarized in Table 2. Kernel sizes are restricted to (\(f \le 15\)), which is sufficient to represent local glucose excursions without excessively large convolutional filters. Encoder channel width are initialized with 2 filters in the first temporal block and increased by a factor of two across successive encoder blocks, up to a maximum of 512 filters, with a mirrored decoder schedule. Tables 4–6 summarize the Level 1–3 architectures explored by EVIDENT in the numerical experiments, and Table 7 lists the 19 architectures used in the random-search baseline.
| Architecture ID | Parameter count | Temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Encoder channels \(\{c_j\}_{j=1}^{N}\) |
|---|---|---|---|---|---|
| Architecture ID | Parameter count | Temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Encoder channels \(\{c_j\}_{j=1}^{N}\) |
| \(Level_1Arch_1\) | 2756 | 3 | 9 | 9 | \([2, 4, 8]\) |
| \(Level_1Arch_2\) | 3356 | 3 | 11 | 8 | \([2, 4, 8]\) |
| \(Level_1Arch_3\) | 3356 | 3 | 11 | 9 | \([2, 4, 8]\) |
| \(Level_1Arch_4\) | 3956 | 3 | 13 | 8 | \([2, 4, 8]\) |
| \(Level_1Arch_5\) | 8492 | 4 | 7 | 5 | \([2, 4, 8, 16]\) |
| \(Level_1Arch_6\) | 10696 | 3 | 9 | 9 | \([4, 8, 16]\) |
| \(Level_1Arch_7\) | 13048 | 3 | 11 | 8 | \([4, 8, 16]\) |
| \(Level_1Arch_8\) | 13048 | 3 | 11 | 9 | \([4, 8, 16]\) |
| \(Level_1Arch_9\) | 13276 | 4 | 11 | 4 | \([2, 4, 8, 16]\) |
| \(Level_1Arch_{10}\) | 15400 | 3 | 13 | 8 | \([4, 8, 16]\) |
| Architecture ID | Parameter count | Temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Encoder channels \(\{c_j\}_{j=1}^{N}\) |
|---|---|---|---|---|---|
| Architecture ID | Parameter count | Temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Encoder channels \(\{c_j\}_{j=1}^{N}\) |
| \(Level_2Arch_1\) | 33560 | 4 | 7 | 5 | \([4, 8, 16, 32]\) |
| \(Level_2Arch_2\) | 33708 | 5 | 7 | 3 | \([2, 4, 8, 16, 32]\) |
| \(Level_2Arch_3\) | 42128 | 3 | 9 | 9 | \([8, 16, 32]\) |
| \(\mathbf{Level_2Arch_4}\) | 43268 | 5 | 9 | 3 | \(\boldsymbol{[2, 4, 8, 16, 32]}\) |
| \(Level_2Arch_5\) | 51440 | 3 | 11 | 8 | \([8, 16, 32]\) |
| \(Level_2Arch_6\) | 51440 | 3 | 11 | 9 | \([8, 16, 32]\) |
| \(Level_2Arch_7\) | 52600 | 4 | 11 | 4 | \([4, 8, 16, 32]\) |
| \(Level_2Arch_8\) | 57852 | 6 | 3 | 3 | \([2, 4, 8, 16, 32, 64]\) |
| \(Level_2Arch_9\) | 60752 | 3 | 13 | 8 | \([8, 16, 32]\) |
| Architecture ID | Parameter count | Temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Encoder channels \(\{c_j\}_{j=1}^{N}\) |
|---|---|---|---|---|---|
| Architecture ID | Parameter count | Temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Encoder channels \(\{c_j\}_{j=1}^{N}\) |
| \(Level_3Arch_1\) | 133424 | 4 | 7 | 5 | \([8, 16, 32, 64]\) |
| \(Level_3Arch_2\) | 134168 | 5 | 7 | 3 | \([4, 8, 16, 32, 64]\) |
| \(Level_3Arch_3\) | 167200 | 3 | 9 | 9 | \([16, 32, 64]\) |
| \(Level_3Arch_4\) | 172360 | 5 | 9 | 3 | \([4, 8, 16, 32, 64]\) |
| \(Level_3Arch_5\) | 204256 | 3 | 11 | 8 | \([16, 32, 64]\) |
| \(Level_3Arch_6\) | 204256 | 3 | 11 | 9 | \([16, 32, 64]\) |
| \(Level_3Arch_7\) | 209392 | 4 | 11 | 4 | \([8, 16, 32, 64]\) |
| \(Level_3Arch_8\) | 230328 | 6 | 3 | 3 | \([4, 8, 16, 32, 64, 128]\) |
| \(Level_3Arch_9\) | 241312 | 3 | 13 | 8 | \([16, 32, 64]\) |
| \(Level_3Arch_{10}\) | 249012 | 6 | 13 | 2 | \([2, 4, 8, 16, 32, 64]\) |
| Random-search Architecture ID | EVIDENT ID | Parameter count | Temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Encoder channels \(\{c_j\}_{j=1}^{N}\) |
|---|---|---|---|---|---|---|
| Random-search Architecture ID | EVIDENT ID | Parameter count | Temporal blocks \(N\) | Filter size \(f\) | Dilation base \(b\) | Encoder channels \(\{c_j\}_{j=1}^{N}\) |
| \(RandArch_1\) | \(Level_1Arch_1\) | 2756 | 3 | 9 | 9 | \([2, 4, 8]\) |
| \(RandArch_2\) | \(Level_1Arch_3\) | 3356 | 3 | 11 | 9 | \([2, 4, 8]\) |
| \(RandArch_3\) | \(Level_1Arch_4\) | 3956 | 3 | 13 | 8 | \([2, 4, 8]\) |
| \(RandArch_4\) | \(Level_1Arch_9\) | 13276 | 4 | 11 | 4 | \([2, 4, 8, 16]\) |
| \(RandArch_5\) | \(Level_2Arch_1\) | 33560 | 4 | 7 | 5 | \([4, 8, 16, 32]\) |
| \(RandArch_6\) | \(Level_2Arch_4\) | 43268 | 5 | 9 | 3 | \([2, 4, 8, 16, 32]\) |
| \(RandArch_7\) | \(Level_2Arch_8\) | 57852 | 6 | 3 | 3 | \([2, 4, 8, 16, 32, 64]\) |
| \(\mathbf{RandArch_8}\) | \(\mathbf{Level_3Arch_1}\) | 133424 | 4 | 7 | 5 | [8,16,32,64] |
| \(RandArch_9\) | \(Level_3Arch_4\) | 172360 | 5 | 9 | 3 | \([4, 8, 16, 32, 64]\) |
| \(RandArch_{10}\) | \(Level_3Arch_5\) | 204256 | 3 | 11 | 8 | \([16, 32, 64]\) |
| \(RandArch_{11}\) | \(Level_3Arch_8\) | 230328 | 6 | 3 | 3 | \([4, 8, 16, 32, 64, 128]\) |
| \(RandArch_{12}\) | \(Level_4Arch_1\) | 532064 | 4 | 7 | 5 | \([16, 32, 64, 128]\) |
| \(RandArch_{13}\) | \(Level_4Arch_4\) | 666176 | 3 | 9 | 9 | \([32, 64, 128]\) |
| \(RandArch_{14}\) | \(Level_4Arch_5\) | 688016 | 5 | 9 | 3 | \([8, 16, 32, 64, 128]\) |
| \(RandArch_{15}\) | \(Level_5Arch_1\) | 2124992 | 4 | 7 | 5 | \([32, 64, 128, 256]\) |
| \(RandArch_{16}\) | \(Level_5Arch_5\) | 2749216 | 5 | 9 | 3 | \([16, 32, 64, 128, 256]\) |
| \(RandArch_{17}\) | \(Level_5Arch_6\) | 3250048 | 3 | 11 | 8 | \([64, 128, 256]\) |
| \(RandArch_{18}\) | \(Level_6Arch_4\) | 10627328 | 3 | 9 | 9 | \([128, 256, 512]\) |
| \(RandArch_{19}\) | \(Level_6Arch_{10}\) | 15899808 | 6 | 13 | 2 | \([16, 32, 64, 128, 256, 512]\) |