Tutorials › Nonlinear Mixed-Effects Models (NLME) › Multiple Conditional Modes and Laplace Error

The Marginal Likelihood and Its Approximations · Tutorial 171 of 797

Multiple Conditional Modes and Laplace Error

Learn to identify multiple conditional modes, compare their local Laplace contributions, and assess when a single-mode approximation can misrepresent an NLME marginal likelihood.

Advanced 13 min read

What You'll Learn

  • Define conditional modes of the random-effects integrand and distinguish peak height from integrated contribution.
  • Derive the local Laplace contribution at a mode from its height and curvature.
  • Combine separated mode contributions to assess the impact of omitting a mode.
  • Calculate how curvature and dimension alter each mode’s contribution.
  • Diagnose missed modes and distinguish multimodality error from local curvature error.
  • Compare single-mode Laplace calculations with multi-mode and direct-integration checks.

Why Multiple Conditional Modes Matter

A Laplace approximation replaces an integral by a Gaussian approximation near a mode. This is effective when one mode accounts for nearly all of the integral and the log integrand is well approximated by a quadratic in its influential region. But an NLME conditional integrand can have two or more well-separated modes. If a calculation finds only one, it may miss an appreciable part of the marginal likelihood, even when the mode it finds and its local curvature are both computed accurately.

For subject \(i\), write the conditional log integrand, at fixed population parameters \(\theta\), as \(h_i(b_i;\theta)=\log p(y_i\mid b_i,\theta)+\log p(b_i\mid\theta)\). Here \(y_i\) is the subject’s data and \(b_i\) is the subject-specific random-effects vector. The subject’s marginal likelihood contribution is the integral of \(\exp\{h_i(b_i;\theta)\}\) over \(b_i\). A mode is a local maximum of this conditional log integrand. The central issue here is that there may be several such maxima, not just one.

Definition: A conditional mode is a local maximizer \(\hat b_{ij}\) of \(h_i(b_i;\theta)\), with the population parameters \(\theta\) held fixed. Its local curvature matrix is \(K_{ij}=-\nabla^2 h_i(\hat b_{ij};\theta)\). A nondegenerate mode has positive-definite \(K_{ij}\). Its local Laplace contribution is \(C_{ij}=\exp\{h_i(\hat b_{ij};\theta)\}(2\pi)^{q/2}|K_{ij}|^{-1/2}\), where \(q\) is the dimension of \(b_i\).

This contribution depends on both the height of the log integrand and its curvature. A high, narrow mode can contribute less area than a lower, broader one. Thus, comparing mode heights alone does not establish which mode matters most for the integral.

From Local Curvature to Several Contributions

Near a nondegenerate mode \(\hat b_{ij}\), a second-order Taylor expansion gives \(h_i(b_i;\theta)\approx h_i(\hat b_{ij};\theta)-\tfrac12(b_i-\hat b_{ij})^\mathsf{T}K_{ij}(b_i-\hat b_{ij})\). The linear term vanishes because the gradient is zero at the mode. Exponentiating this quadratic approximation gives a Gaussian-shaped integrand centered at \(\hat b_{ij}\).

$$ \exp\{h_i(b_i;\theta)\}\approx \exp\{h_i(\hat b_{ij};\theta)\} \exp\left\{-\frac12(b_i-\hat b_{ij})^\mathsf{T}K_{ij}(b_i-\hat b_{ij})\right\}. $$

Extending the local Gaussian approximation over all of \(\mathbb R^q\) gives \(C_{ij}\). This approximates the neighborhood’s contribution when the Gaussian mass outside that neighborhood is negligible. If there are separated modes and the regions around them account for nearly all the integral, the total integral is approximated by adding their contributions. In contrast, a single-mode calculation uses just one \(C_{ij}\). The multi-mode sum is an approximation too: it can be poor if the local quadratic shapes are inaccurate, if substantial mass lies outside the selected neighborhoods, or if the modes are not sufficiently separated for local contributions to be treated as distinct.

