Implementing neural network mixed-effects models in Template Model Builder (TMB)

📅 2026-08-31
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
本文通过使用Template Model Builder(TMB)实现神经网络混合效应模型(NMMs),利用自动微分和拉普拉斯近似解决了现有方法需手动推导目标函数及梯度的问题,提高了模型的复杂性和准确性。
📝 Abstract
Neural network mixed-effects models (NMMs) have gained traction by combining the strong representation and predictive power of artificial neural networks with the capacity of mixed-effects modeling to capture complex correlation structures. However, existing estimation approaches rely heavily on manual derivations of objective functions and gradients, which inherently forces simplifying approximations and severely constrains the complexity and accuracy of NMMs. In this work, we introduce a general framework for implementing NMMs using Template Model Builder (TMB). By leveraging automatic differentiation and Laplace approximation, TMB requires users to specify only the negative joint log-likelihood and any regularization terms. The framework automatically integrates out random effects and evaluates the marginal objective function alongside its exact gradients, eliminating the need for manual derivations or ad hoc approximations. We demonstrate the efficiency, flexibility, and statistical performance of TMB-based NMMs across two numerical examples, including an application to monotonic NMMs. Reproducible code is provided to facilitate broader adoption.
Problem

Research questions and friction points this paper is trying to address.

neural network mixed-effects models
manual derivations
objective functions
gradients
approximations
Innovation

Methods, ideas, or system contributions that make the work stand out.

Template Model Builder
automatic differentiation
Laplace approximation
neural network mixed-effects models
🔎 Similar Papers
No similar papers found.
N
Nan Zheng
Department of Mathematics and Statistics, Memorial University of Newfoundland, Canada
H
Hoi Yiu Cheung
Department of Mathematics and Statistics, Memorial University of Newfoundland, Canada
V
Vibhu Sharma
Department of Mathematics and Statistics, Memorial University of Newfoundland, Canada
J
James T. Thorson
Resource Ecology and Fisheries Management, Alaska Fisheries Science Center, National Marine Fisheries Service, National Oceanic and Atmospheric Administration, USA
N
Noel G. Cadigan
Centre for Fisheries Ecosystems Research, Fisheries and Marine Institute of Memorial University of Newfoundland, Canada