Drift Detection: Covariate Shift
Covariate-shift monitors watch the input distributions feeding every deployed model and raise a retraining flag when the live data drifts away from the training set.
When the world moves under the model
A model trained on one distribution of plasma conditions silently degrades when the machine operates in conditions it never saw. Covariate-shift detection measures the divergence between the feature distribution a model was trained on and the feature distribution it is now receiving from the breeder or burner, independent of whether labels are yet available.
Kronos monitors shift on the engineered features that feed each model: for the breeder, quantities such as normalized plasma current, elongation, triangularity, and edge density; for the burner, plug field ratio, mirror ratio, and injected-power fractions. Each feature carries a reference histogram captured at training time; live windows are compared against it continuously.
Statistics used
- Population Stability Index (PSI) per feature
- Kolmogorov-Smirnov and energy-distance tests for continuous signals
- Maximum Mean Discrepancy (MMD) on multivariate feature vectors
- Kullback-Leibler divergence against the reference density
def psi(reference, live, bins):
r,_ = np.histogram(reference, bins); r = r/r.sum()
l,_ = np.histogram(live, bins); l = l/l.sum()
eps = 1e-6
return float(np.sum((l - r) * np.log((l+eps)/(r+eps))))
# PSI < 0.1 stable ; 0.1-0.25 watch ; > 0.25 -> flag retrain
A breach does not touch the machine. It raises a flag that (a) lowers the affected model's confidence weighting in the twin and (b) queues a retraining job on L0. Covariate shift is distinct from concept drift, where the input-output relationship itself changes; Kronos monitors both, because a fusion machine can drift in either dimension as components age and campaigns explore new regimes.