Auditing and Enforcing Calendar-Shift Invariance in Clinical Prediction Models
Abstract
Cancer care models predict when the next clinical assessment will occur, and weekly clinic schedules make weekdays informative. Public clinical datasets often shift patient dates for privacy, preserving elapsed times but changing weekdays. This means individual patient scores can depend on arbitrary calendar placement even when pooled benchmark scores appear stable. We test this dependence by rescoring each record at all seven equivalent weekday placements while holding model weights and scoring fixed. In non-small cell lung cancer data from four held-out hospitals, Absolute-phase improves over Calendar-blind by 0.188 nats per completed gap, but its score range across equivalent shifts averages 0.098 nats. Relative-phase constrains calendar phase to within-patient weekday differences, improves over Calendar-blind by 0.201 nats, and is shift invariant. We also introduce X-align, a shift-invariant feature that measures how well candidate dates match each patient's prior assessment pattern. Against a baseline already using candidate weekday and prior weekday regularity, X-align improves held-out scores by 0.091 nats in non-small cell lung cancer and 0.114 in colorectal cancer, with scores unchanged across shifts. Overall, weekly timing information can improve prediction without making patient-level predictions depend on arbitrary calendar placement.