This paper addresses the limitations of existing machine learning approaches in medical diagnosis, which primarily focus on associative inference (correlations between symptoms and diseases). The authors argue that diagnosis is fundamentally a counterfactual inference task, requiring causal reasoning to disentangle correlation from causation. They propose counterfactual diagnostic algorithms, comparing them to a standard associative algorithm and the performance of 44 doctors using clinical vignettes. The counterfactual algorithm surpasses the associative algorithm and achieves expert-level accuracy, particularly for rare diseases.