LaMe: a Joint Latent Mediation Framework for High-Dimensional Systems
Authors: Gaël Poux-Médard, Kaniav Kamary, Yohann De Castro, Vivian Viallon
Organizations: Nutrition and Metabolism Branch, International Agency for Research on Cancer, WHO, Lyon, France · Institut Camille Jordan, École Centrale Lyon, CNRS UMR 5208, Lyon, France · Institut Camille Jordan, INSA Lyon, Centrale Lyon, Université Lyon 1, CNRS, Villeurbanne, France · Institut Universitaire de France
Mediation analysis seeks to understand how an exposure influences an outcome through intermediate variables. However, as increasingly rich datasets become available, hundreds to thousands of potential mediators make these systems difficult to model and hard to interpret. Latent-variable approaches offer a natural way to accommodate these high-dimensional settings. However, existing latent mediation methods face limitations, including overparameterization, biased inference, or limited scalability. We develop LaMe, a joint linear-Gaussian framework that summarizes a high-dimensional exposure-mediator-outcome system through a small number of latent variables. We identify natural direct and indirect effects under an explicit assumption that the manifest measurements fully capture the latent mediators, and characterize conditions under which the latent representation effectively restricts the observed cross-covariance structure. Simulations assess recovery of observed association parameters, natural effects, and manifest features associated with latent mediation pathways across a range of challenging settings. Four real-world applications demonstrate competitive predictive performance with compact latent representations, including single-dimensional representations of biomarker and proteomic measurements. Together, these results establish LaMe as a practical framework for estimating and summarizing multivariate mediation systems under explicit structural and measurement assumptions.
Figures & tables
Figure 1: Non-latent (left-panel) and latent (middle-panel) mediation systems, and overview of several associated inference procedures (right-panel) — (left and middle panels) Variables X , M , S and Y are specified in the ovals, structural coefficients matrices β are shown in rounded rectangles, and the system’s dimensions are given in white squares. Arrows represent causal relations between variables. For variables with a causal path to the outcome, squares’ color represents the total causal effect of a unit intervention on the corresponding variable on the outcome Y under the model specified in Eq. ( 2 )–in this case, the sum of all causal paths leading to Y ; in the latent graph, the colors of the manifest-variable squares represent their conditional associations with Y , not causal effects. For both squares and arrows, blue represents a negative relation, red represents a positive relation, and color intensity represents its strength. (right-panel) Common optimization approaches to mediation systems and the order in which they infer parameters. Alt text: three-panel schematic comparing non-latent and latent mediation systems and their inference strategies. Exposures influence outcomes directly and through latent mediators; red and blue arrows indicate positive and negative relationships. The right panel groups methods by two-step, three-step, or fully joint estimation.
Figure 2: LaMe accurately retrieves underlying parameters — LaMe and baselines when I=100 , J=100 , L=1 , and a signal-to-noise ratio from S to M and Y equal to 0.1 for varying N . (Top) Mean absolute error of the estimated coefficients β(xm) relative to the true coefficients βtrue(xm) | (Bottom) Mean absolute error of the estimated coefficients β(my) relative to the true coefficients βtrue(my) | (left) Data generated using a latent process ( K=10 , see Eq. ( 2 )) with the true K provided to all latent models | (right) Data generated using a non-latent process (see Eq. ( 1 )) with K=2min(J,I+L) for all latent models except for OVP-LaMe where K=2I+J+L=100 . Alt text: on latent data, LaMe’s estimates decrease with N toward smaller mean absolute errors on the true parameters whereas other models do not for N∈[1000;10000] ; on non-latent data, estimates from OLS, OVP-LaMe, LaMe and JAOG decrease with N toward a smaller mean absolute error on βtrue(my) whereas other models do not for N∈[1000;10000] .
Figure 3: LaMe accurately recovers the natural effects — Root mean squared error (RMSE) of estimated natural effect coefficients, normalized by the norm of the true total-effect coefficient, averaged over 100 runs, along with the associated standard deviation, for LaMe optimized with N=1000 observations on data generated with I=10 , J=50 , K=5 and L=1 , unless specified otherwise. (Top) Varying the number of observations and the number of latent variables used for estimation when the true number of latent variables used for data generation is fixed at Ktrue=5 | (Bottom) Varying the values of NIE and NDE coefficients norm used for data generation | Root mean squared error relative to the true total effect between the true and estimated (Left) natural direct effect, (Middle) natural indirect effect and (Right) total effect. Alt text: Heatmap representing the RMSE of LaMe with respect to the true NIE, NDE and TE path coefficients relative to the true TE. The RMSE of NIE, NDE and TE decreases with N , with K−Ktrue (plateauing once K≥Ktrue ) and with ∣∣NIEtrue∣∣2∣∣NDEtrue∣∣2 , with a relative RMSE remaining below 0.1 in most cases.
Figure 4: LaMe accurately recovers the observed “mediating” set of manifest variables in M among a large set of “non-mediating” candidates – Data are generated from Eq. ( 2 ) with I=10,J=10+ΔJ,K=2,L=1,N=5000 without confounding, where ΔJ∈[1,990] is the number of features in M that do not contribute to mediation mechanisms (that are either not influenced by X , or not informative about Y given X ). The shaded area represents the standard deviation over 50 datasets generated under the same parameter setting. The AUC-ROC, AP and Max-F1 all range from 0 (worst) to 1 (best), and quantify how well the model recovers the true set of mediating manifest features among all possible candidates.
Figure 5: LVMA is similar to a factor analysis — (Left) Data generated using a diagonal Σm∣s ; (Right) Data generated using a full Σm∣s . We report the MSE between the covariance of M explained by S from a factor analysis model and the same quantity estimated from one of two latent models, one with diagonal conditional covariance Σm∣s , and one with full conditional covariance Σm∣s . We generate N=1000 data points with I=J=50 , L=1 and Ktrue=rank(C) (see Eq. ( 20 )) denoting the varying rank of the system used for data generation. We fit the two latent models with K=25 . Note that I>1 was not considered in LVMA, although it provides more informative visualizations for our demonstration. The dashed black line indicates when Ktrue=K . The shaded region indicates the standard deviation over 50 runs. This shows that forcing Σm∣s to be diagonal makes the latent model equivalent to a factor analysis model when K≥Ktrue .
Figure 6: Scalability of the models — For a system with I=100 , J=100 , L=1 , N=3000 , with one full inference cycle per model. Each curve is normalized by its smallest entry to show how running time evolves as a function of N (left) and J (right). α denotes the power-law exponent.
Figure 7: LaMe accurately retrieves underlying parameters — LaMe and baselines when I=50 , J=200 , L=1 , and a signal-to-noise ratio from S to Y and M equal to 0.1 . (Top) Mean absolute error over all parameters in βinf(xm) and βtrue(xm) ; (Bottom) Mean absolute error over all parameters βinf(my) and βtrue(my) ; (left) data are generated using a latent process ( K=10 ) with the true K provided to all latent models ; (right) data are generated using a non-latent process with K=2min(I+L,J) for all latent models except for OVP-LaMe where K=2I+J=100 .
Figure 8: LaMe’s parameter retrieval in challenging situations — LaMe’s cosine similarity when I=100 , J=100 , K=10 , L=1 and SNR(Y∣S)=SNR(M∣S)=0.1 , unless specified otherwise, with a varying number of observations N | (top) with respect to SNR(M∣S)=SNR(Y∣S) | (bottom) with respect to the number of mediators J ; a dataset is generated once for J=400 , and models are trained on subsets of M , which can cause SNR(Y∣S),SNR(M∣S) to fluctuate around their target value across different J | (left) between estimated β(xm) and βtrue(xm) | (right) between estimated β(my) and βtrue(my) .
Figure 9: LaMe accurately retrieves underlying parameters over a range of signal-to-noise ratios — LaMe and baselines when I=100 , J=100 , K=10 , L=1 , and a varying signal-to-noise ratio from S to Y and M . (left) Cosine similarity between βinf(xm) and βtrue(xm) ; (right) Cosine similarity between βinf(my) and βtrue(my) ; data are generated using a latent process ( K=10 ).
Figure 10: LaMe’s results on real-world data — (A) Schematic illustration of the dataset and of the mediated system at hand. (B,C) Results from the LaMe-vX model, assuming either the causal structural model with latent mediators with K chosen for the lowest BIC (B) or without latent mediators (C). Arrows represent the standardized structural coefficients β~(uv)=Σu21β(uv)Σv−21 ; for variables with a causal path to the outcome, squares’ colour represents the total causal effect of a unit intervention on the corresponding variable on the outcome Y under the model specified with latent mediators–in this case, the sum of all causal paths leading to Y ; in the latent graph, mediator colours represent marginal associations with Y , not causal effects. For both squares and arrows, blue represents a negative relation, red represents a positive relation, and colour intensity represents its strength with extremal values at ±0.25 s.d. Annotations of (C) match those in (B). (D) Plot of the predicted values of Y and entries of M (the three with highest R2 ) against their true values, along with the associated coefficient of determination R2 .