C-kNN-LSH: A Nearest-Neighbor Algorithm for Sequential Counterfactual Inference
Jing Wang, Jie Shen, Qiaomin Xie, Jeremy C Weiss
TL;DR
This work tackles the challenge of estimating individualized counterfactual trajectories in high-dimensional longitudinal data, exemplified by Long COVID patients. It introduces C-kNN-LSH, a framework that combines latent history compression via a variational encoder guided by an LLM, Locality-Sensitive Hashing-based nearest-neighbor matching in latent space, and a doubly robust correction to estimate $theta_{i,t}(a) = E[Y_{i,t}(a) | H_{i,t}]$. The approach provides consistency guarantees under approximate latent sufficiency and demonstrates superior recovery-heterogeneity capture and policy-value estimation on a real cohort of 13,511 participants, outperforming traditional baselines. The results suggest that probabilistic representation learning can support valid causal reasoning in richly observed sequential biomedical data without explicit causal graph recovery, offering a scalable path toward personalized, data-driven clinical decision-making.
Abstract
Estimating causal effects from longitudinal trajectories is central to understanding the progression of complex conditions and optimizing clinical decision-making, such as comorbidities and long COVID recovery. We introduce \emph{C-kNN--LSH}, a nearest-neighbor framework for sequential causal inference designed to handle such high-dimensional, confounded situations. By utilizing locality-sensitive hashing, we efficiently identify ``clinical twins'' with similar covariate histories, enabling local estimation of conditional treatment effects across evolving disease states. To mitigate bias from irregular sampling and shifting patient recovery profiles, we integrate neighborhood estimator with a doubly-robust correction. Theoretical analysis guarantees our estimator is consistent and second-order robust to nuisance error. Evaluated on a real-world Long COVID cohort with 13,511 participants, \emph{C-kNN-LSH} demonstrates superior performance in capturing recovery heterogeneity and estimating policy values compared to existing baselines.
