Skip to main content
QUICK REVIEW

[Paper Review] Integrating Random Effects in Deep Neural Networks

Giora Simchoni, Saharon Rosset|arXiv (Cornell University)|Jun 7, 2022
Domain Adaptation and Few-Shot LearningComputer Science11 citations
TL;DR

This paper proposes LMMNN, a deep neural network framework that integrates random effects from linear mixed models (LMMs) to handle correlated data in regression tasks. By minimizing the Gaussian negative log-likelihood (NLL) via stochastic gradient descent (SGD), LMMNN improves predictive performance on tabular and spatially/temporally correlated datasets compared to standard DNNs and baselines.

ABSTRACT

Modern approaches to supervised learning like deep neural networks (DNNs) typically implicitly assume that observed responses are statistically independent. In contrast, correlated data are prevalent in real-life large-scale applications, with typical sources of correlation including spatial, temporal and clustering structures. These correlations are either ignored by DNNs, or ad-hoc solutions are developed for specific use cases. We propose to use the mixed models framework to handle correlated data in DNNs. By treating the effects underlying the correlation structure as random effects, mixed models are able to avoid overfitted parameter estimates and ultimately yield better predictive performance. The key to combining mixed models and DNNs is using the Gaussian negative log-likelihood (NLL) as a natural loss function that is minimized with DNN machinery including stochastic gradient descent (SGD). Since NLL does not decompose like standard DNN loss functions, the use of SGD with NLL presents some theoretical and implementation challenges, which we address. Our approach which we call LMMNN is demonstrated to improve performance over natural competitors in various correlation scenarios on diverse simulated and real datasets. Our focus is on a regression setting and tabular datasets, but we also show some results for classification. Our code is available at https://github.com/gsimchoni/lmmnn.

Motivation & Objective

  • Address the limitation of deep neural networks (DNNs) in handling correlated data, such as spatial, temporal, or clustered structures.
  • Integrate random effects from linear mixed models (LMMs) into DNNs to reduce overfitting and improve predictive accuracy.
  • Develop a theoretically grounded training procedure using stochastic gradient descent (SGD) with negative log-likelihood (NLL) loss for LMMNN.
  • Demonstrate the method's effectiveness across diverse real-world and simulated datasets with complex correlation structures.
  • Extend prior work on LMMNN to handle more complex mixed-effects scenarios beyond high-cardinality categorical features.

Proposed method

  • Formulate a deep neural network that learns both fixed effects and random effects, where random effects are modeled as zero-mean Gaussian-distributed latent variables.
  • Use the Gaussian negative log-likelihood (NLL) as the loss function, which naturally incorporates the covariance structure induced by random effects.
  • Apply stochastic gradient descent (SGD) to optimize the NLL, with theoretical justification for convergence based on Chen et al. (2020).
  • Parameterize the random effects covariance matrix using variance components, allowing the model to learn the degree of correlation across clusters.
  • Handle high-cardinality categorical features by treating each category as a random effect with shared variance, avoiding overfitting from one-hot encoding.
  • Implement the method in a flexible framework compatible with standard DNN architectures, enabling end-to-end training.

Experimental results

Research questions

  • RQ1Can integrating random effects into deep neural networks improve predictive performance on correlated tabular data compared to standard DNNs?
  • RQ2How does LMMNN perform on datasets with complex correlation structures such as spatial proximity or longitudinal repeated measures?
  • RQ3What are the theoretical conditions under which SGD converges when minimizing the NLL in a deep learning setting with random effects?
  • RQ4Does LMMNN outperform traditional baselines like lme4, one-hot encoding, and embedding layers on high-cardinality categorical features?
  • RQ5Can LMMNN generalize to real-world datasets with diverse correlation patterns, including spatial, temporal, and multi-level clustering?

Key findings

  • LMMNN significantly improves predictive performance on spatial datasets such as Airbnb and Cars, reducing mean squared error compared to standard DNNs and lme4.
  • On the Airbnb dataset, LMMNN achieved a test loss of 8.9 minutes (35 epochs), outperforming the next best method (5.5 minutes for Cars) and showing strong generalization.
  • For longitudinal data like UKB-SBP, LMMNN effectively modeled temporal correlation with fewer parameters than RNNs, yielding better performance than LSTM-based models.
  • On high-cardinality categorical features, LMMNN reduced overfitting compared to one-hot encoding and outperformed embedding-based models in terms of generalization.
  • The method demonstrated robust convergence under SGD when using NLL loss, with theoretical support from Chen et al. (2020) on convergence under mild regularity conditions.
  • In spatial datasets like Radiation and AirQuality, LMMNN achieved lower test error than competitors, with 5.1 and 1.5 mean squared error respectively, showing strong performance on sparse spatial data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.