Skip to the content

Other applied ML NeurIPS 2025 workshops

Four different mistakes. One MSE.

High-Fidelity Synthetic ECG Generation via Mel-Spectrogram Informed Diffusion Training

  1. Zhuoyi Huang1
  2. Nutan Sahoo1
  3. Anamika Kumari1
  4. Girish Kumar1
  5. Kexuan Cai1
  6. Shixing Cao1
  7. Yue Kang1
  8. Tian Xia1
  9. Somya Chatterjee1
  10. Nicholas Hausman1
  11. Aidan Jay1
  12. Eric S. Rosenthal2
  13. Soundar Srinivasan1
  14. Sadid Hasan1
  15. Alex Fedorov3
  16. Sulaiman Vesal1

Affiliations at the time of publication1Microsoft, 2Massachusetts General Hospital, Harvard University, 3Emory University

The paper trains an ECG diffusion model with its usual point-by-point loss plus a second loss that compares time-frequency pictures of the real and the reconstructed signal, and reports that the twelve generated leads then relate to each other much more as real ones do: on PTB-XL the average inter-lead correlation error is 0.042 against the baseline’s 0.140.

Figure 1Illustration

Toy signal, three repeats. Not a recording.referencewith the mistake

the same two signals as time-frequency pictures

reference

with the mistake

difference

Blurred peakHissSlow bump shrunkSlid in time

With scripts on, this figure computes both scores live: the mean squared error is the same for all four mistakes, and the distance between time-frequency pictures is not.

Point by point (MSE) toy points the same for all four
As a picture (distance) toy points the second largest of the four

Picture distance of all four, toy points

  1. Blurred peak
  2. Hiss
  3. Slow bump shrunk
  4. Slid in time
A toy signal and two real computations on it. Not an ECG, not the trained model, and its numbers are not results.

01 The problem

The paper names two gaps: a loss that counts errors one time step at a time, and a label that says nothing about the person.

The starting point is a constraint: the paper says privacy regulations limit the sharing of real ECG data, which is why researchers want synthetic recordings at all. It then names two things that current generators such as SSSD-ECG, the model it builds on, do not yet do.

The loss: it counts errors one time step at a time

Figure 2Illustration

Shuffle where the error lands, and see which score notices

Toy signal, blurred peak: the error sits under the sharp peaks.referencewith the error

squared error at each time step, scaled to its tallest bar

With scripts on, this figure takes the error of a blurred toy peak, moves every time step’s error to a random other time step, and computes both scores before and after. The point-by-point score cannot change, because it is a sum over time steps in any order.

Point by point (MSE) toy points before shuffling
As a picture, short window toy points before shuffling
The paper, on the usual loss
“its reliance on a mean squared error (MSE) loss treats each time step independently, failing to impose a global structural prior on the waveform's morphology.”
And on what that may cost
“synthetic signals may achieve low reconstruction error but lack diagnostic realism and trustworthiness.”
Section 3, page 4; Section 1, page 2

IllustrationExact arithmetic on a toy signal made from a formula. It shows a property of the loss, not of any trained model, and its numbers are not results. The paper’s own wording keeps a hedge (“may”), and so does this page.

The label: it says nothing about the person

Figure 3Illustration

What the generator is told, before and after

Two drawings. Above, SSSD-ECG as the paper describes it: one strip of 71 label flags goes through one weight matrix. Below, this paper: five strips, for Diagnostic, Form and Rhythm labels and for age and gender, each with its own weight matrix and an embedding of width 32, joined into one vector c that is given to every layer. SSSD-ECG as the paper describes it 71 label flags weight matrix one vector What this paper changes Diagnostic, 40 Form, 19 Rhythm, 12 Age, 6 bins, new Gender, 2, new own weight matrix width 32 each vector c,to every layer

The two strips in the second colour, marked “new”, are what this paper adds. Followed step by step in section 03.

The paper, on current models
They “typically condition only on coarse diagnostic labels, producing “one-size-fits-all” signals that ignore patients' unique demographic variation (e.g., age, sex).”
And on its own change
“Instead, we build a structured and disentangled representation of patient attributes.”

In its original form, the paper says, SSSD-ECG was conditioned on one vector of 71 diagnostic label flags, projected by one learnable weight matrix. This paper splits the 71 labels into three groups, adds age in six bins and gender in two classes, gives every group its own weight matrix, and joins the embeddings.

Section 1, page 2; Section 3, page 4; Section 3.2, pages 4 and 5

IllustrationA drawing made for this page from Sections 3 and 3.2 of the paper. Strip lengths follow the printed group sizes. It is not a figure from the paper and it shows no result.

02 The idea

Keep the point-by-point loss. Add a second loss that compares time-frequency pictures.

The paper calls it MIDT-ECG, Mel-Spectrogram Informed Diffusion Training. The usual denoising loss stays. Beside it, the real recording and the recording rebuilt from the network’s noise guess are both turned into time-frequency pictures, and the distance between the two pictures is added to the loss with a weight, beta. The bench below lets you see what that second term can tell apart.

Figure 4Illustration

Pick a mistake, then raise beta until the tie breaks

