Introduction

On this page, I present the simulation results and theoretical findings from my working paper Solving Empirical Bayes Estimation in High-Dimensional Linear Regression Using a Mean-Field Approach, which is part of my Master's thesis supervised by Prof. Bodhisattva Sen. This work focuses on the computational aspects of A Mean Field Approach to Empirical Bayes Estimation in High-dimensional Linear Regression . We develop an algorithm for this problem and compare its performance with LASSO, OLS, MCMC, and we also compare our algorithm with existing CAVI method. We also establish several theoretical results for our algorithm.

Problem setup

We study an empirical Bayes approach to high-dimensional Gaussian linear regression. The data follow

\[ \mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \varepsilon,\quad \varepsilon \sim \mathcal{N}\!\left(0, \sigma^2 \mathbf{I}_n\right), \]

where \(\mathbf{y} \in \mathbb{R}^n\) is the response vector, \(\mathbf{X} \in \mathbb{R}^{n \times p}\) is the design matrix with columns \(\mathbf{x}_1, \dots, \mathbf{x}_p\), \(\boldsymbol{\beta} = (\beta_1,\dots,\beta_p)^\top\) are the unknown regression coefficients, and \(\sigma^2 > 0\) is treated as known.

In an empirical Bayes formulation, we place an unknown prior \(\mu\) on each coefficient and assume \(\beta_j \overset{\text{iid}}{\sim} \mu\) for \(j = 1,\dots,p\). We approximate \(\mu\) by a discrete distribution supported on a fixed grid \(\mathcal{A} = \{a_1 < \dots < a_k\} \subset \mathbb{R}\), for example a fine grid in \([-1.5, 1.5]\) (suppose support of the prior is \([-1, 1]\), so keep lower and upper value of these grid points a little relaxed):

\[ \mu(\mathrm{d}t) \approx \sum_{\ell=1}^k \pi_\ell \,\delta_{a_\ell}(\mathrm{d}t), \quad \boldsymbol{\pi} = (\pi_1,\dots,\pi_k)^\top \in \Delta^{k-1}, \]

where \(\Delta^{k-1} = \{\boldsymbol{\pi}: \pi_\ell \ge 0,\ \sum_{\ell=1}^k \pi_\ell = 1\}\) is the simplex and \(\delta_{a_\ell}\) is a point mass at \(a_\ell\). The empirical Bayes goal is to learn \(\boldsymbol{\pi}\) from the data.

Instead of maximizing the intractable marginal likelihood \(p(\mathbf{y} \mid \boldsymbol{\pi})\), we use a mean-field variational approximation, where we approximate the posterior with a factorized distribution from the mean-field family

\[ q(\boldsymbol{\beta}) = \prod_{j=1}^p q_j(\beta_j), \quad q_j(\beta_j) = \sum_{\ell=1}^k r_{j\ell}\,\delta_{a_\ell}(\beta_j), \quad \mathbf{r}_j = (r_{j1}, \dots, r_{jk})^\top \in \Delta^{k-1}, \]

and jointly optimize the mixing weights \(\boldsymbol{\pi}\) and the local weights \(\{\mathbf{r}_j\}_{j=1}^p\) by maximizing the corresponding evidence lower bound (ELBO). From the optimal variational distribution, we form the coordinate-wise posterior mean

\[ \boldsymbol{u} \;=\; \mathbb{E}_q[\boldsymbol{\beta}] = (u_1,\dots,u_p)^\top, \qquad u_j = \sum_{\ell=1}^k a_\ell\, r_{j\ell}, \]

which serves as the empirical Bayes estimator of \(\boldsymbol{\beta}\) produced by our algorithm. The simulation results below compare this estimator against OLS, Lasso, MCMC-based benchmarks, and existing CAVI-type methods.

Simulation Setup

Unless stated otherwise, the simulation results below are based on the following baseline design.

\[ n = 800,\qquad p = 50. \]

