arXiv:2610.20342cs.LGOct 2026

Manuscript Offprint

arXiv:2610.20342

When Does Task-Aware Imputation Matter? An Analysis of Robustness Under Train-Test Mismatch

Maria V. Salvador, Ana F. Sequeira, Jaime S. Cardoso

Abstract

Missing data is a pervasive challenge in machine learning, often degrading predictive performance and complicating model deployment. Most existing approaches treat imputation as a preprocessing step independent of the downstream task, a separation that becomes problematic under train–test mismatches in missingness mechanisms or rates. We introduce a unified framework that treats missing entries as variables in a task-conditioned optimization problem. We instantiate this framework in two settings: an amortized approach for scenarios with missing data at both training and test time, and a latent optimization approach for settings where only training data is incomplete. The evaluation is conducted on 98 tabular datasets and robustness under train–test mismatches is assessed on 36 datasets. Results reveal that reconstruction error constitutes a poor proxy for predictive utility (Spearman ρ≈0.16–0.32\rho \approx 0.16–0.32), and that task-aware imputation becomes critical in scenarios where classical methods fail to recover complete-data performance, achieving win rates of up to 80% in challenging train–test mismatch scenarios.

1 Introduction

Missing data is a pervasive problem in real-world machine learning, with significant implications for the validity, reliability, and fairness of predictive models. In practice, data may be incomplete due to collection errors, equipment failures, participant drop-out, or reluctance to disclose sensitive information. Missing values can lead to biased estimates, reduced statistical power, and degraded performance, making their handling a critical component of any data-driven pipeline.

Understanding why data is missing– the missingness mechanism– is essential. There are three main missingness mechanisms: Missing Completely At Random (MCAR), where the probability of missingness is independent of the data; Missing At Random (MAR), where the probability of missingness is independent of the missing values given the observed data; and Missing Not At Random (MNAR), where the probability of missingness depends on the unobserved values themselves [1, 2]. These mechanisms not only influence how missing data should be modeled, but also interact with when missingness occurs in the learning pipeline.

In practice, an important consideration is whether missingness occurs at inference time. In some applications, missing values appear only during training, while deployment data is clean [2]. In others, missingness persists at test time, often under shifts in mechanisms or rates [3, 4]. These scenarios pose distinct challenges: the former primarily affects representation learning, while the latter requires

Preprint.

robustness to distribution shift. Despite these differences, most imputation methods treat missing data as a static preprocessing problem, without explicitly accounting for when or how missingness occurs.

This raises a fundamental question: to what extent does improving imputation quality translate into better predictive performance, particularly in realistic settings where missingness persists at test time or differs between training and deployment? This question leads to the primary goal of this work, which is to investigate when task-aware imputation improves predictive performance in supervised learning with missing values.

Our contributions are threefold. First, we show that task-aware imputation is not universally beneficial, but instead becomes critical in challenging regimes such as distribution shift and intrinsically hard missingness settings. Second, we introduce a simple and flexible formulation that treats missing values as learnable variables jointly optimized with the predictive model, providing a common perspective that encompasses both amortized and latent approaches within a single framework. Third, through a comprehensive empirical study, we demonstrate that standard reconstruction metrics are only weakly correlated with downstream performance, highlighting the limitations of conventional evaluation protocols.

References (34)