Same MSE, four ways

The MSE that all four mistakes are scaled to.

The paper does not print beta. This scale is the toy’s: at 1× the two terms are equal for the blurred peak at the starting error budget, with both windows and even bands.

Toy signal, three repeats. Not a recording.referenceyours

squared error at each time step, scaled to its tallest bar

Short window: sharp in time

reference

yours

difference

Long window: sharp in frequency

reference

yours

difference

time runs left to right, low frequencies at the bottomlittle energy to muchless than the reference, the same, more

Ltotal = LMSE + β × LMIDTEquation 1 of the paper, with the toy’s two scores

point by point
as a picture: beta ×
total, toy points

The tie-break board the four matched mistakes, ranked by total loss in toy points

    Go further: change the window or the frequency axis, or mix your own mistake and see it ranked as a fifth row
    Window
    Frequency axis
    Show

    The paper’s Figure 1 prints window lengths of 256 and 512 and 64 and 128 Mel bands, and nothing else about these settings. The toy’s windows (32 and 128 time steps), bands (24 and 48) and low-frequency warp are its own, chosen so one repeat is visible.

    Mix your own mistake the chips let go when you touch a slider, the error budget is held, and your mix joins the board as a fifth row

    With scripts on, this bench computes two scores live for a toy signal and a mistake you choose: the mean squared error, and a distance between time-frequency pictures made with a real short-time Fourier transform. Four mistakes are scaled to exactly the same mean squared error. With beta at zero the total loss cannot rank them. Raising beta separates them.

    IllustrationA toy signal made from a formula, and two real computations on it. There is no network and no training here. It shows what each loss can see. It is not the paper’s model and its numbers are not results. What the change bought is a measured question: see Tables 1 and 2.

    How to read it. Top: the toy signal and, under it, where the squared error sits. Middle: time-frequency pictures of the reference and of your candidate, and their difference. Colour shows the square root of the magnitude so faint bands stay visible; the distance is the mean absolute difference of the magnitudes themselves, averaged over the windows in use. Right: the two terms of the loss for your candidate, then the same sum for all four matched mistakes.

    Several window sizes

    In general (this page’s gloss, not the paper’s): a short window is sharp in time, a long one is sharp in frequency. The paper’s reason for using more than one: “To capture both high-frequency transients (e.g., QRS complexes) and low-frequency dynamics (e.g., T-waves), we compute multi-resolution Short-Time Fourier Transforms (STFTs) using multiple window sizes.”

    Section 3.1, page 4; window lengths 256 and 512 in the paper’s Figure 1, page 3

    A frequency axis that favours the low bands

    The spectrograms are warped onto the Mel scale, which the paper says “naturally places greater emphasis on the diagnostically-rich low-frequency bands where information about ST segments and T-wave morphology resides.” Apart from the band counts in the paper’s Figure 1 (64 and 128), the filterbank’s settings (frequency range, magnitude scale) are not printed.

    Section 3.1, page 4; 64 and 128 Mel bands in the paper’s Figure 1, page 3

    An L1 distance, added with a weight

    “We calculate LMIDT as the L1 distance between the multi-resolution mel-spectrograms”, and the training objective is LTotal = LMSE + β LMIDT. The stated aim is “ensuring both pointwise fidelity and physiological coherence”: the first term is kept, not replaced.

    Section 3.1 and Equation 1, page 4

    The principle is not claimed as new. The paper credits audio synthesis, which “has long demonstrated the power of frequency-domain supervision”, and names a concurrent spectrogram-based ECG model, ECG-DPM, that it does not compare against. Its own step is to use the idea as a training loss inside a conditional diffusion model and to measure what that does to the relations between leads. Section 2.3, page 3

    03 One training step, followed

    Follow one recording through one training step: noised, guessed, rebuilt, and scored twice.

    The drawing has three lanes: what the generator is told, one diffusion training step, and the two scores. Solid lines carry signals, dashed lines carry the conditioning, double lines carry pictures. The small dark tiles are the toy, live: one toy recording drawn inside every box it passes through, with the mistake you left in the bench standing in for the network’s error.

    Figure 5Illustration

    Step through it, or select any part of the drawing

    Show
    One training step drawn as three lanes, with one toy recording drawn inside the boxes it passes through. Top: label groups and age and gender each get an embedding, joined into a vector c. Middle: a recording and sampled noise make a noised signal, SSSD-ECG guesses the noise with c at every layer, and the guess is used to rebuild the recording. Bottom: one score compares the noise with the guess point by point, the other compares time-frequency pictures of the recording and the rebuilt recording, and the two are added. What the generator is told One diffusion training step Scored twice How to read the lines a signal the conditioning time-frequency pictures newadded by this paper the toy, live to every layerhow it enters the network:not printed for the baseline the rebuilt signal is used only by the new loss as drawn in the paper’s Figure 1 71 labels, three groupsDiagnostic 40, Form 19, Rhythm 1271 label flagsone vector age and gender6 bins and 2 classesnew one embedding per groupown weight matrix, width 32changedone weight matrixlearnable vector cembeddings joineda continuous representation recording X₀original signal noise εsampled for step t noised Xₜsignal plus noise SSSD-ECGdrawn closed guess εθpredicted noise rebuilt X̂₀reconstructedfor the new loss LMSEpoint by point STFTwindows 256, 512new Mel filterbank64, 128 bandsnew LMIDTas a picture, L1new LtotalL MSE + β L MIDTL MSE alone
    1. A recording arrives with labels and a person attached

      The data is PTB-XL: 21,837 ten-second, twelve-lead recordings from 18,885 patients, 1,000 time steps per lead. The labels are 71 SCP statement labels; age and gender come from the metadata.

      Toy
      one toy recording of 1,000 time steps (one trace, not twelve) and five lit strips
      Section 4, page 5; Section 3.2, page 5
    2. Each kind of information gets its own embedding

      The 71 labels are split into Diagnostic (40), Form (19) and Rhythm (12). Age falls into one of six bins with cutoffs at 12, 17, 34, 54 and 74; gender has two classes. Every group has its own weight matrix and an embedding of width 32, and the embeddings are joined into c.

      Light another age bin on the toy
      Section 3.2, pages 4 and 5
    3. Noise is mixed in

      A diffusion step t is drawn, Gaussian noise is sampled, and the recording is noised to Xt. The paper prints neither the number of steps nor the schedule.

      Toy noise level

      the toy’s noised signal, three repeats

      Section 3, pages 3 and 4; legend of the paper’s Figure 1, page 3
    4. The network guesses the noise, with c at every layer

      SSSD-ECG, built from structured state-space layers, predicts the noise. The conditioning vector is “provided to every layer of the SSSD network, where it modulates internal activations”, not injected once. How it modulates them is not printed.

      the true noise the toy’s guess

      The toy has no network. Its guess is the true noise plus exactly the error that rebuilds your bench candidate.

      In the baseline view: for SSSD-ECG the paper says only that the 71-length label vector “is projected into a continuous representation via a learnable weight matrix”. How that vector enters the network is not printed. Giving c to every layer is described for this paper’s conditioning, in Section 3.2.

      Section 3, pages 3 and 4; Section 3.2, page 4
    5. Score one: point by point

      The usual denoising loss, a mean squared error. As drawn in the paper’s Figure 1, it compares the sampled noise with the guess; the text calls it the MSE “between signals”.

      Toy, on noise
      toy points
      Toy, on signals
      toy points, the bench’s point-by-point score

      Section 3.1 and Equation 1, page 4; the paper’s Figure 1, page 3
    6. Undo the noise using the guess

      From the noised signal and the guess, a reconstructed original signal is formed. The paper draws this arrow in its Figure 1 and prints no formula for it. The toy uses the usual identity for this kind of model: subtract the scaled guess from the noised signal and rescale.

      the toy recording rebuilt from the guess

      In the baseline view: the paper draws the rebuilt signal only inside its own training step, as the input of the new loss. It never says that the baseline’s training step forms it, so this part is struck out.

      The paper’s Figure 1 and its legend, page 3
    7. Score two: compare the pictures

      Both signals go through short-time Fourier transforms at two window lengths and a Mel filterbank; the loss is the L1 distance between the pictures. The appendix puts it plainly: it minimises “the pixel-wise difference between these two representations”.

      rebuilt, short window

      rebuilt, long window

      Toy, short
      toy points
      Toy, long
      toy points
      Section 3.1, page 4; Appendix B, page 15
    8. Add the two scores and take a step

      LTotal = LMSE + β LMIDT. The paper calls the second term “not merely an auxiliary loss, but a core training mechanism”. It does not print beta.

      Toy total

      Equation 1 and Section 3.1, page 4

    Select any part of the drawing to read what it is in the paper, what goes in and out, and what the paper leaves unsaid. Arrow keys move between parts.

    “71 SCP statement labels”

    from SSSD-ECG, regrouped here

    In
    the recording’s labels
    Out
    three one-hot groups

    The paper groups the 71 labels as Diagnostic (40, e.g., MI), Form (19, e.g., HVOLT) and Rhythm (12, e.g., AFIB), and encodes each group independently. The codes are printed as examples and never expanded, so this page does not expand them. In the baseline the paper describes “a 71 length onehot vector”.

    Toy: flag 17 of 40, flag 3 of 19 and flag 5 of 12 are lit. No label code is attached to the toy.

    Section 3.2, page 5; Section 3, page 4

    “Demographic Features”

    new in this paper

    In
    age and gender from the metadata
    Out
    two one-hot groups

    “Age: 6 bins defined by cutoffs at [12, 17, 34, 54, 74]. Gender: 2 classes (male, female).” Height and weight were extracted too; no table reports a result for them. Appendix A’s figures include a BMI-conditioned and an all-demographics variant, without printed numbers.

    Toy: and class 1 of 2 are lit. Not said in the paper: which bin a boundary age falls into.

    Section 3.2, page 5; Section 4, page 5; Appendix A, page 12

    Wk, “a dedicated weight matrix”

    changed in this paper

    In
    one one-hot vector per group
    Out
    one embedding per group, width 32

    Each group is projected by its own weight matrix. The paper says both “its own continuous embedding space” and “a shared 32-dimensional embedding space”; this page says only what both agree on. The baseline, as the paper describes it, used one learnable weight matrix for the single label vector.

    Section 3.2, pages 4 and 5; Section 3, page 4

    The “patient representation vector” c

    a conditioning vector exists in SSSD-ECG; joining it from several parts and giving it to every layer is described in Section 3.2

    In
    the group embeddings
    Out
    c = Concat(ediag, ..., eage, ...)

    The embeddings are concatenated into one vector that “conditions the entire reverse diffusion process”. Not printed: the total width of c.

    Section 3.2, page 4

    X0, the “Original Signal”

    from SSSD-ECG

    In
    PTB-XL
    Out
    to the noising step and to the pictures

    PTB-XL is public: 21,837 recordings, split by patient into 17,441 training, 2,193 validation and 2,203 test samples. It is the only dataset in the paper.

    Toy: three bumps from a formula, repeated. One trace, not twelve, and not a recording.

    Section 4, page 5; legend of the paper’s Figure 1, page 3

    ε, “Sampled Gaussian Noise at t”

    from SSSD-ECG

    In
    a diffusion step t
    Out
    to the noising step and to score one

    The legend of the paper’s Figure 1 names it. Not printed: how many diffusion steps there are, and the noise schedule.

    Toy: one fixed seeded sequence, the same for every visitor.

    Legend of the paper’s Figure 1, page 3

    Xt, the “Noised Signal at t”

    from SSSD-ECG

    In
    the recording and the noise
    Out
    to the network and to the rebuilding step

    The paper’s Figure 1 labels the two arrows into it “Forward Diffusion”.

    Toy: the signal keeps percent of its power at the chosen noise level. The mixing weights are the toy’s.

    The paper’s Figure 1, page 3

    SSSD-ECG

    from Alcaraz and Strodthoff, the paper’s reference [2]

    In
    the noised signal, with c (at every layer, in this paper’s conditioning)
    Out
    a guess of the noise

    The paper: “Its core strength lies in its use of Structured State-Space Model (SSSM) layers, which are highly effective at capturing the long-range temporal dependencies”. The box stays closed here: the paper prints no layer counts, sizes, steps, optimiser or hardware, and does not say how c modulates a layer.

    Section 3, pages 3 and 4; Section 3.2, page 4

    εθ, “Predicted Noise by SSSD-ECG”

    from SSSD-ECG

    In
    the network’s output
    Out
    to score one and to the rebuilding step

    The paper’s Figure 1 labels the path from the noised signal through the network “Predicting”.

    Toy: there is no network. The guess is the true noise plus the error you chose in the bench (now: ).

    The paper’s Figure 1 and its legend, page 3

    X̂0, the “Reconstructed Original Signal”

    drawn in the paper’s Figure 1, used by the new loss

    In
    the noised signal and the guess
    Out
    to the pictures

    The paper’s Figure 1 labels the two arrows into it “Denoising”, inside the box it calls “MIDT Training Step”, and Section 3.1 compares “real and reconstructed ECGs”. The paper never says that the baseline’s training step forms this signal, so the baseline view strikes it out. Not printed: the formula. The toy’s identity (subtract the scaled guess, rescale) is the toy’s choice and is labelled as such.

    Toy: the rebuilt signal is exactly your bench candidate.

    The paper’s Figure 1 and its legend, page 3; Section 3.1, page 4

    LMSE

    point by point, from SSSD-ECG

    In
    the noise and the guess, as the paper’s Figure 1 draws it
    Out
    one number

    The text calls it “the standard MSE denoising loss” and the MSE “between signals”; the paper’s Figure 1 draws its two arrows from the noise panels. This page draws the figure’s version and says so. What it cannot see.

    Toy value on noise: toy points.

    Section 3.1, page 4; the paper’s Figure 1, page 3

    STFT, window lengths 256 and 512

    new in this paper

    In
    the recording and the rebuilt recording
    Out
    spectrograms at two window lengths

    The text says only “multiple window sizes”; the two lengths are printed in the paper’s Figure 1, which does not say what they count. If they are samples, then at the paper’s 100 Hz, 256 of them span 2.56 s of a 10 s recording (computed by this page from the paper’s numbers). Not printed: hop, window function, padding, FFT size.

    Toy windows: 32 and 128 time steps, the toy’s own. The two small pictures in the box are the toy recording and the rebuilt one, short window, even bands.

    Section 3.1, page 4; the paper’s Figure 1, page 3

    Mel FilterBank, 64 and 128 bands

    new in this paper

    In
    spectrograms
    Out
    Mel-spectrograms

    “Crucially, we then warp the frequency axis of these spectrograms onto the perceptually-motivated Mel scale.” Not printed: the filterbank’s frequency range, the magnitude scale, and how the two window lengths pair with the two band counts.

    Toy bands: 24 and 48, even or warped by the toy’s own rule. The two small pictures in the box use the toy’s warped bands.

    Section 3.1, page 4; the paper’s Figure 1, page 3

    LMIDT

    as a picture, new in this paper

    In
    two sets of Mel-spectrograms
    Out
    one number

    “We calculate LMIDT as the L1 distance between the multi-resolution mel-spectrograms”. The appendix draws one spectrogram per lead; the text never says whether the loss is computed lead by lead. Try it in the bench.

    Toy value: toy points.

    Section 3.1, page 4; Appendix B, pages 15 and 16

    LTotal, Equation 1

    the beta term is new in this paper

    In
    the two scores
    Out
    the training loss

    A weighted sum. Not printed: the value of beta, and whether it is fixed or scheduled. No experiment in the paper varies beta, the window lengths or the band counts.

    Toy value: toy points at the bench’s beta.

    Equation 1, page 4

    An original drawing made from Sections 3, 3.1 and 3.2 and the legend of the paper’s Figure 1, not the paper’s figure. The network is drawn closed because the paper prints no layer counts, sizes or schedule for it. Parts tagged “new” or “changed” are what this paper adds to SSSD-ECG; the switch above takes them away. The rebuilt signal is tagged “for the new loss”: the paper draws it only inside its own training step and never says the baseline forms it, so the baseline view strikes it out too, and says that how the label vector enters the baseline network is not printed.

    To generate, the trained model starts from random noise and turns it, step by step, into a recording for the requested labels and demographic bins.

    In the tables that follow, the rows called SSSD-ECG + A and + G add age or gender to the top lane; the paper does not print their loss, and their names suggest the bottom lane is unchanged. The row called MIDT-ECG changes the bottom lane; the paper does not say whether it also uses the new top lane, and prints no row that has both.

    IllustrationA diagram drawn for this page from Sections 3, 3.1 and 3.2 and the legend of the paper’s Figure 1. The small traces, pictures and live values come from the toy, which has no network, and its numbers are not results.

    04 The evidence

    Against the same baseline, the new loss prints a better value in every column of Tables 1 and 2. Conditioning on age or gender does not.

    All results are on PTB-XL: 17,441 training, 2,193 validation and 2,203 test recordings. All four systems share one architecture, and no other generator is compared. Every value below is a printed cell; counts and differences marked “computed from the cells” are this page’s arithmetic.

    Against the baseline: Tables 1 and 2

    Measured, Tables 1 and 2Three variants against SSSD-ECG, ten printed columns. Each cell of the board is the delta the paper prints, with “better” or “worse” decided from its sign and the column’s printed arrow (SNR and SSIM: higher is better; the other eight: lower), which is what the paper’s green and red say. A filled diamond marks better, a hollow ring marks worse.

    The printed deltas against SSSD-ECG (Baseline). Table 1, page 5, and Table 2, page 6.
    VariantRMSEMSESNRFourierHausdorffSSIMMIRNNAAAvg. Corr.Max Corr.
    SSSD-ECG + Aworse +0.0031worse +0.0117better +1.798worse +0.0030worse +0.0019better +0.0086better −0.0054worse +0.0131better −0.016better −0.035
    SSSD-ECG + Gworse +0.0732worse +0.0451worse −1.508worse +0.0730worse +0.3414better +0.0096better −0.0063better −0.0021worse +0.127worse +0.408
    MIDT-ECG (Ours)better −0.0099better −0.0023better +0.578better −0.0099better −0.1010better +0.0309better −0.0018better −0.0056better −0.098better −0.383

    computed from the cells Better than the baseline in: MIDT-ECG 10 of 10 printed columns; SSSD-ECG + A 5 of 10; SSSD-ECG + G 3 of 10.

    One printed column at a time, all four rows

    Bars start at zero. One column at a time, because the columns have different scales and only SNR has a printed unit. Selecting a column in the board does the same.

    Table 1 as printed: four rows, eight columns
    Table 1. Signal fidelity, morphological quality and privacy, with the printed deltas against the baseline. Page 5. Bold as printed. Table 2 is printed in section 05.
    Fidelity & Morphology MetricsPrivacy Metrics
    Training ObjectiveRMSEMSESNRFourierHausdorffSSIMMIRNNAA
    SSSD-ECG (Baseline)0.21140.0524−3.0860.21151.18700.60040.00990.0047
    SSSD-ECG + A0.2145 (Δ +0.0031)0.0641 (Δ +0.0117)−1.288 (Δ +1.798)0.2145 (Δ +0.0030)1.1889 (Δ +0.0019)0.6090 (Δ +0.0086)0.0045 (Δ −0.0054)0.0178 (Δ +0.0131)
    SSSD-ECG + G0.2846 (Δ +0.0732)0.0975 (Δ +0.0451)−4.594 (Δ −1.508)0.2845 (Δ +0.0730)1.5284 (Δ +0.3414)0.6100 (Δ +0.0096)0.0036 (Δ −0.0063)0.0026 (Δ −0.0021)
    MIDT-ECG (Ours)0.2015 (Δ −0.0099)0.0501 (Δ −0.0023)−2.508 (Δ +0.578)0.2016 (Δ −0.0099)1.0860 (Δ −0.1010)0.6313 (Δ +0.0309)0.0081 (Δ −0.0018)−0.0009 (Δ −0.0056)
    • Privacy, read from the table. The best MIR in Table 1 is the gender-conditioned variant’s 0.0036; MIDT-ECG’s 0.0081 is below the baseline’s 0.0099, and its NNAA of −0.0009 is the lowest of the four rows. The paper’s text says “MIDT-ECG attains the lowest MIR and NNAA scores”; the table does not bear that out for MIR.
    Two more notes on Tables 1 and 2: undefined metrics, no intervals
    • Undefined metrics. The paper names the eight metrics and gives each an arrow, and defines none of them, so this page does not either. The RMSE and Fourier columns print nearly the same value in every row; the paper does not comment.
    • No intervals. Tables 1 and 2 print no intervals and no test. The text’s own summary: the new loss “reduces RMSE by 5% and Hausdorff distance by nearly 9% relative to the baseline”.
    Tables 1 and 2 and Section 4.1, pages 5 and 6

    When real data is scarce: Table 4

    Measured, Table 4How to read a row. A synthetic row is 8 synthetic folds from that generator plus the column’s number of real folds; the real-only row is that number of real folds alone. AUROC of a downstream classifier, mean with a 95% interval, higher is better.

    computed from the cells

    Trained on synthetic recordings alone: 0.640 ± 0.094 with MIDT-ECG’s, 0.541 ± 0.074 with the baseline’s. The table marks no P < 0.05 difference between them, and with one real fold every row is at 0.894 or above.

    With 1, 2 and 3 real folds, MIDT-ECG minus real data only: +0.001, −0.001, +0.003. From 1 to 8 real folds, MIDT-ECG and the unmodified baseline generator differ by at most 0.003.

    The paper’s first finding
    “First, when trained exclusively on synthetic data, the MIDT-ECG framework achieves an AUROC of 0.640, substantially outperforming the SSSD-ECG baseline (0.541).”
    In the cells: the two intervals overlap, and in column 0 the only asterisk is on the gender-conditioned row.
    What the cells say about the paper’s second and third findings, and what the paper does not describe
    The second
    “Second, in the critical low-data regime (1-3 folds), hybrid datasets combining synthetic and real data consistently match or surpass the performance of real-only baselines.”
    In the cells: true of the MIDT-ECG and baseline rows to within 0.003; the + A and + G rows sit below the real-only row at 2 and 3 folds, and MIDT-ECG’s 0.911 at 2 folds carries an asterisk.
    The third
    “Third, as the amount of real data increases (4-8 folds), the performance of all methods converges towards the same upper bound.”

    Not described in the paper: the classifier, the labels it predicts, how AUROC is averaged, the evaluation split, the number of runs behind an interval, the test behind the asterisks, and how many recordings a fold holds.

    Table 4 as printed: five rows, nine columns and an average rank
    Table 4. “Full results for the data substitution experiment, measured by AUROC (mean ± 95% CI). *P value < 0.05 vs. best model in that column.” Columns: number of real data folds added. Page 7. Bold and asterisks as printed.
    Data Type012345678Avg Rank
    Baseline
    Real Data Onlyno value0.901 ± 0.0090.912 ± 0.0030.916 ± 0.0030.922 ± 0.0050.924 ± 0.0030.927 ± 0.0020.926 ± 0.0030.927 ± 0.0052.62
    Synthetic Models
    Synthetic (SSSD-ECG)0.541 ± 0.0740.901 ± 0.0070.914 ± 0.0020.917 ± 0.0040.920 ± 0.0040.923 ± 0.0050.926 ± 0.0050.928 ± 0.0030.927 ± 0.0052.89
    Synthetic (SSSD-ECG+A)0.552 ± 0.0680.901 ± 0.0040.906 ± 0.007*0.914 ± 0.0040.918 ± 0.0060.922 ± 0.0030.924 ± 0.0040.925 ± 0.0030.927 ± 0.0025.00
    Synthetic (SSSD-ECG+G)0.507 ± 0.067*0.894 ± 0.002*0.905 ± 0.002*0.911 ± 0.003*0.920 ± 0.0030.923 ± 0.0030.924 ± 0.0030.923 ± 0.001*0.927 ± 0.0035.11
    Synthetic (MIDT-ECG)0.640 ± 0.0940.902 ± 0.0040.911 ± 0.002*0.919 ± 0.0040.920 ± 0.0050.923 ± 0.0040.925 ± 0.0020.926 ± 0.0040.928 ± 0.0022.78

    “no value” stands for a cell the paper leaves empty. The Avg Rank column is shown as printed. 5.00 and 5.11 cannot be average ranks among the five printed rows, so the column cannot be re-derived from this table. The paper does not say how it was computed, and this page computes nothing from it.

    Table 4 and Section 4.3.2, pages 7 and 8

    When real data is plentiful: Table 3

    Measured, Table 3A complete real dataset of 8 folds, with 1 to 8 synthetic folds added. AUROC, mean with a 95% interval, higher is better. The table has no row for the real data alone, so by itself it does not show whether adding synthetic folds helps at all.

    computed from the cells

    Every cell lies between 0.925 and 0.931. MIDT-ECG prints the highest mean in 6 of 8 columns, ties for it in 1 and is not highest in 1.

    The paper’s reading
    “The key finding is that performance gains are marginal and plateau quickly, indicating a point of diminishing returns for augmentation when real data is abundant.”
    Table 3 as printed: one group of four rows, eight columns and an average rank
    Table 3. “Full results of augmenting a complete real dataset (8 folds) with an increasing number of synthetic folds, measured by AUROC (mean ± 95% CI).” Columns: number of synthetic folds added. Page 7. Bold as printed.
    Generator Type12345678Avg Rank
    Synthetic Models
    SSSD-ECG (Baseline)0.928 ± 0.0020.930 ± 0.0020.929 ± 0.0040.928 ± 0.0030.928 ± 0.0040.928 ± 0.0030.926 ± 0.0040.928 ± 0.0023.00
    SSSD-ECG+A0.928 ± 0.0020.927 ± 0.0060.928 ± 0.0030.927 ± 0.0020.926 ± 0.0030.928 ± 0.0040.927 ± 0.0030.928 ± 0.0034.38
    SSSD-ECG+G0.930 ± 0.0010.928 ± 0.0030.925 ± 0.0050.927 ± 0.0030.926 ± 0.0040.926 ± 0.0040.928 ± 0.0030.927 ± 0.0023.75
    MIDT-ECG (Ours)0.928 ± 0.0020.931 ± 0.0030.930 ± 0.0040.929 ± 0.0030.929 ± 0.0050.928 ± 0.0030.929 ± 0.0040.931 ± 0.0041.50

    The Avg Rank column is shown as printed. Its four values add to 12.63 where four ranks add to 10, so it cannot be re-derived from the printed rows. The paper does not say how it was computed, and this page computes nothing from it.

    Tables 3 and 4 are never joined here. The one configuration they share, 8 real plus 8 synthetic folds, prints different cells in the two tables, and the paper does not comment.

    Table 3 and Section 4.3.1, page 7

    05 Between the leads

    The change the paper singles out is in how the leads relate: an average correlation error of 0.140 becomes 0.042.

    The paper says the correlations between the twelve leads “reflect the three-dimensional propagation of the heart's electrical wavefront”, and it measures how far the generated correlations are from the real ones. The toy shows what such a number is; the bars show what the paper printed.

    Figure 6Illustration

    Make twelve traces equally wrong, three ways, and watch what happens between them

    The mistake
    A plain dial. One arrow moves from the centre; twelve numbered viewpoints sit 15 degrees apart around the rim. 123456789101112

    one moving arrow, twelve numbered viewpoints

    what each viewpoint sees, 24 time steps around the sharp peak referencewith the mistake

    Mean MSE per viewpointtoy pointsthe same for all three mistakes
    Mean gap between the two gridstoy pointsover the 66 pairs of traces
    Largest gaptoy pointsthe pair that moved most

    Correlations between the twelve traces

    lower than the reference, the same, higher

    With scripts on, this figure builds twelve traces from one moving arrow and damages them in three ways that have exactly the same point-by-point error per trace. When each slides its own way, or each gets its own hiss, the correlations between them break. When all twelve slide together, every correlation is untouched.

    IllustrationOne moving arrow seen from twelve numbered viewpoints. Not an ECG and not the paper’s model of the heart. This toy explains what Table 2 measures. It does not explain why the paper’s loss improves it: the paper reports the measurement and offers no mechanism. Its numbers are not results.

    How to read it. Each trace is how long the arrow looks from one viewpoint. The grid holds the Pearson correlation of every pair of traces. The toy’s two gaps are the mean, and the largest, absolute difference between the reference grid and the grid with the mistake over the 66 pairs. That is this page’s reading of what Table 2’s caption describes; the paper does not say over which pairs it averages. The gaps are printed in toy points (one ten-thousandth of a correlation), a unit the paper never uses, so they cannot be set beside a cell of Table 2. The picture of one arrow seen from many sides is this page’s; the paper offers only the sentence quoted above.

    Figure 7Measured, Table 2

    Read the printed correlation errors, row by row

    Table 2. “Average and maximum absolute inter-lead correlation error vs. real data.” The printed deltas are against SSSD-ECG (Baseline). Page 6. Bold as printed.
    ModelAvg. Corr.Max Corr.
    SSSD-ECG (Baseline)0.1400.491
    SSSD-ECG + A0.124 (Δ −0.016)0.456 (Δ −0.035)
    SSSD-ECG + G0.267 (Δ +0.127)0.899 (Δ +0.408)
    MIDT-ECG (Ours)0.042 (Δ −0.098)0.108 (Δ −0.383)
    “The MIDT-ECG framework demonstrates a 70% reduction in the average absolute correlation error, from 0.140 down to 0.042.” Section 4.1, page 6

    computed from the cells The abstract says 74%. The two columns fall by 70% and 78%, whose mean is 74%. The paper does not explain the figure. The gender-conditioned row prints nearly double the baseline’s average error, and the text does not comment on it.

    The paper computes Pearson correlation matrices for real and synthetic data, and says the real one shows “the strong positive correlation between adjacent precordial leads (e.g., V1-V2) and the characteristic negative correlation between limb leads I and III”. It shows the matrices as heatmaps in the paper’s Figures 2 and 3 and prints no cell values, so they are not redrawn here.

    The takeaway

    Keep the point-by-point loss and add a loss on the time-frequency picture.

    In the paper’s tables that one change moves every printed fidelity and privacy column the right way against the same baseline, and the paper singles out the relations between leads: 0.140 becomes 0.042. What the paper does not yet have: a second dataset, a clinician’s eye on the signals, or a formal privacy bound.

    06 Office hours

    The night shift answers.

    Written by Tian's agent while Tian slept and Pepper supervised. Pepper accepts no liability either.

    Each answer says where in the paper it comes from, so you can check the agent's work.

    Pepper, the tabby cat, supervising: fast asleep on his blanket on the sofa, beside the laptop.
    Can these synthetic recordings stand in for real ones?

    The paper says yes for low-data settings: its Discussion says such recordings “can serve as a reliable drop-in replacement for real data in pre-training, low-resource model bootstrapping, or federated learning pipelines”. Its one printed test, Table 4, supports a narrower reading, which is this page’s and not the paper’s: alongside real data, yes; alone, not yet. Trained on synthetic recordings alone, the classifier reaches an AUROC of 0.640 ± 0.094 with MIDT-ECG’s data and 0.541 ± 0.074 with the baseline’s, and the table marks no P < 0.05 difference between the two; with a single real fold added, every row is at 0.894 or above. With one to three real folds the MIDT-ECG rows sit within 0.003 of the real-only row (0.902, 0.911, 0.919 against 0.901, 0.912, 0.916), and so do the unmodified baseline’s. From four folds on the paper says all methods converge and that real data “remains the gold standard”. Adding synthetic folds to a full real set leaves AUROC between 0.925 and 0.931, which the paper calls “marginal”. The paper does not describe the classifier, its labels or the number of runs.

    Source: Tables 3 and 4, Sections 4.3.1 and 4.3.2, pages 7 and 8; Discussion, page 9
    Does the paper prove that its synthetic recordings protect privacy?

    No. It reports two empirical scores, Membership Inference Risk and Nearest-Neighbor Adversarial Accuracy, and defines neither. MIDT-ECG prints a lower MIR than the baseline (0.0081 against 0.0099) and the lowest NNAA of the four rows (−0.0009). The lowest MIR in Table 1 belongs to the gender-conditioned variant (0.0036), although the text says MIDT-ECG attains the lowest of both. The paper’s own words: “these results stop short of formal guarantees”, with differential privacy named as future work.

    Source: Table 1 and Section 4.1, page 5; Discussion, page 9
    Two ideas are proposed. Were they tested together, and did conditioning on age and gender help?

    Not together: no printed row combines the new loss with demographic conditioning, and the paper does not say whether the MIDT-ECG row uses demographics. Separately, age conditioning prints the best SNR (−1.288 dB against −3.086) and a lower correlation error (0.124 against 0.140), and worse RMSE, MSE, Fourier, Hausdorff and NNAA. Gender conditioning prints worse values than the baseline in seven of the ten columns of Tables 1 and 2, including an average correlation error of 0.267 against 0.140. The appendix reports that conditioned models “tend to produce more extreme outliers”, and the paper’s own advice is to “use demographic conditioning selectively”.

    Source: Tables 1 and 2, pages 5 and 6; Appendix A, page 12; Discussion, page 9
    How is the second loss set up, and why would it fix the relations between leads?

    The paper prints less than a reader needs to rebuild it. The paper’s Figure 1 gives window lengths of 256 and 512 and 64 and 128 Mel bands. The weight beta, the hop, the filterbank’s frequency range and whether magnitudes are logarithmic are not printed, and no experiment varies any of them or compares the Mel warp with even bands. On the leads: the appendix draws one spectrogram per lead, and the paper offers no mechanism for why such a loss should improve correlations between leads. It reports the measurement in Table 2 and credits the loss. The idea of supervising in the frequency domain is credited to audio synthesis, and a concurrent spectrogram-based ECG model is named. This page’s toys use their own settings and say so.

    Source: the paper’s Figure 1, page 3; Sections 2.3, 3.1 and 4.2; Appendix B, page 16
    What was not tested, and what in the paper cannot be traced?

    One dataset (PTB-XL), one base architecture, no other generator as a comparison, no clinician judging the signals, no cost figures, and rare rhythms remain under-represented by the paper’s own account. The Discussion also cites results that the printed tables do not contain: a rise in correlation error when the loss is removed, a drop in a “personalization SNR”, and a faithfulness metric. The abstract’s 74% sits beside 70% in the body. The Avg Rank columns of Tables 3 and 4 cannot be re-derived from the rows that are printed. The paper does not claim its signals are ready for use in clinical care: it lists “clinician-in-the-loop evaluation” as future work. This page makes no such claim either.

    Source: Discussion, pages 8 and 9; Tables 2 to 4