The design matrix \(\mathbf{X} \in \mathbb{R}^{n \times p}\) has entries \(\mathbf{X}_{ij} \sim \mathcal{N}(0, 1/n)\), i.e.

\[ \mathbf{X} = \frac{1}{\sqrt{n}} \mathbf{Z}, \quad \mathbf{Z}_{ij} \sim \mathcal{N}(0,1), \]

so that \(\|\mathbf{x}_j\|^2 = O(1)\) for each column, in line with Assumption 1 of Mukherjee et al.

The true coefficients \(\boldsymbol{\beta}^\star\) are three-point mass:

\[ \beta_j^\star \in \{-1, 0, 1\},\quad \mathbb{P}(\beta_j^\star = -1) = 0.3,\ \mathbb{P}(\beta_j^\star = 0) = 0.4,\ \mathbb{P}(\beta_j^\star = 1) = 0.3, \]

and the responses are generated as

\[ \mathbf{y} = \mathbf{X}\boldsymbol{\beta}^\star + \varepsilon, \qquad \varepsilon \sim \mathcal{N}(0, \sigma^2 \mathbf{I}_n), \]

where \(\sigma^2\) is chosen to yield a non-trivial signal-to-noise regime; all methods are compared under this common design.

Prior Evolution

The clip below shows how the estimated prior mass on the grid \(\mathcal{A}\) evolves over iterations of our algorithm. The mass gradually concentrates near the signal values, illustrating how the empirical Bayes procedure adapts to the underlying sparsity pattern.

Posterior Mean vs True Coefficients

Figure 1: Posterior Mean vs True Coefficients
Scatter of posterior mean estimates versus true beta coefficients with bubble size proportional to posterior variance.
Posterior mean estimates from the VEB procedure track the true coefficient values closely; bubble size encodes the corresponding posterior variance.

Comparison with Lasso Relative to True Coefficients

Figure 2: Comparison with Lasso
Side-by-side comparison: Lasso estimates versus true coefficients (left) and variational posterior means versus true coefficients (right).
Left: Lasso estimates versus true coefficients, showing shrinkage toward zero and noticeable dispersion around the diagonal. Right: VEB posterior means align closely with the diagonal at \(-1, 0, 1\), indicating better recovery of the true signal.

Comparison with OLS and LASSO

Figure 3: VEB Compared with OLS and Lasso
Vertical line plots comparing VEB estimates to OLS (left) and Lasso (right), with true coefficients marked.
Left: OLS versus VEB. Right: Lasso versus VEB. In both panels, vertical segments connect method-specific estimates to the same underlying coefficient, with red points marking the true values and orange points the VEB posterior means. The VEB estimates cluster tightly around the truth, while OLS and Lasso display larger dispersion and shrinkage effects.

Convergence Diagnostics

To illustrate stability of the variational procedure, we track the convergence of the estimated prior and the posterior mean across iterations of our algorithm.

W1 Convergence of the Prior

Wasserstein-1 distance between the prior estimates at iterations \(t-1\) and \(t\). The decay toward zero shows stabilization of the learned prior on \(\mathcal{A}\).

L2 Change in Posterior Mean

\(\big\|\hat{\boldsymbol{u}}^{(t)} - \hat{\boldsymbol{u}}^{(t-1)}\big\|_2\), the L2-norm of the difference between successive posterior mean iterates. Its decay toward zero reflects numerical convergence of the VEB posterior mean estimator.

Simulation to Theory

The two convergence videos above are not just a numerical coincidence: in this regime, the L2 change in the posterior mean and the W1 change in the prior really do decay at essentially the same geometric rate. The theorem below formalises exactly what the animations are hinting at.

In these simulations the algorithm runs on a fixed 1D grid \(\{a_\ell\}_{\ell=1}^k \subset [-A,A]\) (here \(A = 1.5\)). At outer iteration \(t = 0,1,2,\dots\), we track:

the posterior means of the regression coefficients \(u^{(t)} \in \mathbb{R}^p\);

