Hostname: page-component-76d6cb85b7-8p85h Total loading time: 0 Render date: 2026-07-11T14:11:48.160Z Has data issue: false hasContentIssue false

Uncovering Latent Structures: A Bayesian Approach to Estimating Q-Matrix and Attribute Hierarchies in Cognitive Diagnostic Models

Published online by Cambridge University Press:  20 February 2026

Xue Wang
Affiliation:
Key Laboratory of Applied Statistics of MOE, Key Laboratory of Big Data Analysis of Jilin Province, School of Mathematics and Statistics, Northeast Normal University, Changchun, Jilin, China
Yinghan Chen
Affiliation:
Department of Mathematics and Statistics, University of Nevada Reno, USA
Shiyu Wang*
Affiliation:
Department of Educational Psychology, University of Georgia, Athens, GA, USA
*
Corresponding author: Shiyu Wang; Email: swang44@uga.edu
Rights & Permissions [Opens in a new window]

Abstract

Cognitive diagnostic models (CDMs) provide fine-grained diagnostic feedback by modeling the relationship between latent attributes and item responses. Two key components required for CDM implementation are the Q-matrix, which links items to attributes, and the attribute hierarchy, which defines prerequisite relationships among attributes. In many practical settings, both structures are specified by experts based on cognitive theory. In this article, we propose a novel Bayesian estimation method that simultaneously learns the Q-matrix, the attribute hierarchy, and the parameters of the deterministic inputs, noisy “and” gate (DINA) model. We develop a Metropolis–Hastings within Gibbs algorithm and integrate a mini-batch strategy to improve computational efficiency. We conducted a series of simulation studies to evaluate the performance of the proposed algorithm under varying conditions, including sample size, test length, hierarchy structure, mini-batch size, and threshold settings. The results demonstrate strong recovery rates for both latent structures and item parameters, confirming the accuracy and robustness of our method. A real data application further illustrates the utility of the proposed framework in uncovering interpretable diagnostic structures. Our findings offer practical guidance for researchers seeking to implement CDMs when both the Q-matrix and attribute hierarchy are unknown.

Information

Type
Theory and Methods
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

Figure 1 Four attribute hierarchy structures, arranged from left to right: (a) $\text {G}_1$\textG1 Linear; (b) $\text {G}_2$\textG2 Convergent; (c) $\text {G}_3$\textG3 Divergent; and (d) $\text {G}_4$\textG4 Unstructured.

Figure 1

Table 1 MH-Gibbs sampling procedureTable 1 long description.

Figure 2

Figure 2 The overview of the complete Bayesian estimation procedure, including the sampling procedure, relabeling procedure, and final parameter estimation.Figure 2 long description.

Figure 3

Table 2 Simulation factors and levelsTable 2 long description.

Figure 4

Table 3 Average computation time of the proposed algorithm under each condition in secondsTable 3 long description.

Figure 5

Table 4 Summary of the optimal mini-bath size and cut-off valueTable 4 long description.

Figure 6

Table 5 Evaluate the recovery accuracy of the adjacency matrix $\text {G}$GTable 5 long description.

Figure 7

Table 6 Estimated adjacency matrices $\hat {\text {G}}$G^ of the proposed algorithm for $N=1,000$N=1,000, $J=20$J=20 conditionTable 6 long description.

Figure 8

Table 7 Evaluate the recovery accuracy of $\text {Q}$Q-matrixTable 7 long description.

Figure 9

Table 8 Evaluate the estimation accuracy for the item parameters $\boldsymbol {s}$s, $\boldsymbol {g}$g, and the class membership probability parameter $\boldsymbol {\pi }$πTable 8 long description.

Figure 10

Table 9 Evaluate the estimation accuracy for the attribute profile $\boldsymbol {\alpha }$αTable 9 long description.

Figure 11

Table 10 Estimated adjacency matrix $\hat {\text {G}}$G^ and the DIC value under different mini-batch conditionsTable 10 long description.

Figure 12

Table 11 The expert labeled $\text {Q}$Q-matrix and the estimated structured $\text {Q}$Q-matrix of from ECPE dataTable 11 long description.

Supplementary material: File

Wang et al. supplementary material

Wang et al. supplementary material
Download Wang et al. supplementary material(File)
File 366 KB