When tracking biological processes over time—whether it is the maturation of an infant's brain, the decay of a viral reservoir, or the physical growth of a child—we rarely encounter straight lines. Biological systems undergo rapid acceleration, sudden plateaus, and complex periodic fluctuations.
Historically, researchers relied on linear models or rigid parametric curves (such as quadratic or exponential functions) to analyze longitudinal data. While mathematically simple, these approaches force data into a predetermined shape. If a researcher assumes a linear path, they will completely miss the critical inflection points where a biological mechanism accelerates or stabilizes.
To capture the true dynamics of change, a powerful paradigm has emerged: combining non-parametric basis functions (like splines) with mixed-effects frameworks. This approach allows the data itself to dictate the shape of the trajectory while robustly handling the messy, irregular nature of real-world longitudinal studies.
The Core Mechanism: Splines as Flexible Basis Functions
How do you model a trajectory when you do not know its mathematical formula in advance? The solution is to construct the trajectory out of a combination of simpler, localized functions called basis functions.
The most common choice is the spline. Instead of trying to fit one complex polynomial to an entire timeline—which often causes wild, unrealistic oscillations at the edges—splines divide the timeline into segments separated by points called "knots." Within each segment, a low-degree polynomial (typically a cubic function) is fitted to the data. These local curves are then stitched together at the knots under strict mathematical constraints that ensure the transitions are perfectly smooth and continuous.
Traditional Polynomial (Rigid, oscillates at edges)
/\ /\
/ \____/ \
Spline Basis (Piecewise, smooth local adjustments)
_..---.._
_/ \_.._
Different flavors of splines serve different modeling needs:
- B-Splines: Highly flexible and computationally efficient, B-splines are ideal for data-driven discovery where the underlying functional form is entirely unknown. Ning Li demonstrated that using B-spline basis functions allows the data to organically determine the shape of longitudinal biomarker trends, successfully capturing sudden spikes or plateaus that rigid models miss.
- Restricted Cubic Splines: These constrain the trajectory to be linear at the extreme boundaries of the data, preventing erratic behavior where data points are sparse. Kurt G. Schilling et al. leveraged covariate-adjusted restricted cubic splines to map highly non-linear white matter trajectories across the entire human lifespan, safely handling rapid changes in infancy alongside gradual declines in late life.
- Alternative Bases: Researchers are not limited to splines. For instance, Runqing Yang et al. utilized Legendre polynomials as flexible basis functions to map dynamic genetic traits, proving that longitudinal characteristics can be accurately modeled without prior knowledge of specific biological growth curves.
By using these basis functions, the model gains the agility to follow the data's natural contours, whether tracking the non-linear progression of fMRI hemodynamic responses (Yadong Liu et al.) or the complex decay patterns of the HIV-1 reservoir during antiretroviral therapy (Nadine Bachmann et al.).
Disentangling Group Trends from Individual Noise
In longitudinal research, data points are not independent; they are clustered within individuals who are measured repeatedly over time. Furthermore, real-world clinical data is notoriously messy. Participants miss appointments, drop out of studies, or are recruited at different ages, leading to highly irregular sampling schedules.
To resolve this, flexible trajectories are embedded within Generalized Additive Mixed Models (GAMMs). GAMMs split the variance into two distinct components:
- Fixed Effects (The Population Trend): A smooth, non-linear spline function that captures the overarching trajectory shared by the entire cohort.
- Random Effects (Individual Deviations): Subject-specific parameters that account for how much an individual's baseline or rate of change deviates from the population average.
This separation is why the framework works so well on irregular data. If Patient A visits the clinic at months 1, 3, and 12, and Patient B visits at months 2, 6, and 8, a GAMM can seamlessly pool their data to estimate the shared population spline while still respecting each individual's unique baseline.
For example, Liangjun Chen et al. applied GAMMs to map subcortical brain development in infants, isolating rapid developmental bursts and subsequent plateaus from the idiosyncratic variations of individual babies. Similarly, M. Reza Sailani et al. used GAMMs to detect population-level, non-linear seasonal multiomic patterns in human biology while controlling for individual-specific baseline variations.
Unlocking Normative Modeling and Residual Analysis
Once a model can accurately map a non-linear population trajectory, it unlocks a powerful clinical tool: normative growth modeling. Much like a pediatrician uses a growth chart to see if a child's height is in the 50th or 90th percentile, neuroscientists and clinicians use frameworks like Generalized Additive Models for Location, Scale, and Shape (GAMLSS) to build reference curves for complex biological metrics (Xue-Ru Fan et al.).
This enables a strategy known as residual analysis. By training a flexible model on a large, healthy population, researchers can establish the "normal" non-linear trajectory of development or aging. When a new patient is evaluated, the normal trajectory is regressed out. What remains—the residual—is a clean measure of how far that specific individual deviates from the healthy norm.
Measurement
^
| / <- Patient Data
| _.-'-._
| _/-------`_ <- Healthy Normative Spline
|/ \
+-----------------------> Time
^
|-- Residual (Pathology-specific deviation)
This technique is vital for isolating disease-specific changes from confounding, natural age-related shifts. Yinghan Zhu et al. utilized GAMs to model the non-linear effects of age and sex in healthy individuals. By regressing out these normal developmental trajectories, they isolated pathology-specific brain changes to accurately predict the onset of psychosis in high-risk individuals. In a similar vein, Marieta Pehlivanova et al. used penalized splines to control for complex, non-linear age-related brain maturation, allowing them to isolate the specific relationship between cortical thickness and impulsive behavior in adolescents.
By moving away from the constraints of straight lines and rigid formulas, flexible trajectory modeling provides a mathematically rigorous yet adaptive lens. It allows researchers to see biological data as it truly is: dynamic, continuous, and beautifully non-linear.
Key Foundational Work
Bayesian analysis for genetic architecture of dynamic traits (2010) — contributed 2 concept elements to this direction.
Sustained Negative BOLD Response in Human fMRI Finger Tapping Task (2011) — contributed 1 concept elements to this direction.
Generalized linear mixed models in time series studies of air pollution (2011) — contributed 1 concept elements to this direction.