the learned prior weights \(\pi^{(t)} \in \Delta^{k-1}\) on the grid;

a two-layer update:

EM step. Update \(\pi^{(t)} \mapsto \pi^{(t+1)}\) by averaging responsibilities across coordinates (standard EM for the mixing weights).

Inner optimisation step (BFGS). With \(\pi^{(t+1)}\) fixed, refine the site-specific variational parameters via a short BFGS loop on the inner objective, starting from the previous iterate.

Unlike closed-form CAVI, this is a genuinely two-layer EM + BFGS scheme; the numerical inner solver matters for the convergence behaviour stated below.

To measure convergence, we monitor: The L2 change in the posterior mean:

\[ \Delta_u^{(t)} := \big\| u^{(t)} - u^{(t-1)} \big\|_2 . \]
The W1 change in the prior:
\[ \Delta_\pi^{(t)} := W_1\!\big(\pi^{(t)}, \pi^{(t-1)}\big), \]
computed on the same fixed grid \(\{a_\ell\}\).

The off-diagonal coupling induced by the design is captured by

\[ M \;:=\; \frac{X^\top X}{\sigma^2} - \mathrm{diag}\!\Big(\frac{(X^\top X)_{11}}{\sigma^2},\dots,\frac{(X^\top X)_{pp}}{\sigma^2}\Big). \]
In our theorem we assume \(\|M\|_{\mathrm{op}} = O_{\mathbb{P}}(\sqrt{p/n})\); combined with the assumption \(p = o(n)\) in Mukherjee et al., this implies \(\|M\|_{\mathrm{op}} \to 0\). We state the theorem and omit the proof here.

Theorem (Common-ratio convergence for this EM + BFGS scheme)

The phenomenon observed in the videos is specific to the two-layer algorithm: an EM-style update of \(\pi\), followed by a local BFGS refinement of the site parameters. A closed-form batch CAVI step need not exhibit this.

Assume:

Weak regression coupling: \(\|M\|_{\mathrm{op}} = O_{\mathbb{P}}(\sqrt{p/n})\), hence \(\|M\|_{\mathrm{op}} \to 0\) under \(p=o(n)\).

Non-degenerate limiting prior: The limit \(\pi^\star\) puts positive mass on at least two grid points.

Two-layer EM + BFGS update: Each outer iteration has (i) the EM update of \(\pi\), then (ii) a short BFGS run that attains first-order accuracy for the inner optimum.

Then there exists \(\lambda \in (0,1)\) such that

\[ \lim_{t\to\infty}\frac{\Delta_u^{(t-1)}}{\Delta_u^{(t)}} \;=\; \lim_{t\to\infty}\frac{\Delta_\pi^{(t-1)}}{\Delta_\pi^{(t)}} \;=\; \frac{1}{\lambda}. \]

In particular, for large \(t\),

\[ \Delta_u^{(t)} \approx c_u\,\lambda^{t}, \qquad \Delta_\pi^{(t)} \approx c_\pi\,\lambda^{t}, \]

Remark: The constant \(\lambda\) is the dominant eigenvalue of the local linearisation of the full EM + BFGS map around the fixed point \((u^\star,\pi^\star)\). In other words, \(\lambda\) is the effective contraction factor of one full outer iteration. Because the inner step is solved by BFGS to first order, the local behaviour of the algorithm is controlled by a single, well-defined \(\lambda\), and both diagnostics inherit this same rate. This is precisely why, in the videos above, the L2 change in posterior mean and the W1 change in the prior have almost identical “shape” on a log scale. The inner BFGS step makes the update behave locally like plugging in the exact site optimiser for the current prior. This “first-order exactness” drives the common-ratio limit; generic closed-form CAVI updates need not share it.

Degenerate edge case: If the limiting prior \(\pi^\star\) collapses to a single grid point, both diagnostics drop to zero in finitely many steps and the ratio becomes vacuous; the theorem is intended for the more interesting regime where the limiting prior retains a genuinely high-dimensional support.