$$ \int \exp\{h_i(b_i;\theta)\}\,db_i \ \approx\ \sum_{j=1}^{J_i} C_{ij} \ =\ \sum_{j=1}^{J_i} \exp\{h_i(\hat b_{ij};\theta)\}(2\pi)^{q/2}|K_{ij}|^{-1/2}. $$

For independent subjects conditional on the population parameters, the marginal likelihood is the product of the subject-specific integrals. Therefore the contribution from each subject’s modes must first be summed on the likelihood scale. Taking logarithms then gives a sum of log subject-specific integrals. Keeping only one mode for a subject changes that subject’s integral before it enters the overall log likelihood.

Worked Example: A Second Mode Adds Nearly Thirty Percent

Consider a hypothetical one-dimensional subject-level integral with two well-separated modes. Suppose both local curvatures are \(K_1=K_2=2\pi\), and the log-integrand heights are \(h(\hat b_1)=\log(3.04069)\) and \(h(\hat b_2)=\log(1.25331)\). Assume the local quadratic approximations are adequate and other regions contribute negligibly.

For either mode, the one-dimensional contribution is \(C_j=\exp\{h(\hat b_j)\}\sqrt{2\pi/K_j}\). Since \(K_j=2\pi\), the curvature factor is \(\sqrt{2\pi/(2\pi)}=1\). Therefore \(C_1=3.04069\) and \(C_2=1.25331\).

Adding both contributions gives an approximate integral of \(3.04069+1.25331=4.29400\). If only the higher mode is retained, the omitted fraction is \(1.25331/4.29400\approx0.2919\), or \(29.19\%\) of the total. The single-mode value is therefore materially smaller than the two-mode approximation, despite having found the higher peak.

Height and Width Can Tell Different Stories

A mode’s contribution is proportional to its height on the integrand scale, \(\exp\{h(\hat b)\}\), multiplied by a width factor determined by curvature. In one dimension, the width factor is \(\sqrt{2\pi/K}\): smaller positive curvature means a broader peak and a larger factor. In several dimensions, the determinant summarizes the local volume: a smaller \(|K|\) gives a larger local volume factor, all else equal.

Worked Example: A Lower but Broader Peak Contributes More

Suppose a hypothetical one-dimensional integrand has two separated modes. At the taller, narrower mode, let \(h(\hat b_1)=2\) and \(K_1=100\). At the lower, broader mode, let \(h(\hat b_2)=1.5\) and \(K_2=1\). Assume both curvatures are positive and the local quadratic approximations are adequate.

The first contribution is \(C_1=e^2\sqrt{2\pi/100}=7.38906(0.250663)\approx1.852\). The second is \(C_2=e^{1.5}\sqrt{2\pi/1}=4.48169(2.50663)\approx11.234\). Thus the lower mode contributes substantially more integrated mass. The two-mode approximation is about \(1.852+11.234=13.086\), whereas retaining only the taller peak would keep only about \(1.852\).

The comparison is not paradoxical: the taller peak is much narrower. It demonstrates why ranking modes by log-integrand height alone is not a reliable way to decide which one can be ignored.

Worked Example: Curvature Volume in Two Dimensions

For a hypothetical two-dimensional random effect, suppose two separated modes both have log-integrand height zero. At the first mode, let the eigenvalues of \(K_1\) be 4 and 1; at the second, let the eigenvalues of \(K_2\) be 1 and 1. Both matrices are positive definite, as required for nondegenerate local maxima.

The determinants are \(|K_1|=4\) and \(|K_2|=1\). With \(q=2\), the contribution is \(C_j=e^{h(\hat b_j)}(2\pi)/\sqrt{|K_j|}\). Thus \(C_1=2\pi/\sqrt4=\pi\approx3.1416\), while \(C_2=2\pi/\sqrt1=2\pi\approx6.2832\).

The approximate total is \(3.1416+6.2832=9.4248\). Although the two modes have equal heights, the second has a broader local volume and contributes twice as much. A calculation retaining only the first mode would miss two-thirds of this two-mode approximation.

Justification and Conditions for the Sum

