Manuscript Offprint

arXiv:2608.30040

A Deep Latent Variable Framework for Jointly Modeling Missingness, Measurement Error, and Heterogeneity

Yasin Khadem Charvadeh, Grace Y. Yi, Mithat Gönen, Pouya Faroughi

Abstract

Missing data, measurement error, and population heterogeneity are pervasive challenges in analyzing data arising from modern observational studies and machine learning applications. Although these problems frequently coexist and interact, they are often treated separately in existing works. We propose a unified probabilistic framework that jointly addresses these issues utilizing deep latent variable representation. The proposed method integrates a novel hierarchical tree-routed variational autoencoder with pattern-aware latent representations and calibration-based denoising. The framework accommodates missing data mechanisms, including MCAR, MAR, and MNAR, while simultaneously learning subgroup-specific and globally shared latent structure. The introduced reconvergent routing mechanism enables selective parameters to be shared across related subpopulations, which offers flexibility as well as improved statistical efficiency. Simulation studies demonstrate substantial improvements over existing deep generative imputation approaches under complex heterogeneous missingness and measurement-error settings. The proposed framework provides a principled approach for learning from noisy and incomplete data in modern healthcare and other high-dimensional applications.

1 Introduction

Missing data and measurement error are among the most common sources of imperfect data in observational research and applied machine learning [Schafer and Graham, 2002, Yi, 2017, Keogh et al., 2020]. Missingness arises when the value of a variable is simply unavailable for some observations; measurement error occurs when the recorded value departs from the underlying truth due to noise, misclassification, reporting bias, imperfect annotations, among others. Although each issue has been studied extensively in its own right, they frequently co-occur in practice and interact in ways that neither problem alone can capture the truth [Yi et al., 2011, 2012, Schomaker et al., 2015]. A model that simply imputes missing entries without accounting for the induced variability may

∗^{*}Correspondence to: Yasin Khadem Charvadeh khademch@ualberta.ca reconstruct values that are systematically biased, while a measurement-error correction that ignores incomplete records may itself rely on a distorted sample. Despite the practical importance of this interaction, methodological work that treats both problems within a single inferential framework remains limited [van Smeden et al., 2021]. This gap is even more pronounced in high-dimensional and nonlinear settings.

Modern healthcare data make this gap especially consequential. Electronic health records routinely combine laboratory results, physiological signals, administrative codes, longitudinal monitoring data, and patient-reported outcomes in which data are typically heterogeneous, incomplete, and error-contaminated. Critical-care databases such as MIMIC-IV [Johnson et al., 2023] contain missingness and implausible values (Gupta et al. [2022], Johnson et al. [2024]); population-health resources such as UK Biobank [Sudlow et al., 2015] include self-reported variables alongside objective measurements, with documented quality-control concerns [Ritchie et al., 2023, Radosavljević et al., 2025]. In such settings, missingness is often informative: whether a test is ordered, repeated, or recorded may depend on the patient's health conditions, care pathways, or disease trajectories. Meanwhile, the values that are recorded may themselves be corrupted by instrument noise, transcription errors, measurement limitations, or other factors. Addressing only one of these issues is generally insufficient for reliable inference.

The classical framework for incomplete data, introduced by Rubin [1976] and synthesized by Little and Rubin [2019], distinguishes among missing completely at random (MCAR), missing at random (MAR), and missing not at random (MNAR) mechanisms. This taxonomy is foundational because the validity of standard likelihood-based and imputation-based procedures depends critically on the assumed mechanism. Due to the identifiability issues, standard approaches are often justified under MCAR and MAR, but not under MNAR [Little and Rubin, 2019, Little, 2024]. In healthcare, MNAR is often realistic: laboratory tests may be ordered because a clinician suspects abnormality, and some patients may drop out of follow-up due to some underlying unobserved factors. Consequently, treating the missingness pattern as part of the generative model, rather than as a nuisance to be corrected post hoc, is increasingly recognized as essential [Ipsen et al., 2021, Ghalebikesabi et al., 2021].

Deep generative models in machine learning research have emerged as powerful tools for learning from incomplete data in this context. The MIWAE framework [Mattei and Frellsen, 2019] extends importance-weighted autoencoders to handle missing observations under MAR, while not-MIWAE incorporates an explicit missingness model to accommodate MNAR mechanisms [Ipsen et al., 2021]. More recently, Ghalebikesabi et al. [2021] introduced PSMVAE, a pattern-set mixture approach in which a discrete latent variable indexes missingness patterns and conditions both the encoder and decoder. Adversarial approaches such as GAIN provide an alternative paradigm using generative adversarial networks [Yoon et al., 2018].

Despite the recent progress in deep generative modeling for incomplete data, existing approaches remain limited in three respects. First, they treat observed covariates as reliable once recorded, whereas real-world biomedical and administrative data often contain substantial measurement error and misclassification. Consequently, a model may accurately reconstruct missing entries while still learning a systematically distorted latent representation. Second, existing approaches generally assume a single homogeneous generative process for the entire population. Clinical cohorts, however, often comprise latent subgroups with distinct data-generating mechanisms: different disease types, care settings, or demographic strata may exhibit different covariance structures, different relationships among features, and different missingness patterns. Third, methods that address MNAR data often rely on explicit enumeration of missingness patterns, which presents a great challenge when the data dimension is large.

