We develop a version of variational inference for Bayesian count response regression-type models that possesses attractive attributes such as convexity and closed form updates. The convex solution aspect entails numerically stable fitting algorithms, whilst the closed form aspect makes the methodology fast and easy to implement. The essence of the approach is the use of Pólya-Gamma augmentation of a Negative Binomial likelihood, a finite-valued prior on the shape parameter and the structured mean field variational Bayes paradigm. The approach applies to general count response situations. For concreteness, we focus on generalized linear mixed models within the semiparametric regression class of models. Real-time fitting is also described.
- Paper ID: 2510.12356
- Title: Variational Inference for Count Response Semiparametric Regression: A Convex Solution
- Authors: Virginia Murru (Università di Padova), Matt P. Wand (University of Technology Sydney)
- Classification: stat.ME (Statistics - Methodology)
- Publication Date: October 14, 2025
- Paper Link: https://arxiv.org/abs/2510.12356
This paper develops a variational inference method for Bayesian count response regression models with desirable properties of convexity and closed-form updates. The convexity guarantees numerically stable fitting algorithms, while closed-form updates enable fast and easy implementation. The method's core employs Pólya-Gamma augmented negative binomial likelihood, finite-valued priors for shape parameters, and a structured mean-field variational Bayes framework. The approach applies to general count response settings and specifically targets generalized linear mixed models within the semiparametric regression category. The paper also describes a real-time fitting algorithm.
This research addresses Bayesian inference in count response semiparametric regression. Traditional Markov Chain Monte Carlo (MCMC) methods face computational bottlenecks in speed and scalability, while existing variational inference methods suffer from numerical instability due to non-convexity.
- Numerical Stability Issues: Although the fixed-form variational method of Luts & Wand (2015) achieves good accuracy, non-convexity may cause numerical problems. In simulation studies, the fixed-form variational method for Poisson nonparametric regression fails to converge correctly in 13.6% of replications.
- Computational Efficiency Requirements: Existing methods involve numerical integration steps, whereas the proposed method features completely closed-form updates, enabling fast and stable algorithms.
- Real-Time Application Demands: In streaming data applications, methods are needed that can update model parameters online without storing complete historical data.
- Proposed a Convex Variational Inference Framework: Developed a variational inference method where all component optimization problems are convex, ensuring numerical stability.
- Achieved Closed-Form Updates: Through Pólya-Gamma augmentation, all update steps have closed-form solutions, avoiding numerical integration.
- Constructed a Structured Mean-Field Variational Bayes Scheme: Addressed the challenging shape parameter inference in negative binomial distributions through discretization of shape parameter κ combined with variational Bayes model averaging.
- Developed a Pure Online Real-Time Algorithm: Proposed a real-time algorithm requiring only updates and storage of sufficient statistics, with streaming data discarded after processing.
Consider the following count response Bayesian semiparametric regression model:
yi∣β,u,κ∼ind.Negative-Binomial(exp{(Xβ+Zu)i},κ),1≤i≤n
where yi is the count response variable, and X and Z are design matrices for fixed and random effects, respectively.
Introduce Pólya-Gamma auxiliary variables:
αi∣yi,β,u,κ∼ind.Poˊlya-Gamma(yi+κ,(Xβ+Zu)i+log(κ))
- Regression coefficients: β∼N(0,σβ2Ip)
- Random effects: u∣σ12,…,σr2∼N(0,blockdiag(σ12IK1,…,σr2IKr))
- Variance parameters: σj∼ind.Half-Cauchy(sσ)
- Shape parameter: κ has a discrete prior with atom set K and probabilities p(κ)
Use the following restricted product density form:
q(β,u,κ,α,σ2,a)=q(β,u,a∣κ)q(σ2,α∣κ)q(κ)
Algorithm 1: Key update steps of the structured mean-field variational Bayes algorithm include:
- Pólya-Gamma Parameter Update:
μq(α∣κ)←2(y+κ1)⊙λJJ(cq(α∣κ))
- Regression Parameter Update:
Σq(β,u∣κ)←{CTdiag(μq(α∣κ))C+Mq(1/σ2∣κ)}−1
- Variance Parameter Update: Updated through sufficient statistics of inverse-Gamma distributions
where λJJ(x)=4xtanh(x/2) is the Jaakkola-Jordan function.
- Convexity Guarantee: Each individual mean-field optimization problem (for κ∈K) is convex, ensuring global optimal solutions.
- Closed-Form Updates: Through special properties of Pólya-Gamma augmentation, numerical integration is avoided and all updates have analytical solutions.
- Discretization Strategy: The continuous shape parameter κ is discretized to a finite set and handled through variational Bayes model averaging.
- Simulated Data:
- Sample size: n=500
- Negative binomial additive model: ηtrue,1(x)=cos(4πx)+2x, ηtrue,2(x)=0.4ϕ(x;0.38,0.08)−1.02x+0.018x2+0.08ϕ(x;0.75,0.03)
- True shape parameter: κtrue=3.8
- Real Data: Ragweed pollen count data from Kalamazoo, USA (1991-1994) (n=334)
Accuracy score defined as:
accuracy(q∗)=100(1−21∫−∞∞∣q∗(θ)−p(θ∣y)∣dθ)%
- MCMC Benchmark: Using JAGS Bayesian inference engine with chain length 10000, burn-in 5000, thinning factor 5
- Existing Variational Method: Semiparametric mean-field variational Bayes method of Luts & Wand (2015)
- Atom set K: 50 geometric sequence points, range [κtrue/10,10κtrue]
- Convergence criterion: Relative change less than 10−10
- Spline basis functions: O'Sullivan spline basis with K1=K2=17 basis functions
Simulation studies demonstrate satisfactory accuracy across all metrics:
- Function estimation accuracy: Function value estimates at different quantiles achieve 89%-94% accuracy
- Variance parameter estimation: Accuracy for σ12 and σ22 are 80% and 73%, respectively
- Shape parameter estimation: Accuracy for κ reaches 99%
Compared to Luts & Wand (2015), the proposed method shows improvements across all parameters, with the most significant improvement for κ.
Computational efficiency is significantly enhanced:
- MCMC Method: Average 117.8 seconds (standard deviation 1.876 seconds)
- Proposed Method: Average 2.088 seconds (standard deviation 0.1440 seconds)
Speed improvement of approximately 56-fold while maintaining good inference accuracy.
Algorithm 2 real-time fitting results demonstrate:
- As sample size grows from 100 to 1000, real-time estimates align closely with batch processing estimates
- For different κtrue values (5, 10, 20, 40), the algorithm performs stably
- Real-time inference primarily targets the mean structure; real-time inference for κ parameter is relatively challenging
Application to ragweed pollen count data shows:
- All linear effect coefficients are significantly nonzero
- The posterior distribution of shape parameter κ concentrates between 2-5, supporting the applicability of the negative binomial response model
- Trend curves across four years show similar behavior: peaking around day 20 of the season, followed by declining trends
- Variational Inference Methods: Binary response model methods by Jaakkola & Jordan (2000), Durante & Rigon (2019)
- Pólya-Gamma Augmentation: Negative binomial likelihood augmentation methods by Polson et al. (2013), Zhou et al. (2012), Miao et al. (2020)
- Semiparametric Regression: Count response semiparametric regression variational inference by Luts & Wand (2015)
- Compared to Zhou et al. (2012) and Miao et al. (2020): The proposed method is based on minimum KL divergence from a single joint distribution, providing a more solid theoretical foundation
- Compared to Luts & Wand (2015): Resolves non-convexity issues and provides completely closed-form updates
- Compared to Traditional MCMC: Dramatically improves computational speed while maintaining reasonable accuracy
- Successfully developed a variational inference method for count response semiparametric regression with convexity and closed-form updates
- Achieved numerically stable algorithms through Pólya-Gamma augmentation and structured mean-field variational Bayes
- Provided a pure online real-time fitting algorithm applicable to streaming data applications
- Accuracy Loss: Variational approximation shows some accuracy loss compared to MCMC, particularly in posterior distribution width estimation
- Discretization Effects: Discretization of shape parameter κ may affect inference accuracy
- Atom Set Reduction in Real-Time Algorithm: Dynamic adjustment of atom sets in online algorithms requires further investigation
- Extension to random effects models with covariance matrix parameters
- Improvement of inference quality for κ parameter in real-time algorithms
- Investigation of theoretical foundations for atom set reduction mechanisms
- Theoretical Innovation: Combines Pólya-Gamma augmentation with structured mean-field variational Bayes, solving technical challenges in count response regression
- Numerical Stability: Convexity guarantees algorithm stability and reliability
- Computational Efficiency: Closed-form updates and real-time algorithms significantly enhance computational efficiency
- Practical Value: Method has broad applicability and is easy to implement
- Insufficient Theoretical Analysis: Lacks theoretical analysis of variational approximation error
- Lack of Parameter Selection Guidance: Systematic guidance for choosing atom set K is missing
- Limited Experimental Scope: Simulation experiments cover relatively limited scenarios
- Academic Contribution: Provides new technical pathways for variational inference in count response models
- Practical Value: Significant importance for big data and streaming data applications
- Reproducibility: Detailed algorithm descriptions facilitate reproduction and implementation
- Count data analysis requiring fast Bayesian inference
- Real-time modeling in streaming data environments
- Large-scale count response semiparametric regression problems
- Applications with high numerical stability requirements
Main references include:
- Luts, J. and Wand, M.P. (2015). Variational inference for count response semiparametric regression. Bayesian Analysis, 10, 991–1023.
- Polson, N.G., Scott, J.G. & Windle, J. (2013). Bayesian inference for logistic models using Pólya-Gamma latent variables. Journal of the American Statistical Association, 108, 1339–1349.
- Durante, D. & Rigon, T. (2019). Conditionally conjugate mean-field variational Bayes for logistic models. Statistical Science, 34, 472–485.
This paper makes important contributions to the field of variational inference for count response semiparametric regression. Through clever technical combinations, it resolves key issues in existing methods and provides new directions for the field's development.