The multi-mode calculation follows by partitioning the integration region into neighborhoods around the modes and the remaining region. Within each neighborhood, use the quadratic expansion and integrate it; if the remainder of the region has negligible integral, the whole integral is approximately the sum of those local Gaussian integrals. This reasoning also identifies the assumptions: the modes should be interior, nondegenerate, and sufficiently separated; the Hessian at each should yield a positive-definite \(K_{ij}\); and each local quadratic approximation should represent its neighborhood adequately.

1
Locate candidate modes.
Find distinct local maxima of the conditional log integrand at the fixed population parameters. A single optimizer start is not evidence that there is only one mode.
2
Check local curvature.
At each candidate mode, verify that the gradient is approximately zero and that \(K=-\nabla^2h\) is positive definite. A saddle point or a flat, degenerate maximum does not satisfy the ordinary local Laplace conditions.
3
Compute and compare contributions.
Evaluate the log-integrand height and the determinant-based curvature factor at every relevant mode, then add their contributions on the integral scale.
4
Assess what the local calculation leaves out.
Check whether the modes are separated, their local shapes are plausible, and the remaining regions appear negligible. If not, the sum itself may fail to represent the integral well.

The approximation is most persuasive when each mode is locally close to quadratic and the integrand is concentrated near the modes. With weakly identified random effects, flat regions, boundary modes, or substantial mass between modes, a local Gaussian calculation can be unreliable even if all prominent maxima have been found. Multiple modes and asymmetric local curvature can also occur together; discovering several modes does not remove local approximation error.

Diagnostics, Alternatives, and Common Pitfalls

A practical diagnostic is to repeat conditional optimization from several dispersed starting values and compare the resulting mode locations, log-integrand values, and curvature matrices. Distinct converged locations with near-zero gradients and positive-definite \(K\) indicate candidate modes. Evaluating the log integrand along directions joining the modes can help reveal whether the modes are genuinely separated and whether a saddle or broad connecting region may matter. These checks are evidence, not a guarantee: an optimizer can repeatedly find the same basin while missing another.

The main alternatives answer slightly different computational needs. A single-mode Laplace calculation is economical and can be adequate when one mode dominates. A multi-mode Laplace calculation sums local contributions and is preferable when several separated modes have appreciable mass and local Gaussian shapes are reasonable. Direct numerical integration can serve as a check in low-dimensional examples, but becomes harder as the dimension increases. The key limitation of any mode-based calculation is that it approximates local neighborhoods; it does not automatically account for unlocated modes or non-negligible mass away from them.

  • Pitfall: keeping the mode with the highest peak. The incorrect reasoning is that the largest value of \(h\) must supply almost all the integral. The correction is to compare \(C_j\), which includes both height and curvature, and then assess the total of the relevant contributions.
  • Pitfall: treating optimizer convergence as proof of uniqueness. Convergence shows that an algorithm found a stationary solution from its starting point; it does not rule out other basins. Use dispersed starts and inspect distinct solutions.
  • Pitfall: adding log contributions directly. If local contributions are \(C_1\) and \(C_2\), the integral approximation is \(C_1+C_2\), not \(\log C_1+\log C_2\). The log of the approximate integral is \(\log(C_1+C_2)\).
Key takeaway: A single-mode Laplace approximation can understate a marginal likelihood when it omits another separated conditional mode. The relevant comparison is between integrated local contributions, not just peak heights, and even a sum over modes requires adequate local curvature and coverage of the integrand’s important regions.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Two one-dimensional modes have contributions \(C_1=5\) and \(C_2=2\). What fraction of the two-mode approximation is omitted by retaining only the first mode?
  2. Why can a lower mode contribute more to an integral than a higher mode?
  3. In two dimensions, what does a positive-definite \(K=-\nabla^2h\) indicate at a candidate mode?
  4. If two local contributions are \(3\) and \(4\), what is the approximate log integral under the two-mode calculation?

Solutions. (1) The total is \(5+2=7\), so the omitted fraction is \(2/7\approx0.2857\), or \(28.57\%\). (2) The lower mode may be broader: its curvature factor can more than compensate for its lower integrand height. (3) It indicates negative-definite log-integrand curvature, so the candidate is a nondegenerate local maximum under the stated Hessian condition. (4) Add contributions before taking the logarithm: \(\log(3+4)=\log 7\approx1.946\).