1. A method of quantifying risk of cardiac arrhythmia, comprising: receiving a first set of electrocardiogram (ECG) signals from spatially separated leads; generating, for each ECG signal in the first set of ECG signals, a median beat associated with the morphology of each respective ECG signal of the first set of ECG signals; receiving a second set of ECG signals from spatially separated leads; generating, for each ECG signal in the second set of ECG signals a second median beat associated with the morphology of each respective ECG signal of the second set of ECG signals; calculating, for each lead, a residuum signal based on the corresponding median beat and the corresponding second median beat; averaging the residuum signals across the leads to produce an averaged residuum signal; and quantifying a spatio-temporal heterogeneity of the second set of ECG signals based on the residuum signals and the averaged residuum signal, wherein the spatio-temporal heterogeneity is associated with arrhythmia risk.