[Paper Review] deepregression: a Flexible Neural Network Framework for Semi-Structured Deep Distributional Regression
This paper introduces deepregression, an R package that implements semi-structured deep distributional regression (SDDR), enabling scalable, interpretable modeling of full conditional distributions by combining additive predictors with deep neural networks. The framework uses a modular neural network architecture, orthogonalization cells to resolve identifiability issues, and a formula-based interface inspired by mgcv, achieving state-of-the-art predictive performance while preserving statistical interpretability.
In this paper we describe the implementation of semi-structured deep distributional regression, a flexible framework to learn conditional distributions based on the combination of additive regression models and deep networks. Our implementation encompasses (1) a modular neural network building system based on the deep learning library \pkg{TensorFlow} for the fusion of various statistical and deep learning approaches, (2) an orthogonalization cell to allow for an interpretable combination of different subnetworks, as well as (3) pre-processing steps necessary to set up such models. The software package allows to define models in a user-friendly manner via a formula interface that is inspired by classical statistical model frameworks such as \pkg{mgcv}. The packages' modular design and functionality provides a unique resource for both scalable estimation of complex statistical models and the combination of approaches from deep learning and statistics. This allows for state-of-the-art predictive performance while simultaneously retaining the indispensable interpretability of classical statistical models.
Motivation & Objective
- To address the limitations of classical mean regression in capturing heteroscedasticity and complex distributional dependencies.
- To develop a scalable framework that combines the predictive power of deep learning with the interpretability of additive models.
- To enable modeling of full conditional distributions—beyond just the mean—using parametric, semi-parametric, and nonparametric approaches.
- To resolve identifiability issues arising from overlapping features in mixed additive and deep network predictors through an orthogonalization cell.
- To provide a user-friendly, formula-based interface in R that supports flexible model specification and integration of statistical and deep learning components.
Proposed method
- The framework models distributional parameters (e.g., location, scale, shape) as additive predictors using a combination of linear, smooth, and deep neural network components.
- Each additive predictor ηₖ is defined as: ηₖ = xᵀw + Σⱼ fₖ,ⱼ(z) + Σₗ dₖ,ₗ(u), where x are linear features, z are smooth features, and u are inputs to deep neural networks.
- An orthogonalization cell is employed to decouple overlapping features across subnetworks, ensuring identifiability and interpretability of individual model components.
- The package uses Keras/TensorFlow as the backend for building modular, composable neural network architectures with shared or distinct weights.
- Pre-processing pipelines are integrated to handle data transformations, feature scaling, and model fitting, including support for penalized splines and basis expansions.
- Last-layer inference is enabled by extracting latent features from the penultimate layer of deep networks and re-fitting with mgcv to quantify uncertainty in non-linear effects.
Experimental results
Research questions
- RQ1Can deep neural networks be integrated into structured additive models in a way that preserves interpretability while enabling scalable distributional regression?
- RQ2How can overlapping features across linear, smooth, and deep network components be disentangled to ensure model identifiability?
- RQ3To what extent does the proposed framework improve predictive performance compared to classical distributional models while maintaining interpretability?
- RQ4Can uncertainty in non-linear effects be reliably quantified when deep neural networks are used as part of the additive predictor?
- RQ5How effective is the formula-based interface in enabling flexible, reproducible, and user-friendly specification of complex distributional models?
Key findings
- The deepregression package successfully implements semi-structured deep distributional regression, enabling full conditional distribution modeling via a hybrid of additive models and deep networks.
- The orthogonalization cell effectively resolves identifiability issues arising from overlapping features across subnetworks, allowing for interpretable decomposition of effects.
- The framework supports a wide range of parametric distributions and enables modeling of continuous, discrete, mixed, and multivariate responses.
- Last-layer inference via mgcv refitting on extracted latent features provides valid confidence intervals for non-linear effects, though with potential underestimation of variance due to fixed deep network weights.
- The modular design and formula interface allow for rapid prototyping and reproducible modeling of complex statistical and deep learning combinations in a single R environment.
- The approach achieves state-of-the-art predictive performance while retaining the interpretability of classical statistical models, as demonstrated in case studies on Airbnb pricing and survival analysis.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.