On the other hand, the measurement-error literature has been active, with many methods developed to correct for bias due to noisy or misclassified variables, including regression calibration, simulation-extrapolation, likelihood-based, estimating equation, and Bayesian approaches [Gustafson, 2003, Yi, 2017, Keogh et al., 2020, Yi et al., 2021, Khadem Charvadeh and Yi, 2025]. Recent work has demonstrated that jointly addressing missingness and measurement error can reduce bias relative to approaches that treat only one source of imperfection [Yi, 2008, Yi et al., 2012, Schomaker et al., 2015, van Smeden et al., 2021]. However, these integrated methods have primarily been developed for relatively structured, low-dimensional settings and typically rely on parametric model forms, known error mechanisms, or ignorable missingness assumptions. Extending these ideas to high-dimensional, nonlinear, and heterogeneous data remains an open challenge.

A separate but related gap concerns population heterogeneity. When a dataset comprises subgroups with partially shared and partially distinct data-generating mechanisms, standard approaches face a fundamental tension. Training a single model pools all observations but cannot specialize where mechanisms differ; training separate models per subgroup provides specialization but sacrifices sample efficiency for shared structure. Available deep generative imputation methods are not designed to discover which aspects of the generative mechanism are shared across subgroups and which are subgroup-specific: a distinction that is critical when sample sizes are moderate and redundant learning is costly.

To address these limitations, we propose HTree-VAE, a unified deep latent variable framework that simultaneously: (i) imputes missing values, (ii) denoises corrupted measurements, (iii) models heterogeneous missingness mechanisms, (iv) discovers latent subgroup structure, and (v) enables selective parameter sharing across related subpopulations. The proposed framework combines a pattern-aware variational latent representation, a hierarchical tree-routed encoder, a reconvergent branch-sharing architecture, and a calibration-based denoising mechanism. Unlike standard mixture-based variational autoencoders (VAEs), our framework does not require explicit enumeration of missingness patterns or pattern sets. At the center of HTree-VAE is the hierarchical tree-routed encoder, in which a sequence of learned decision points progressively transforms the input representation, with routing decisions made on task-optimized representations at each depth. A root gating network summarizes each subject's missingness pattern from the observed data and the missingness mask, providing a compact missingness context to every routing decision via skip connections. The generative model incorporates a pattern-dependent latent prior, a universal decoder that reconstructs true underlying values from the latent code, and an auxiliary missingness model that predicts the observation pattern from the bottlenecked latent representation as well as the compact missingness context. Measurement error is handled by training the decoder against clean reference values available for a small validation subset, so that the model learns to map noisy observed inputs to denoised reconstructions without requiring the error mechanism to be known parametrically. We evaluate the proposed method on simulation studies for data with heterogeneous subpopulations, mixed missingness mechanisms (MCAR, MAR, and MNAR), and error-prone baseline measurements, comparing against MIWAE, not-MIWAE, and PSMVAE.

The remainder of the paper is organized as follows. Section 2 formulates the problem and introduces the notation. Section 3 presents the proposed HTree-VAE method, including its underlying assumptions and architectural properties. Section 4 describes the estimation and training procedures. Sections 5 and 6 describe the simulation setup and present the corresponding results, respectively. Section 7 concludes with a discussion.

References (25)

  • Deep generative missingness pattern-set mixture models
  • An extensive data processing pipeline for MIMIC-IV
  • beta-VAE: Learning basic visual concepts with a constrained variational framework
  • not-MIWAE: Deep generative modelling with missing not at random data
  • Categorical reparameterization with Gumbel-Softmax
  • Alistair Johnson, Lucas Bulgarelli, Tom Pollard, Brian Gow, Benjamin Moody, Steven Horng, Leo Anthony Celi, and Roger Mark. MIMIC-IV. PhysioNet, October 2024. doi: 10.13026/kpb9-mt58. Version 3.1. (opens the publisher in a new tab)
  • MIMIC-IV, a freely accessible electronic health record dataset
  • Part 1—Basic theory and simple methods of adjustment
  • Q-learning with compound outcome and mixed misclassification and measurement error in covariates (opens the publisher in a new tab)
  • Auto-Encoding Variational Bayes
  • Statistical Analysis with Missing Data
  • The concrete distribution: A continuous relaxation of discrete random variables
  • MIWAE: Deep generative modelling and imputation of incomplete data sets
  • A generative model for evaluating missing data methods in large epidemiological cohorts
  • Quality control and removal of technical variation of NMR metabolic biomarker data in 120,000 UK Biobank participants
  • Missing data: our view of the state of the art
  • Simultaneous treatment of missing data and measurement error in HIV research using multiple overimputation
  • Outrageously large neural networks: The sparsely-gated mixture-of-experts layer
  • an open access resource for identifying the causes of a wide range of complex diseases of middle and old age
  • Adaptive neural trees
  • Approaches to addressing missing values, measurement error, and confounding in epidemiologic studies
  • Simultaneous inference and bias analysis for longitudinal data with covariate measurement error and missing responses
  • A functional generalized method of moments approach for longitudinal studies with missing responses and covariate measurement error
  • Handbook of Measurement Error Models
  • GAIN: Missing data imputation using generative adversarial nets