Hostname: page-component-89b8bd64d-46n74 Total loading time: 0 Render date: 2026-05-07T07:56:48.774Z Has data issue: false hasContentIssue false

Estimating Discrete Latent Variable Models Using Amortized Variational Inference

Published online by Cambridge University Press:  07 May 2026

Karel Veldkamp*
Affiliation:
Psychology, Universiteit van Amsterdam , Netherlands
Raoul Grasman
Affiliation:
Psychology, Universiteit van Amsterdam , Netherlands
Dylan Molenaar
Affiliation:
Faculty of Social and Behavioural Sciences, University of Amsterdam , Netherlands
*
Corresponding author: Karel Veldkamp; Email: k.a.veldkamp@uva.nl
Rights & Permissions [Opens in a new window]

Abstract

Recent research shows that amortized variational inference (AVI) can be used to efficiently estimate high-dimensional latent variable models on large datasets. However, its use has remained limited to item response theory (IRT), and generalizing the approach to discrete latent variable models is not straightforward. We propose two ways to deal with this problem. In an initial simulation, we verify that these approaches can be used to estimate simple discrete latent variable models, such as latent class analysis and the generalized deterministic inputs, noisy and gate model. In these cases, AVI provides accurate parameter estimates, although the computational advantage over marginal maximum likelihood (MML) and standard variational inference (VI) is limited. We then apply the same approach to estimate mixture IRT models. In this case, AVI is computationally faster than MML estimation and standard VI. To demonstrate the practical applicability of our AVI approach, we use it to fit a seven-dimensional mixture IRT model to a narcissism inventory. Whereas quadrature-based methods cannot feasibly estimate models of this dimensionality, the efficient AVI approach even allows for computation of bootstrapped standard errors. We provide our code, along with an easy-to-use tool for fitting these models to new datasets.

Information

Type
Application and Case Studies - Original
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press on behalf of Psychometric Society
Figure 0

Table 1 Four types of latent variable models according to the taxonomy of Bartholomew et al. (2011)

Figure 1

Figure 1 Average RMSE of conditional probabilities (1a) and average runtimes (1b) for LCA across replications, shown for all combinations of the number of items and latent classes. The x-axis indicates the estimation method: CLVM with 1, 5, and 10 importance-weighted samples, VI, or MML with 1 or 5 sets of starting values.

Figure 2

Table 2 Root mean squared error (RMSE) of conditional probabilities, accuracy of the latent classes, and runtime in seconds

Figure 3

Figure 2 Average RMSE of $\delta $ parameters (2a) and average runtimes (2b) for GDINA model across replications, shown for all combinations of the number of items and latent attributes. The x-axis indicates the estimation method: CLVM with 1, 5, and 10 importance-weighted samples, VI, or MML with 1 or 5 sets of starting values.

Figure 4

Table 3 Root mean squared error (RMSE) of slopes, accuracy of the latent attributes, and runtime in seconds

Figure 5

Figure 3 Average RMSE of the intercepts (3a) and average runtimes in seconds (3b) across replications for 3- and 10-dimensional models, respectively. The x-axis indicates the estimation method: CLVM with 1, 5, and 10 importance-weighted samples, VI or MML with 1 or 5 sets of starting values.

Figure 6

Table 4 RMSE of intercepts (b) and slopes (a), accuracy of the latent classes, and runtime in seconds for the mixture IRT simulation

Figure 7

Figure 4 Distribution of slope parameters (4a), scatterplot of class intercepts (4b), and 95% confidence intervals of the difference in intercepts across classes (4c).