Sparse time-varying log-ratios for longitudinal high-throughput sequencing data Authors: Ruijin Lu, Guoqi Yu, Cuilin Zhang, Zhen Chen Published: 2026 ABSTRACT High-throughput, longitudinal omics data, such as metabolomics or microbiome profiles, present analytical challenges owing to their compositional nature and irregular observation times. Although existing approaches can address compositional or temporal aspects separately, very few are tailored to capture both properties simultaneously in a high-dimensional setting. We introduce LCoDaCoRe as a supervised learning method to identify sparse time-varying log-ratio features from longitudinal, compositional data. The proposed approach integrates functional data analysis and continuous relaxation to enable efficient feature selection from the log-ratio values. By expanding the log-transformed trajectories in their eigenspaces, LCoDaCoRe accommodates both dense and sparse sampling designs. In simulation studies, the proposed method demonstrated favorable performance in terms of predictive accuracy, selection sparsity, and precision compared to cross-sectional methods across varying correlation structures and outcome prevalence levels. Finally, we applied LCoDaCoRe to longitudinal lipidomics data from the NICHD Fetal Growth Studies and identified a highly interpretable log-ratio of triglycerides to sphingolipids that yielded more stable selection and better predictions for large-for-gestational-age births. Introduction The advent of high-throughput sequencing technologies has enabled the longitudinal profiling of complex biological systems, including metabolomics, lipidomics, and microbiome compositions. These data provide opportunities to study dynamic biological processes and have become increasingly prominent in biomedical research. For example, longitudinal lipidomics can reveal the gestational changes in lipid metabolism during pregnancy. However, analyzing these data poses several statistical challenges; the measurements are often high-dimensional and compositional, and the longitudinal design introduces within-subject correlations that can lead to misleading conclusions if ignored. In addition, repeated measurements are often obtained at irregular time points and may be sparsely observed across individuals, making it difficult to characterize trajectories consistently across the study cohort. These features necessitate modeling strategies that can jointly handle the compositional structure, temporal dynamics, and sparse sampling patterns of longitudinal data. Many high-throughput omics data, including microbiome, metabolomics, and lipidomics profiles, are inherently compositional (Quinn et al., 2019), meaning that only the relative proportions of the components are informative while the total abundance is arbitrary. This is because the measurements often reflect constrained resources (e.g., total ion intensity, sequencing depth) or normalization procedures, which render the absolute values incomparable across samples. For example, in untargeted metabolomics, the measured peak intensities reflect signal abundances dependent on the total ion currents. As a result, two samples with the same absolute metabolite concentrations can still yield different raw intensities when analyzed on the same instrument under identical preparation procedures (Dunn et al., 2011). Thus, applying standard multivariate analyses directly to raw intensities or normalized abundances can yield misleading results due to the unit-sum constraint and induced negative correlations among the components. Hence, the log-ratio transformation has become a widely used strategy in compositional data analysis (Quinn et al., 2019; Aitchison, 1982). The log-ratio value expresses the relative abundances among components or groups of components and offers properties such as scale invariance and subcompositional coherence (Egozcue and Pawlowsky-Glahn, 2005); these features are biologically meaningful. Many established biomarkers, such as the plasma amyloid- β ratio in Alzheimer’s disease (Schultz et al., 2024) and the ratio of free triiodothyronine (fT3) to free thyroxine (fT4) in thyroid function assessment (Rawal et al., 2018), reflect contrasts between molecular groups. Therefore, modeling in the log-ratio space improves both statistical validity and biological interpretability. Among log-ratio approaches, the balance feature, defined as the log-ratio between the geometric means of two disjoint groups of components, is appealing for its flexibility (Aitchison, 1982). It generalizes simple ratios by contrasting sets of components. Building on this idea, the compositional data via continuous relaxation (CoDaCoRe) framework (Gordon-Rodriguez et al., 2022) introduced a supervised learning approach that uses continuous relaxation to efficiently identify sparse and predictive log-ratios from cross-sectional data. However, CoDaCoRe and related approaches have not been developed for longitudinal compositional data, where the goal is to identify predictive log-ratio features whose trajectories, along with their effects on the outcome, can vary over time. Longitudinal compositional data are analytically challenging as they are no longer static compositions but trajectories that evolve over time and are often observed with sparse or irregular schedules. While the majority of longitudinal omics methods model compositional features as outcomes by either recovering trajectories from incomplete observations or performing featurewise inference for temporal associations and group differences using generalized mixed-effects, two-part, or spline-based frameworks (Peleg and Borenstein, 2024; Zhang and Yi, 2020; Shields-Cutler et al., 2018; Chen and Li, 2016; Metwally et al., 2018), some works have instead used longitudinal omics profiles as predictors of clinical outcomes. Some of these approaches reduce trajectories to scalar summaries before regression; for example, coda4microbiome uses area-under-the-curve (AUC) summaries of log-ratio trajectories, while PROLONG uses first differences in a penalized regression framework (Calle et al., 2023; Broll et al., 2025). Alternatively, Sun et al. (2020) proposed functional log-contrast regression for compositional trajectories. However, these methods do not address the supervised construction of sparse log-ratio features, such as balances, from a high-dimensional set of longitudinal compositional predictors. In this study, we extended CoDaCoRe by introducing a supervised learning framework for longitudinal compositional data via continuous relaxation(LCoDaCoRe). Here, LCoDaCoRe represents log-transformed trajectories via functional principal component analysis (FPCA) and constructs interpretable log-ratio features (balances) whose values and associations with the outcomes can evolve over time. To identify sparse and predictive features, LCoDaCoRe employs a differentiable optimization routine as in CoDaCoRe and extends balance-based learning to longitudinal compositional settings. LCoDaCoRe uses FPCA to represent the longitudinal predictors via principal analysis by conditional expectation (PACE; Yao et al., 2005), which is designed for estimation with sparse and irregular observations. In the functional data analysis, repeated measurements are modeled as noisy observations from subject-specific realizations of a common smooth stochastic process over a continuous time domain (Morris, 2015; Ramsay and Dalzell, 1991). In our framework, we assumed that the log-transformed predictor trajectories shared a common basis representation so that each predictor trajectory could be expressed using the same set of basis functions with predictor- and subject-specific coefficients. Under this assumption, the induced log-ratio features (i.e., balances) can be represented using the same basis system; these representations reformulate the functional compositional problem in terms of the associated coefficients and yield a tractable multivariate formulation for balance learning. We evaluated the performance of LCoDaCoRe through extensive simulations with varied correlation structures, signal sparsity, and case prevalence and benchmarked it against cross-sectional alternatives. We further applied our method to lipidomics data from the National Institute of Child Health and Human Development (NICHD) Fetal Growth Studies (Grewal et al., 2018; Louis et al., 2015) with the aim of identifying time-varying lipid signatures predictive of large-for-gestational-age (LGA) births. These analyses show that LCoDaCoRe meets our main goal of extending log-ratio learning to longitudinal compositional data, producing stable and interpretable features that improve both predictive accuracy and model parsimony. The remainder of this manuscript is organized as follows. Section 2 introduces the methodological components and statistical framework of LCoDaCoRe. Section 3.1 reports on our simulation studies evaluating the predictive accuracy, sparsity, and variable selection performances. Section 3.2 applies the proposed method to longitudinal lipidomics data from the NICHD Fetal Growth Studies cohort. Finally, Section 4 presents a discussion of the implications, limitations, and future directions of this approach. Materials and methods Problem formulation We consider a supervised learning problem xi(t)↦yi , where the predictors xi(t) are longitudinal metabolomics or other compositional data at time t , and the response yi is an outcome of interest. Specifically, for a subject i , the expression xit=xi1t,…,xiptT∈Sp−1 denotes the vector of compositions of p metabolites observed at time t . Here, Sp−1=[x1,…,xp]T∈Rp:xj>0,∑j=1pxj=1 denotes the (p−1) -dimensional positive simplex in Rp . The outcome yi can be either binary or continuous; for binary outcomes, it indicates whether the i th subject is a member of the case or non-case group; for continuous outcomes, yi represents a quantitative phenotype of interest. Our goal is to learn predictive features from the longitudinal compositional trajectories xi(t) associated with yi . Background Log-ratio-transformed features Compositionality implies that each element of xi(t) is inherently dependent on the others. To address this constraint, we construct log-ratio-transformed features that encode relative abundances in an unconstrained space where standard regression techniques are applicable. These log-ratio values can be formed between individual components or between aggregated groups using sums or geometric means. Their construction naturally ensures two key properties: scale invariance, meaning that the results are unaffected by the overall magnitude of a sample, and subcompositional coherence, where the interpretations remain valid even when the analysis is restricted to a subset of components. For example, the interpretation of the log-ratio log(xi1/xi2) remains the same regardless of whether the full composition (xi1,…,xip) or just the subset (xi1,xi2) is analyzed. These properties are fundamental to compositional data analysis, where only relative information is meaningful (Aitchison, 1982). In addition to these statistical advantages, the log-ratio values capture molecular balances that better reflect physiological processes than absolute concentrations sometimes. For example, the total cholesterol to high-density lipoprotein cholesterol (HDL-C) ratio is an established indicator of lipid atherogenesis as it reflects the balance of cholesterol transport into and out of the arterial intima rather than the level of a single lipid fraction (Nam et al., 2006). Balances One class of log-ratio values, known as balances (Egozcue and Pawlowsky-Glahn, 2005), has attracted attention in certain applications (Gordon-Rodriguez et al., 2022). A balance is defined as the log-ratio between the geometric means of two subsets of predictors, as shown in Equation 1: Bxi;J+,J−=log∏j∈J+xij1p+∏j∈J−xij1p−=1p+∑j∈J+logxij−1p−∑j∈J−logxij, (1) where J+ and J− are disjoint subsets of the indices {1,…,p} , and p+ and p− are their respective sizes. Balances generalize simple pairwise log-ratios (i.e., p+ = p− = 1) by contrasting the geometric means of two groups of predictors. This broader formulation offers three key advantages. First, balances provide modeling flexibility by allowing multiple predictors to contribute to both the numerator and denominator, thereby expanding the space of admissible contrasts beyond single-pair comparisons. Second, they yield concise and biologically interpretable biomarkers to quantify the relative contributions of one group to another. Third, balances retain additivity in the logarithmic scale (Equation 1), which makes them directly compatible with regression models, thereby easing their extension to longitudinal data. Scalar-on-function regression To model the time-varying features against a scalar outcome, we adopt a regression framework in which the predictor is a function and the outcome is a scalar. This falls within the scope of functional data analysis (Ramsay, 2005) and specifically the scalar-on-function regression, which characterizes the relationships between functional predictors and scalar responses. In this section, we briefly review some scalar-on-function regression models. For simplicity, we focus on the case of a univariate functional predictor xi(t) here, and the extension to a multivariate predictor xi(t) will be introduced in Section 2.3. The majority of scalar-on-function methods are based on the functional linear model (FLM), which was first introduced by Ramsay and Dalzell (1991) and later formalized by Hastie and Mallows (1993) in the widely used form shown in Equation 2: yi=β0+∫Txitβtdt+ϵi, (2) where yi∈R is a continuous scalar response for subject i=1,…,N , xi(t)∈L2(T) is a square-integrable functional predictor on the compact domain T⊂R , β(t)∈L2(T) is the coefficient function, β0 is the intercept, and ϵi∼N(0,σ2) are independent errors. The integral ∫Txi(t)β(t)dt represents the L2 inner product between the predictor and coefficient functions. For non-Gaussian responses, this framework is extended to the generalized FLM introduced by Marx and Eilers (1999), which assumes that the conditional distribution of yi belongs to an exponential family and models the mean response through a link function g(⋅) given by Equation 3: gEyi=β0+∫Txitβtdt. (3) Since any square-integrable function in L2(T) allows basis expansion, we approximate the integral term in the FLM using truncated basis representations xi(t)=∑k=1KXxik*ϕk(t) and β(t)=∑ℓ=1KBβℓ*ψℓ(t) , where {ϕk(t)} and {ψℓ(t)} are prespecified basis functions. Let xi*=(xi1*,…,xiKX*)⊤ , β*=(β1*,…,βKB*)⊤ , ϕ(t)=(ϕ1(t),…,ϕKX(t))⊤ , and ψ(t)=(ψ1(t),…,ψKB(t))⊤ ; then, ∫Txitβt dt=xi*⊤Jϕ,ψβ*=xi**⊤β*, (4) In Equation 4, Jϕ,ψ=∫Tϕ(t)ψ(t)⊤ dt is the cross-inner-product matrix of the two basis systems and xi**⊤=xi*⊤Jϕ,ψ . This formulation reduces the functional linear model to a multiple linear regression in β* . In practice, this formulation allows two useful simplifications. First, if the same orthonormal basis is used for both the predictor and coefficient functions, then Jϕ,ψ=I . Second, if subjects are observed on a common grid t=(t1,…,tT) , then Jϕ,ψ can be approximated numerically using quadrature as Jϕ,ψ≈ΦWΨ⊤ , where (Φ)k,r=ϕk(tr) , (Ψ)ℓ,r=ψℓ(tr) , and W=diag(w1,…,wT) contains the quadrature weights. For an equally spaced grid, this reduces to Jϕ,ψ≈Δt ΦΨ⊤ . One common choice of basis can be obtained using the functional principal components (fPCs) that are estimated from the eigen decomposition of the covariance surface of the predictor functions (Ramsay and Silverman, 2005). The fPCs form an orthonormal basis for L2(T) and are naturally ordered by decreasing eigenvalues. Regularization can be achieved by truncating the expansion and retaining only the leading components that capture a large percentage of the total variability (Cardot et al., 1999; Müller and Stadtmüller, 2005). For irregular and sparse functions, Yao et al. (2005) proposed the principal analysis by conditional expectation (PACE) method that borrows information across all curves using a kernel-smoothed covariance matrix to estimate the eigenfunctions. FPCA for sparse data: PACE In longitudinal study designs, the subjects are observed only a few times and at irregular time points. PACE (Yao et al., 2005) addresses this challenge by estimating the subject-specific fPC scores using both individual-level observations and information pooled across all subjects. This enables fPC expansion to be used in downstream analyses, such as scalar-on-function regression. Consistent with Equation 2, the univariate predictor trajectory for subject i is denoted as xi(t) . Here, we model it as an independent realization of a smooth random function X(t) , with mean function μ(t)=E[X(t)] and covariance function G(s,t)=cov(X(s),X(t)) . Under standard assumptions, the covariance function can be represented by the Karhunen–Loève expansion as G(s,t)=∑k=1∞λkϕk(s)ϕk(t) , where {ϕk} are orthonormal eigenfunctions in L2(T) and {λk} are the corresponding non-increasing eigenvalues. Then, xi(t) can be expressed as Equation 5: xit=μt+∑k=1∞ξikϕkt,tij∈T, (5) where ξik=∫(xi(t)−μ(t))ϕk(t)dt are the fPC scores. Let xi=(xi1,…,xiTi) and μi=(μ(ti1),…,μ(tiTi)) denote the observed data and mean vector for subject i . These observed data are subject to measurement errors. The j th observation from subject i , at time tij for j=1,…,Ti is modeled as xij=xi(tij)+ϵij , where ϵij are independent and identically distributed measurement errors with mean 0 and variance σ2 . The number of measurements obtained from the i th subject, Ti , can vary, reflecting the irregular sampling times. PACE first estimates the mean function μ(t) and the covariance function G(s,t) as μ^(t) and G^(s,t) , respectively, from the pooled observations of all subjects. The eigen decomposition of the smoothed covariance function is then performed to obtain the estimated eigenfunctions ϕk^ and eigenvalues λ^k . The measurement error σ2 is estimated as the average difference between the diagonal of the estimated G(s,t) and a local linear smoother focusing on the diagonal values. Given these estimates, the fPC score ξik for each subject is predicted by conditional expectation under a joint Gaussian assumption as ξ^ik=λ^kϕ^ikTΣi^−1xi−μ^i, where ϕ^ik=(ϕ^k(ti1),…,ϕ^k(tiTi))T , (Σ^i)j,l=G^(tij,til)+σ^2δjl , and μ^i=(μ^(ti1),…,μ^(tiTi)) . Suppose we retain the first K fPCs, xi** in Equation 4 can be replaced by (ξi1^,…,ξiK^) to estimate β* . We denote the estimated β* as β^*=(β^1*,…,β^K*) . These enable us to reconstruct and estimate the coefficient function in the time domain through ∑kβk*^ϕ^k(t) . The estimation details can be found in Yao et al. (2005). Methods We now present a novel supervised learning algorithm for longitudinal compositional data via continuous relaxation (LCoDaCoRe). Model Assume that the log-ratio-transformed features, specifically the balances, have time-homogeneous compositions, i.e., the compositions of the numerator and denominator of each feature do not change over time. We define the time-varying balance B(t) as Equation 6, as follows: Bxit,J+,J−=log∏j∈J+xijt1/p+∏j∈J−xijt1/p−=1p+∑j∈J+logxijt−1p−∑j∈J−logxijt, (6) where xij(t) is the j th predictor of the i th subject at time t with ∑jxij(t)=1 for any i∈{1,…,N} and t∈T ; J+ and J− that are not indexed using t , are disjoint subsets of the predictor index set {1,…,p} with sizes p+ and p− , respectively. The functional balances defined above are then passed to the downstream generalized regression model as gEyi=fxit=α+∫βt⋅Bxit;J+,J−dt, where B(xi(t);J+,J−) denotes the balance as a function of t (t∈T) , α is a scalar, and β(t) is a coefficient function of t . For clarity, we restrict our formulation to detecting one balance feature at a time. In practice, the algorithm repeats the regression step and updates the residuals so that multiple balances can be identified sequentially. The framework can also be extended to non-linear associations as long as they are differentiable. To facilitate estimation, we introduce the log-transformed composition vector for subject i as zit=zi1t,…,ziptT, zijt=logxijt, which provides a direct representation of the predictors on the log scale. The time-varying function in Equation 6 can be expressed equivalently as Equation 7: Bzit;J+,J−=1p+∑j∈J+zijt−1p−∑j∈J−zijt. (7) When the collection times are sparsely and irregularly sampled across subjects, we represent each log-transformed trajectory through the PACE framework. Let the discrete noisy observations of predictor j for subject i be denoted by zij=(zij1,…,zijTi) , where zijl=zij(tl)+ϵijl (l=1,…,Ti) . We treat the latent trajectory zij(t) as an independent realization of a smooth random function Zj(t) with mean function μj(t)=E{Zj(t)} and covariance function Gj(s,t)=cov{Zj(s),Zj(t)} . By the Karhunen–Loève expansion, zijt=μjt+∑k=1∞ξijkϕkt, where ξijk are the fPC scores. We assume a common set of eigenfunctions {ϕk(t)} across the predictors so that the basis domain is shared when constructing the balances. To estimate this shared basis, we pool the log-transformed predictor trajectories {zij(t):i=1,…,n, j=1,…,p} across both subjects and predictors and apply the FPCA via the PACE algorithm to the pooled trajectories. The resulting pooled covariance estimate is eigen-decomposed to obtain the shared eigenfunctions {ϕ^k(t)} , and ξ^ijk denotes the corresponding score for predictor j in subject i . Following the estimation steps in Section 2.2.4, each trajectory is approximated by its projection onto the space spanned by the first K estimated eigenfunctions as z^ijKt=μ^jt+∑k=1Kξ^ijkϕ^kt, where μ^j(t) , ξ^ijk , and ϕ^k(t) denote the estimated mean function, fPC scores, and eigenfunctions, respectively. Correspondingly, given two disjoint subsets J+ and J− in {1,…,p} , the balance is obtained as Equation 8: Bz^iKt,J+,J−=1p+∑j∈J+z^ijKt−1p−∑j∈J−z^ijKt=Δμ^J+,J−t+1p+∑j∈J+∑k=1Kξ^ijkϕ^kt−1p−∑j∈J−∑k=1Kξ^ijkϕ^kt=Δμ^J+,J−t+∑k=1KBik*ξ^ik,J+,J−ϕ^kt=Δμ^J+,J−t+Bi*Ξ^iK,J+,J−ϕ^t, (8) where Δμ^J+,J−(t)=1p+∑j∈J+μ^j(t)−1p−∑j∈J−μ^j(t) , z^iK(t)=(z^i1K(t),…,z^ipK(t))T , ξ^ik=(ξ^i1k,…,ξ^ipk)T , and Ξ^iK=(ξ^i1,…ξ^iK) . Here, Bi*(Ξ^iK,J+,J−) is a K -dimensional coefficient vector representing the balance in the basis domain for subject i . Equation 8 shows that the balance can be expanded using the same set of eigenfunctions, where the coefficients are given by the contrasts of the fPC scores averaged over the log-transformed predictors in J+ and J− . Suppose we expand the coefficient function β(t) using the same basis, i.e., β(t)=∑k=1Kβk*ϕ^k(t) ; as presented in the discussion following Equation 4, the cross-basis transformation reduces to the identity matrix. Hence, we can rewrite the regression model in the simplified vector form as Equation 9: fxit=α~+Bi*Ξ^iK,J+,J−β*, (9) where α~=α+∫β(t)Δμ^J+,J−(t)dt is the reparametrized intercept that absorbs the deterministic mean-contrast term, and β*=(β1*,…,βK*) . Given this simplified model, our goal is to estimate the regression parameters (α~,β*) and the compositions of the balance (J−,J+) . In the next section, we introduce a method to estimate these simultaneously through continuous relaxation at a reasonable computational cost. Estimation via continuous relaxation The outcome is modeled through a generalized linear model framework g(E(yi))=f(xi(t))=α~+Bi*(Ξ^iK,J+,J−)β* , where g(⋅) is a link function (e.g., logit for binary outcomes). We estimate (α~,β*,J+,J−) by maximizing the likelihood function or equivalently by minimizing the negative log-likelihood loss, which we define as L(yi,f(xi(t))) . However, identifying the balance requires selection of a discrete subset over (J+,J−) . Following the method by Gordon-Rodriguez et al. (2022), we approximate this discrete selection through continuous relaxation, which replaces the hard assignments of predictors to numerator or denominator groups with soft assignments. This relaxation yields a smooth optimization problem that can be solved efficiently by gradient descent algorithms. In continuous relaxation, each predictor (e.g., the trajectory of a metabolite) is assigned an unconstrained weight. Let the weight vector be ω=(ω1,…,ωp)∈R . These weights are mapped to soft assignments by applying the sigmoid transformation in Equation 10: ω~=2⋅sigmoidω−1=21+exp−ω−1, (10) This maps each ωj into the interval (−1,1) . This mapping serves as a smooth relaxation of the discrete set {−1,1,0} corresponding to membership in J− , J+ , and exclusion, respectively. We define ω~+=ReLU(ω~) and ω~−=ReLU(−ω~) , where ReLU(ω)=max(ω,0) is applied componentwise. The balance function in Equation 1 is then approximated by Equation 11: B~xit,ω=∑jω~j+⁡logxijt∑jω~j+−∑jω~j−⁡logxijt∑jω~j−=〈ω~+,logxit〉‖ω~+‖1−〈ω~−,logxit〉‖ω~−‖1. (11) Because ReLU is not differentiable at zero and Equation 11 is undefined when either ‖ω~+‖1=0 or ‖ω~−‖1=0 , the resulting surrogate objective is not globally smooth on Rp . Instead, optimization is carried out over the domain Ω=ω∈Rp:‖ω~+‖1>0,‖ω~−‖1>0, on which the objective is well-defined and almost everywhere differentiable. In other words, the subset-based geometric means are replaced by weighted geometric averages over all predictors. In the basis space, we can approximate the balance defined in Equation 8 as B~Kz^iKt,ω=∑jω~j+z^ijKt∑jω~j+−∑jω~j−z^ijKt∑jω~j−=1‖ω~+‖1ω~1+,…,ω~p+ξ^i11…ξ^i1K⋮⋱⋮ξ^ip1…ξ^ipKϕ^1t⋮ϕ^Kt−1‖ω~−‖1ω~1−,…,ω~p−ξ^i11…ξ^i1K⋮⋱⋮ξ^ip1…ξ^ipKϕ^1t⋮ϕ^Kt=B~i*Ξ^iK,ωϕ^t. This relaxation is differentiable with respect to ω . As a result, we can estimate the parameters by minimizing a smooth surrogate objective jointly with respect to (ω,α~,β*) through gradient descent as minω,α,β*∑iLyi,α~+B~i*Ξ^iK,ωβ*. Discretization and regularization Although the relaxed balance in Equation 11 retains all the information required to minimize the objective function, it includes contributions from all the predictors and is difficult to interpret. Here, it is preferable to construct the balances from a small subset of variables for interpretability. To induce sparsity, we follow the method of Gordon-Rodriguez et al. (2022) and discretize the soft assignment vector ω~ by thresholding. For a fixed τ∈(0,1) , predictors are assigned to the subsets as J~+=j:ω~j>τ,J~−=j:ω~j<−τ. Given a trained ω~ and threshold τ , the corresponding balance is evaluated in the basis domain as shown in Equation 8, while the regression coefficients are estimated by refitting the regression model. Computationally, fitting a linear model is a very fast process, and this step can be repeated for a range of values of τ τ within a cross-validation framework to select the threshold τ^ that optimizes predictive performance. Finally, the trained regression function is given by Equation 12: f^xit=α~^+Bi*Ξ^iK,J^+,J^−β^*, (12) where (J^+,J^−) are the subsets corresponding to the optimal threshold τ^ , and (α~^,β^*) are the coefficients obtained by refitting the model on the selected subsets. A larger τ will allow for the selection of fewer predictors, resulting in a sparser model. To choose the optimal threshold τ^ , we apply the λ -standard-error rule, which picks the sparsest model with a mean cross-validated score within the λ standard errors of the optimum. In practice, we report results for λ=0 (no regularization) and λ=1 , which is the commonly used 1-standard-error rule (Hastie et al., 2009). Selection of the number of basis functions The number of basis functions K used to represent the trajectories can be chosen in two ways. First, an information-loss threshold δ can be specified, and the smallest K is retained such that the first K eigenfunctions explain at least 1−δ of the total variation. Second, a cross-validation strategy can be used in which a large upper bound Kmax is set, and the algorithm is implemented for each K∈{1,…,Kmax} to select the value of K that optimizes predictive performance. The first approach is computationally efficient while the second approach is more adaptive. Our simulation studies (Section 3) show that both methods yield comparable results in terms of prediction accuracy and model sparsity. LCoDaCoRe algorithm The full procedure of LCoDaCoRe is summarized in Algorithm 1, and the major steps are as follows:Step 1:Basis construction. The shared eigenbasis is estimated by pooling the log-transformed predictor trajectories across subjects and predictors before applying FPCA via the PACE algorithm to the pooled trajectories.Step 2:Basis selection. A truncated set of eigenfunctions is retained according to one of the strategies described in Section 2.3.4. The time-domain predictors are also represented in the reduced basis domain.Step 3:Balance identification. A first balance is selected by fitting a regressor of the form shown in Equation 12.Step 4:Sequential balance selection. At each subsequent step, a new balance is identified using a stagewise update conditional on the current model. Here, the fitted value from the previous step is carried forward as an offset in the linear predictor, and the new balance is estimated while treating this offset as fixed. For continuous outcomes, the offset is the current fitted mean. For binary outcomes, the offset is the current fitted value on the logit scale. The model is then updated by adding the fitted value of the new balance to the current fitted value. This procedure continues until the cross-validated performance (e.g., out-of-sample AUC or RMSE) does not improve. Multiple balances are identified sequentially and are ordered by their predictive contributions. Step 1:Basis construction. The shared eigenbasis is estimated by pooling the log-transformed predictor trajectories across subjects and predictors before applying FPCA via the PACE algorithm to the pooled trajectories. Basis construction. The shared eigenbasis is estimated by pooling the log-transformed predictor trajectories across subjects and predictors before applying FPCA via the PACE algorithm to the pooled trajectories. Step 2:Basis selection. A truncated set of eigenfunctions is retained according to one of the strategies described in Section 2.3.4. The time-domain predictors are also represented in the reduced basis domain. Basis selection. A truncated set of eigenfunctions is retained according to one of the strategies described in Section 2.3.4. The time-domain predictors are also represented in the reduced basis domain. Step 3:Balance identification. A first balance is selected by fitting a regressor of the form shown in Equation 12. Balance identification. A first balance is selected by fitting a regressor of the form shown in Equation 12. Step 4:Sequential balance selection. At each subsequent step, a new balance is identified using a stagewise update conditional on the current model. Here, the fitted value from the previous step is carried forward as an offset in the linear predictor, and the new balance is estimated while treating this offset as fixed. For continuous outcomes, the offset is the current fitted mean. For binary outcomes, the offset is the current fitted value on the logit scale. The model is then updated by adding the fitted value of the new balance to the current fitted value. This procedure continues until the cross-validated performance (e.g., out-of-sample AUC or RMSE) does not improve. Multiple balances are identified sequentially and are ordered by their predictive contributions. Sequential balance selection. At each subsequent step, a new balance is identified using a stagewise update conditional on the current model. Here, the fitted value from the previous step is carried forward as an offset in the linear predictor, and the new balance is estimated while treating this offset as fixed. For continuous outcomes, the offset is the current fitted mean. For binary outcomes, the offset is the current fitted value on the logit scale. The model is then updated by adding the fitted value of the new balance to the current fitted value. This procedure continues until the cross-validated performance (e.g., out-of-sample AUC or RMSE) does not improve. Multiple balances are identified sequentially and are ordered by their predictive contributions. Algorithm 1LCoDaCoRe Inputs: Data (xi1,…,xitTi,yi)i∈{1,…,N} ; index set of training data Tr ; basis selection method Model ; minimum information loss δ ; maximum number of regressors M # FPCA decomposition Apply PACE to the pooled trajectories {logxij(t):i=1,…,n; j=1,…,p}. if Model == 1 then Truncate the number of basis functions by retaining 1−δ of the total information. else if Model == 2 then Use cross-validation to find the optimal number of basis functions. end if Save the basis coefficients (Ξ^iK)i=1n and the basis functions ϕ^(t). # Initialize the fitted value and iteration counter Take the training data (Ξ^iK)i∈Tr Initialize a vector for the fitted values g^(0)=0. Initialize m=0 . # Main algorithm (train on training data) while m < M do Initialize a new relaxation ( ω , α~ , β* ). Train ( ω , α~ , β* ) by the stochastic gradient descent algorithm. Use cross-validation to find the optimal threshold τ^ . Retrain ( α~ , β* ) using (J^+,J^−) . Update the fitted value as gi^(m+1)←gi^(m)+f^m+1(xi(t)). Save the estimated results ( α~^ , β^*,(J^+,J^−) ) in the ensemble. if J^+=∅ or J^−=∅ then Break. else m←m+1. end if end while Return: Basis functions (ϕ^(t)) ; estimated ensemble; iteration counter m ; fitted value g^(x). LCoDaCoRe Inputs: Data (xi1,…,xitTi,yi)i∈{1,…,N} ; index set of training data Tr ; basis selection method Model ; minimum information loss δ ; maximum number of regressors M # FPCA decomposition Apply PACE to the pooled trajectories {logxij(t):i=1,…,n; j=1,…,p}. if Model == 1 then Truncate the number of basis functions by retaining 1−δ of the total information. else if Model == 2 then Use cross-validation to find the optimal number of basis functions. end if Save the basis coefficients (Ξ^iK)i=1n and the basis functions ϕ^(t). # Initialize the fitted value and iteration counter Take the training data (Ξ^iK)i∈Tr Initialize a vector for the fitted values g^(0)=0. Initialize m=0 . # Main algorithm (train on training data) while m < M do Initialize a new relaxation ( ω , α~ , β* ). Train ( ω , α~ , β* ) by the stochastic gradient descent algorithm. Use cross-validation to find the optimal threshold τ^ . Retrain ( α~ , β* ) using (J^+,J^−) . Update the fitted value as gi^(m+1)←gi^(m)+f^m+1(xi(t)). Save the estimated results ( α~^ , β^*,(J^+,J^−) ) in the ensemble. if J^+=∅ or J^−=∅ then Break. else m←m+1. end if end while Return: Basis functions (ϕ^(t)) ; estimated ensemble; iteration counter m ; fitted value g^(x). Inputs: Data (xi1,…,xitTi,yi)i∈{1,…,N} ; index set of training data Tr ; basis selection method Model ; minimum information loss δ ; maximum number of regressors M Inputs: Data (xi1,…,xitTi,yi)i∈{1,…,N} ; index set of training data Tr ; basis selection method Model ; minimum information loss δ ; maximum number of regressors M # FPCA decomposition # FPCA decomposition Apply PACE to the pooled trajectories {logxij(t):i=1,…,n; j=1,…,p}. Apply PACE to the pooled trajectories {logxij(t):i=1,…,n; j=1,…,p}. if Model == 1 then if Model == 1 then Truncate the number of basis functions by retaining 1−δ of the total information. Truncate the number of basis functions by retaining 1−δ of the total information. else if Model == 2 then else if Model == 2 then Use cross-validation to find the optimal number of basis functions. Use cross-validation to find the optimal number of basis functions. end if end if Save the basis coefficients (Ξ^iK)i=1n and the basis functions ϕ^(t). Save the basis coefficients (Ξ^iK)i=1n and the basis functions ϕ^(t). # Initialize the fitted value and iteration counter # Initialize the fitted value and iteration counter Take the training data (Ξ^iK)i∈Tr Take the training data (Ξ^iK)i∈Tr Initialize a vector for the fitted values g^(0)=0. Initialize a vector for the fitted values g^(0)=0. Initialize m=0 . Initialize m=0 . # Main algorithm (train on training data) # Main algorithm (train on training data) while m < M do while m < M do Initialize a new relaxation ( ω , α~ , β* ). Initialize a new relaxation ( ω , α~ , β* ). Train ( ω , α~ , β* ) by the stochastic gradient descent algorithm. Train ( ω , α~ , β* ) by the stochastic gradient descent algorithm. Use cross-validation to find the optimal threshold τ^ . Use cross-validation to find the optimal threshold τ^ . Retrain ( α~ , β* ) using (J^+,J^−) . Retrain ( α~ , β* ) using (J^+,J^−) . Update the fitted value as gi^(m+1)←gi^(m)+f^m+1(xi(t)). Update the fitted value as gi^(m+1)←gi^(m)+f^m+1(xi(t)). Save the estimated results ( α~^ , β^*,(J^+,J^−) ) in the ensemble. Save the estimated results ( α~^ , β^*,(J^+,J^−) ) in the ensemble. if J^+=∅ or J^−=∅ then if J^+=∅ or J^−=∅ then Break. Break. else else m←m+1. m←m+1. end if end if end while end while Return: Basis functions (ϕ^(t)) ; estimated ensemble; iteration counter m ; fitted value g^(x). Return: Basis functions (ϕ^(t)) ; estimated ensemble; iteration counter m ; fitted value g^(x). Results Simulation studies Simulation setup To mimic the NICHD Fetal Growth Studies, we assumed four planned visits in the simulations that were spaced equally over [0,1], where each subject i∈{1,…,n} was observed for Ti∈{2,3,4} randomly chosen visits, yielding irregular visit times 0≤t1<…