{"id":"36aa4e9b-bfd8-41c0-9d23-22b88f9c4379","arxiv_id":"2508.16033","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":3.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":2,"one_line_summary":"CoFE edits ECG signals in a StyleGAN2 latent space so that an AI model changes its prediction, and the resulting feature changes match clinical signs for AF and hyperkalemia.","lead":"CoFE is a framework that creates altered ECG signals to show what changes in a patient's heart tracing would flip an AI model's diagnosis. Case studies on atrial fibrillation and potassium level prediction show the generated signals shift in directions consistent with clinical knowledge.","discovery_kind":"extension","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Unconstrained latent optimization plus absence of realism metrics leaves the central physiological-plausibility claim unverified.","rationale":"The reader's CONDITIONAL verdict appears correct. The central claim—'physiologically plausible counterfactuals'—is load-bearing, and the evaluation does not establish it. I agree with the reader's weakest assumption but would sharpen it: Sec. 2.2 minimizes only cross-entropy in latent space, with no proximity term, no early stopping tied to prediction confidence, and no reconstruction/realism metric. Thus 'preserves the morphology' is not guaranteed by the procedure and is not verified by Table 1, which only reports mean changes in features the authors already know are clinically relevant. A GAN artifact could move these features in the same directions. A blinded clinician study or distribution-level realism comparison against real AF/hyperkalemia ECGs would settle this. I do not see an internal contradiction or evidence of fraud; the framework is plausible and the demo has standalone value, but the overclaim in Sec. 4.1 should be held back until such validation is provided. Hence the CONDITIONAL verdict stands without adjustment.","tokens_in":5415,"tokens_out":5997,"duration_ms":76642,"concrete_test":"Run a blinded clinician plausibility study: sample 100 counterfactuals from the current pipeline, 100 reconstructions x̃0=G(E(x)), and 100 real target-condition ECGs matched by age/sex; ask two cardiologists to rate each ECG as plausible/artifact and to indicate which features changed. Pre-register a threshold: if counterfactuals are rated significantly more artifact-like than reconstructions, or are not closer in ECG-feature/embedding space to real target ECGs than to originals, the morphology-preservation and physiological-plausibility claims are unsupported. This directly tests whether the latent-space walk stays on the clinical manifold.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim is that CoFE produces 'physiologically plausible counterfactuals' (Sec. 4.1). This rests on two unsupported links. First, Sec. 2.2 optimizes only CE(f(G(w)), Y_t) with no proximity or realism term; nothing prevents gradient descent from leaving the generator's plausible manifold, yet the paper asserts 'the resulting ECG remains a plausible sample from the clinical data distribution' without measuring reconstruction error, realism, or out-of-distribution status. Second, the only quantitative evidence (Table 1) aggregates four feature values that the paper selected because they are known clinical markers. A GAN artifact that suppresses P-waves and stretches QRS could produce the same table without being a valid counterfactual. No comparison to real AF/hyperkalemia ECGs, no clinician review, and no distribution-level realism check is reported; the qualitative Sec. 4.2 is illustrative, not confirmatory. Therefore the conclusion overstates what the data show.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper introduces CoFE, a framework that generates counterfactual 12-lead ECG signals to explain the decisions of AI-based ECG predictive models. CoFE uses a StyleGAN2 generator trained on MIMIC-IV ECGs, an encoder that maps real ECGs into the generator's latent space, and a pretrained predictive model. Counterfactuals are produced by gradient descent on a cross-entropy loss in latent space to shift the prediction toward a target class. Two case studies are presented: atrial fibrillation classification and potassium level regression. The authors report that the generated counterfactuals show clinically expected changes (reduced P-wave amplitude and increased RR variability for AF; increased T-wave amplitude and prolonged QRS duration for hyperkalemia) and claim that these results demonstrate physiologically plausible counterfactuals that align with established clinical knowledge. The paper also describes an interactive workflow and qualitative comparisons with saliency maps.","tokens_in":5649,"tokens_out":1596,"duration_ms":19850,"significance":"If the central claim is established, CoFE would be a useful addition to ECG XAI, providing a complementary alternative to attribution maps by generating whole-signal counterfactuals that show how a model's prediction would change. The framework's dependence on a pretrained generator and encoder is a sensible design, and the two case studies target clinically meaningful tasks. However, the current evidence does not yet support the strong conclusion of physiological plausibility. The evaluation is limited to four hand-picked features, lacks statistical detail, and does not verify that the generated signals remain realistic ECGs outside the generator's training distribution. The paper's contribution is therefore promising but incompletely validated.","major_comments":[{"comment":"The counterfactual loss contains only the classification term CE(f(G(w)), Y_t). There is no proximity penalty, no realism constraint, and no check that the optimized latent code stays on the generator's learned manifold. The statement that 'the resulting ECG remains a plausible sample from the clinical data distribution' is asserted without any reconstruction error, Fréchet distance, or clinician assessment. Because the optimization is unconstrained, one cannot rule out that the counterfactual is an out-of-distribution artifact. At minimum, the paper should report a distribution-level similarity measure or a human evaluation to support this load-bearing assumption.","section":"Sec. 2.2, Eq. (1)-(2)"},{"comment":"The quantitative evidence consists of four feature means with p-values, but no standard deviations, sample sizes, confidence intervals, or details of the statistical test. The features are selected a priori as known clinical markers, so a shift in those directions is expected if the model has learned those associations; it does not independently validate physiological plausibility. Moreover, the p-values reported as '<0.05' are insufficient without effect sizes or multiple-testing considerations. The claim that these results 'demonstrate' physiological plausibility overstates what the table can support. I recommend reporting per-sample paired differences with distributions, and ideally comparing against a baseline of random latent perturbations.","section":"Table 1 and Sec. 4.1"},{"comment":"The central claim is that the counterfactuals are 'clinically coherent' and 'grounded in physiologically meaningful features.' But the only validation is that the features move in directions consistent with textbook ECG knowledge. This is circular to a degree: the predictive model was trained on labeled data, and the counterfactual optimization pushes the model to the target class; observing that the model's learned associations align with clinical knowledge is a statement about the model, not about the realism or causal validity of the counterfactual. The paper conflates 'the model relies on features that are clinically known' with 'the counterfactual is a physiologically plausible ECG.' An independent check, such as comparing the generated counterfactuals to real ECGs from patients with the target condition or having cardiologists rate plausibility, is needed.","section":"Sec. 4.1 / Sec. 4.2"}],"minor_comments":[{"comment":"Typo: 'i,e.' should be 'i.e.' in the abstract and introduction.","section":"Abstract / Sec. 1"},{"comment":"The caption reads 'severed counterfactual ECGs' but should likely be 'severe counterfactual ECGs' (or 'generated counterfactual ECGs').","section":"Table 1 caption"},{"comment":"The generator is said to be trained on 300,000 ECGs from MIMIC-IV, but no details are given for the encoder training (optimizer, learning rate, train/validation split). Please specify.","section":"Sec. 2.1"},{"comment":"The description says the evaluation sample is 'strictly disjoint' from the potassium regression training set, but is it also disjoint from the generator/encoder training sets? If not, the reconstruction could be optimistically biased. Please clarify.","section":"Sec. 3"},{"comment":"The statistical test used to obtain the p-values is not identified. Please state the test (e.g., paired t-test or Wilcoxon) and the sample size.","section":"Sec. 4.1"}],"recommendation":"major_revision","confidential_remarks":"The paper is a short demo-style manuscript with a plausible but thin evaluation. The main risk is that the central claim of physiological plausibility is currently supported only by the model's own learned associations and a few preselected features. The authors should be encouraged to strengthen the evaluation with distribution-level realism metrics and/or clinician review. The paper cites a related medRxiv preprint by the same group (Ref. [7]) that may already contain some of the missing details; integrating that evidence would help."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Read this as a demo paper, not a full research result. The CoFE framework is essentially a repackaged version of the authors' own prior work (ref [7]); the new piece is the AF classification case study and the demo video. The writing is clear, the workflow is sensible, and pairing counterfactual ECGs with saliency maps is a reasonable way to show both 'where' and 'how' a model decides.\n\nThe soft spot is the gap between what is shown and the central claim of 'physiologically plausible counterfactuals.' Section 2.2 optimizes only cross-entropy in latent space, with no proximity or realism term. Nothing checks whether the optimized latent code leaves the generator's manifold; the assertion that the output 'remains a plausible sample' is exactly the unverified leap. Table 1 reports only four preselected features, all moving in the expected direction, but no standard deviations, effect sizes, or test details beyond p<0.05. A GAN artifact that suppresses P-waves and stretches QRS would produce the same table. No comparison with real AF/hyperkalemia ECGs, no clinician evaluation, no reconstruction error or out-of-distribution measure. The validation is also self-confirming in that the counterfactual reflects the predictive model's learned associations, not an independent physiological ground truth.\n\nTo be fair, the paper does not hide its lineage—it explicitly says the potassium model 'follows the training procedure in [7]'—and for a five-page demo this is acceptable. But the conclusion overstates the evidence. The framework itself is plausible and likely works; the evaluation just doesn't support the clinical coherence claim yet.\n\nWho is this for? Someone building XAI tools for ECG and wanting a concrete example of latent-space counterfactuals. The video may be useful. But a serious referee should ask for (a) a realism metric (reconstruction error, feature-space distance, or clinician rating), (b) a comparison with at least one alternative XAI method, and (c) full statistical reporting. As is, I would not accept this as a full paper, though it could fit a demo or workshop track. If the venue is peer-reviewed, I'd lean desk reject until the evaluation catches up.","headline":"A clean demo of the authors' own prior counterfactual-XAI framework, with an AF case study; the physiological-plausibility claim outruns the evidence.","tokens_in":6083,"tokens_out":2866,"would_cite":false,"duration_ms":29170,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":false},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"CoFE generates counterfactual ECGs that show how waveform changes shift a cardiac AI's predictions, and the changes match clinical knowledge in both test cases.","keywords":["counterfactual explanation","electrocardiogram","explainable AI","generative adversarial network","StyleGAN2","atrial fibrillation","potassium level regression","saliency map"],"falsifier":"Compute the reconstruction error between an input ECG and its encoded-decoded version G(E(x)) on a held-out set, and run a blinded test in which cardiologists or automated quality metrics distinguish real ECGs from generated and counterfactual ones; if counterfactuals are systematically identifiable as artificial, or if edits meant to change one feature also alter unrelated morphology, the claim of physiologically plausible, morphology-preserving counterfactuals fails.","tokens_in":5357,"feed_emoji":"🫀","tokens_out":6274,"duration_ms":76386,"temperature":0.7,"pith_summary":"CoFE is a framework that explains AI-ECG predictions by generating counterfactual 12-lead ECGs: starting from a patient's tracing, it slowly modifies the signal until a pretrained AI model changes its output, then shows the original and edited tracings side by side. The paper demonstrates this on two tasks: atrial fibrillation classification and serum potassium-level regression. The counterfactuals consistently altered the features clinicians would expect — smaller P-waves and more RR variability for atrial fibrillation, taller T-waves and wider QRS for hyperkalemia — and these changes were statistically significant across 1,000 held-out recordings. The authors argue this makes CoFE useful for both interpreting why an AI model makes a decision and validating that the model relies on physiologically meaningful signals.","feed_headline":"What-if ECGs reveal the waveform changes behind AI heart diagnoses","feed_subtitle":"The CoFE framework alters P-waves, RR intervals, or T-waves in synthetic ECGs, linking each change to a prediction shift.","key_machinery":"The core mechanism is gradient descent on a counterfactual loss inside the latent space of a fixed StyleGAN2 generator (a generative adversarial network architecture for high-fidelity signal synthesis). An encoder E maps a real ECG x into a latent code w0; then CoFE iteratively updates w to minimize cross-entropy between the generator's output G(w) and a user-chosen target class Yt, so that the black-box predictor f, which is only used to compute the loss and never modified, sees the target outcome. Because each update stays on the generator's learned manifold of plausible ECGs, the paper argues the resulting counterfactual remains a realistic clinical waveform rather than a distorted artifa","core_discovery":"The paper's central claim is that searching for counterfactual ECGs in the latent space of a pretrained generative model, rather than in raw signal space, yields edited ECGs that remain clinically plausible while shifting the AI's prediction toward a chosen target. In the atrial fibrillation case, counterfactuals that moved the classifier toward AF showed a marked drop in P-wave amplitude and a rise in RR-interval variability; in the potassium case, counterfactuals that raised the predicted potassium showed increased T-wave amplitude and prolonged QRS duration. Both feature changes are established ECG signatures of the respective clinical states, so the paper concludes that CoFE produces phy","pith_inferences":["A natural next test would be a blinded clinician study asking whether counterfactual ECGs are indistinguishable from real ECGs and whether the edited features remain diagnostically sensible; the paper reports waveform statistics but no such perceptual validation.","Because the counterfactual is confined to the generator's latent manifold, the framework's fidelity likely depends on whether the generator was trained on cases resembling the input; rare or unusual morphologies may force edits that alter unrelated features, which the current evaluation does not check.","The same latent-space optimization could be inverted for hypothesis testing: a clinician prescribes a feature change (e.g., raise the T-wave) and CoFE finds the closest ECG realizing it, then reports how the AI's prediction responds — a mode hinted at by the interactive sliders but not quantitatively evaluated.","The paper reports average feature shifts but not per-patient consistency; a stronger claim would require showing that counterfactual edits remain stable across repeated runs and across similar inputs."],"forward_implications":["For atrial fibrillation classifiers, CoFE indicates the model is keying on reduced P-wave amplitude and increased RR-interval variability, so a clinician can see which rhythm features drive the AI's AF decision.","For potassium-level regression, CoFE shows that the model maps taller T-waves and wider QRS complexes to higher potassium, matching the ECG presentation of hyperkalemia.","Pairing saliency maps with counterfactuals gives a fuller explanation: where the model looks (saliency) plus what edit would change the outcome (counterfactual).","Because the predictive model f is a plug-in component, the same framework can be applied to other ECG classification or regression tasks without retraining the generator.","CoFE can serve as a model-validation tool: if a counterfactual edit pushes a prediction in a clinically implausible direction, that signals the model may be relying on non-physiologic cues."],"supporting_citations":[{"why":"Defines the StyleGAN2 architecture whose latent space CoFE uses for counterfactual optimization.","marker":"[10]"},{"why":"Supplies the labeled ECG recordings used to train the atrial fibrillation classifier that CoFE explains.","marker":"[4]"},{"why":"Supplies the large real-world ECG set used to train the generator, grounding the claim that synthesized ECGs follow real cardiac morphology.","marker":"[6]"},{"why":"Supplies the paired ECG–potassium data and the held-out evaluation ECGs for the potassium regression case study.","marker":"[9]"},{"why":"Provides the training procedure for the potassium regression model and the earlier generative-counterfactual approach CoFE builds on.","marker":"[7]"},{"why":"Supplies the established ECG features of atrial fibrillation used to judge whether counterfactual changes are clinically coherent.","marker":"[3]"},{"why":"Supplies the established ECG features of hyperkalemia used to judge whether potassium counterfactual changes are clinically coherent.","marker":"[1]"}],"fun_headline_variants":["Counterfactual ECGs reveal how AI heart models decide","Flip ECG features to see what AI sees in your heart","What-if ECG edits decode cardiac AI predictions","CoFE: editing ECGs to explain AI heart checks","See cardiac AI's reasoning through counterfactual ECGs"],"cache_read_input_tokens":2688,"weakest_assumption_plain":"The framework assumes that nudging a synthetic ECG's internal code to change a prediction always produces a believable tracing that still looks like the same patient's waveform; the paper asserts this in Section 2.2 but does not measure reconstruction fidelity, realism, or morphology preservation directly.","fun_headline_variants_meta":{"raw":{"variants":["Counterfactual ECGs reveal how AI heart models decide","Flip ECG features to see what AI sees in your heart","What-if ECG edits decode cardiac AI predictions","CoFE: editing ECGs to explain AI heart checks","See cardiac AI's reasoning through counterfactual ECGs"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000209,"raw_usage":{"total_tokens":1222,"prompt_tokens":697,"completion_tokens":525,"prompt_tokens_details":{"cached_tokens":256},"prompt_cache_hit_tokens":256,"prompt_cache_miss_tokens":441,"completion_tokens_details":{"reasoning_tokens":447}},"tokens_in":441,"tokens_out":525,"duration_ms":6358,"temperature":1.0,"reasoning_tokens":447,"cache_read_input_tokens":256,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-05T17:34:05.797355+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Compute the reconstruction error between an input ECG and its encoded-decoded version G(E(x)) on a held-out set, and run a blinded test in which cardiologists or automated quality metrics distinguish real ECGs from generated and counterfactual ones; if counterfactuals are systematically identifiable as artificial, or if edits meant to change one feature also alter unrelated morphology, the claim of physiologically plausible, morphology-preserving counterfactuals fails.","supporting_citations":[{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Defines the StyleGAN2 architecture whose latent space CoFE uses for counterfactual optimization."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Supplies the labeled ECG recordings used to train the atrial fibrillation classifier that CoFE explains."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Supplies the large real-world ECG set used to train the generator, grounding the claim that synthesized ECGs follow real cardiac morphology."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Supplies the paired ECG–potassium data and the held-out evaluation ECGs for the potassium regression case study."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Provides the training procedure for the potassium regression model and the earlier generative-counterfactual approach CoFE builds on."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Supplies the established ECG features of atrial fibrillation used to judge whether counterfactual changes are clinically coherent."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Supplies the established ECG features of hyperkalemia used to judge whether potassium counterfactual changes are clinically coherent."}],"review_version":1}