Summary
Predicting health changes over time is tricky because individual people can behave very differently, and relationships between factors and health outcomes can be complex and nonlinear. The authors created a new kind of model that uses deep neural networks to capture complex patterns for the whole group, while also learning specific effects for each person. Their approach improved predictions for continuous health measures like depression and anxiety better than other models, especially when the data had nonlinear relationships. Interestingly, having more capacity to model nonlinearity helped more than just accounting for individual differences.
What this means in practice
- •For hospital data teams: Build better models for predicting patient health trajectories by combining nonlinear effects with patient-specific adjustments.
- •For mental health app developers: Enhance continuous monitoring tools by improving personalized prediction of depression and anxiety over time with nonlinear modeling.
Abstract
Longitudinal health data often exhibit within-subject correlation, subject-specific heterogeneity, and complex nonlinear predictor--response relationships that may not be adequately captured by conventional mixed models. We propose a Deep Generalized Neural Network Mixed Model (DGNMM) that extends the GLMM framework by using a deep neural network to learn nonlinear population-level relationships while incorporating directly trainable, regularized subject-specific effects to capture individual heterogeneity. The model is estimated using prediction-oriented stochastic optimization with separate regularization of the neural-network parameters and subject-specific effects. This formulation allows us to investigate when increased nonlinear representation capacity provides additional predictive benefit in the presence of subject-specific heterogeneity. A simulation study varies population-level nonlinearity and subject-specific heterogeneity and compares DGNMM with GLMM, artificial neural network (ANN), Maity--Pal (MP), and GNMM alternatives for continuous and binary longitudinal outcomes. In the real-data application, DGNMM achieved the lowest MSPE for continuous depression and anxiety prediction, while alternative models remained competitive for binary outcomes. Exploratory subject-level analyses showed heterogeneous predictive gains across individuals, but the magnitude of the estimated subject-specific effects was not significantly associated with predictive gain. Overall, increased nonlinear representation capacity was most beneficial for continuous prediction under nonlinear response structures, while greater subject-specific heterogeneity did not systematically yield larger predictive gains.