Conduct a reproducible scientific literature review of evaluation methods and training loss functions for synthetic ECGs generated by machine-learning generative models.

WORKSPACE AND FIRST ACTION
Use /work/vajira/DL2026/ECGEN-Eval/literature_review_codex as the review root. Read applicable repository instructions and preserve existing work. Before searching for papers, write review_plan.md in this folder, covering the research questions, date window, eligibility criteria, search sources and queries, screening process, extraction schema, synthesis approach, and completion criteria. Then execute the plan. Record material changes to the plan and their reasons.

1. SCOPE AND RESEARCH QUESTIONS
Synthetic ECGs are ECG waveforms generated using models such as GANs, VAEs, diffusion models, flow-matching models, normalizing flows, autoregressive models, or other learned generative models. Include unconditional and conditional generation, including generation conditioned on diagnoses, patient attributes, text, or other signals. Include augmentation studies when they generate ECG waveforms and report relevant evaluation or training objectives.

Prioritize these questions:
- How do papers evaluate signal fidelity, physiological and clinical validity, diversity, coverage, downstream utility, privacy, and computational performance?
- Which training objectives and loss functions are used, how are they defined and weighted, and what evidence links them to improved generation?
- Which evaluation methods are reproducible, appropriate to their stated claims, and useful for developing an ECG generation benchmark?
- What methodological weaknesses and gaps remain?

Use a rolling three-year window ending on the actual search date. Record the exact inclusive dates; for a search on 2026-10-25, use 2023-10-25 through 2026-10-25. Verify dates rather than inferring them from search snippets. Record first-publication, preprint, and peer-reviewed publication dates separately where available. A study is eligible if its first public report or first peer-reviewed publication is in the window; a revised upload alone does not establish eligibility. Merge preprint and published versions into one study record, identifying the version analyzed. Clearly label peer-reviewed papers and preprints. Older methodological references may be cited as background but must be separated from the in-window study counts.

Exclude non-ECG signals, purely mechanistic simulators without a learned generative component, ECG image-only generation without waveform evaluation, and classification-only studies without synthetic ECG generation. Treat denoising, imputation, reconstruction, and lead translation as adjacent work: include them in the main review only if they explicitly assess synthetic waveform generation; otherwise record particularly relevant methods separately. Use reviews for discovery and context, not as substitutes for primary studies.

2. SEARCH AND SCREENING
Search multiple complementary scholarly sources available to you, such as PubMed, Europe PMC, arXiv, OpenAlex, Semantic Scholar, IEEE Xplore, ACM Digital Library, and publisher or conference websites. Use Google Scholar if accessible. State which sources were actually searched and document access limitations; do not imply inaccessible sources were searched.

Develop and refine queries using combinations of:
- Signal: ECG, electrocardiogram, electrocardiography, electrocardiographic.
- Generation: synthetic, synthesis, generation, generative, GAN, adversarial, VAE, variational autoencoder, diffusion, score-based, flow matching, normalizing flow, autoregressive.
- Evaluation: evaluation, validation, metric, fidelity, morphology, physiology, clinical validity, diversity, utility, augmentation, privacy, memorization, benchmark.
- Training objectives: loss, objective, reconstruction, adversarial, spectral, frequency, perceptual, physiological, contrastive, distribution matching.

Run broad signal-plus-generation searches as well as focused evaluation and loss searches, so papers are not missed merely because their abstracts omit evaluation terminology. Adapt syntax to each source. For every search, record source, exact query, filters, execution date, available result count, and how many results were screened. Document search limits, unavailable counts, and stopping rules. Perform backward and forward citation searches for key papers, subject to the date policy.

Deduplicate by DOI, arXiv identifier, and normalized title/authors, checking related versions manually. Screen titles and abstracts, then full texts where available. Maintain a screening log with study ID, decision, reason, and review stage. Distinguish excluded studies from potentially eligible papers awaiting full text. Report identification, duplicate removal, screening, eligibility, inclusion, and unavailable-full-text counts consistently. Describe this as a single-reviewer review unless independent reviewers actually participate; do not claim exhaustive coverage or formal guideline compliance without evidence.

3. ORGANIZATION AND PAPER DOWNLOADS
Use a stable study ID such as FirstAuthor_Year_ShortTitle, adding a suffix when needed. Organize the folder as follows:

  review_plan.md
  search_log.csv
  screening_log.csv
  paper_inventory.csv
  extraction.csv
  metric_catalog.md
  loss_catalog.md
  literature_review.md
  unavailable_papers.md
  references.bib
  notes/<study_id>.md
  papers/<year>/<study_id>/paper.pdf
  papers/<year>/<study_id>/supplementary/

Keep downloaded original source material, including PDFs, supplementary files, source archives, and saved publisher HTML, under papers/. Keep authored notes, metadata, and synthesis outside that directory. Avoid duplicate downloads of the same study version.

Prefer publisher open-access copies, institutional repositories, author manuscripts, and arXiv. Use lawful accessible sources; do not bypass authentication or paywalls. Verify each download is the intended paper and is a readable document rather than an error page. Record title, authors, year, venue, publication status, DOI/arXiv ID, landing-page URL, direct download URL where available, access date, version, local relative path, and download status in paper_inventory.csv.

If a paper cannot be downloaded, add it to unavailable_papers.md with its study ID, full citation, DOI/publisher link, any alternative full-text links, attempted sources, failure reason, relevance, and expected local destination. Continue reviewing accessible papers. Distinguish failure to download from inability to read full text online. If only an abstract is available, flag the record as abstract-only and do not infer unreported metrics, losses, or results.

4. EVIDENCE EXTRACTION
Read the methods, evaluation, experiments, and relevant supplementary material. Create one detailed note per study and a comparable extraction table. Every substantive extracted claim must have a source locator, such as page, section, table, figure, or equation number. Link notes to the study record and original source. Use explicit values such as "not reported", "unclear", "not applicable", or "full text unavailable" instead of guessing.

Extract:
- Study metadata, task, model family, architecture, conditioning, and contribution.
- Datasets, population, diagnoses, sample counts and units, lead configuration, sampling frequency, signal duration, preprocessing, normalization, train/validation/test splitting, patient separation, and external validation.
- Every reported evaluation metric: name, definition or equation when available, units, desired direction, aggregation, implementation, feature extractor and its training data, reference distribution, and whether it requires paired signals. Distinguish waveform, distribution, morphology/physiology, expert/clinical, diversity, utility, privacy, and efficiency evaluations. These are extraction categories, not assumptions that every paper covers them.
- Downstream evaluation design, including train-on-synthetic/test-on-real when used, augmentation ratios, real-only baselines, held-out real data, class balance, and potential patient or preprocessing leakage.
- Clinical or expert assessment protocol, reviewer expertise, blinding, sample size, and agreement measures where reported.
- Training losses: total objective and individual terms, equations or faithful paraphrases, coefficients, schedules, target networks, application to generator/discriminator/encoder/decoder, and their intended purpose. Separate training objectives from validation criteria and post-training metrics, even when they share a name.
- Evidence for each loss or evaluation choice: ablations, baselines, effect sizes, uncertainty, statistical tests, seeds/runs, and failure cases. Distinguish the authors' explanation from experimentally demonstrated benefit.
- Code, data, weights, metric implementations, repository links, and reproducibility limitations. If inspecting code resolves an ambiguity, record the file and commit/version and distinguish code evidence from paper evidence.

5. CRITICAL SYNTHESIS AND DELIVERABLES
Write literature_review.md with the scope and search methods, screening counts, study characteristics, evaluation taxonomy, loss taxonomy, comparative tables, methodological critique, evidence gaps, and recommendations for evaluating newly generated ECGs.

Build metric_catalog.md and loss_catalog.md as cross-paper reference tables. For each metric or loss, list its definition, purpose, required inputs or pairing, implementation details, limitations, and studies using it. Preserve meaningful differences between similarly named methods. Separate paper-reported definitions from reviewer explanations or proposals.

Critically assess whether comparisons are justified across datasets, preprocessing, lead configurations, signal lengths, and evaluation protocols. In particular, examine the validity of paired errors for unpaired generation, generic versus ECG-specific feature extractors, distribution similarity versus physiological validity, diversity and memorization, and downstream utility versus independent clinical validity. Do not rank models using scores obtained under incompatible protocols.

Recommend a practical core evaluation suite and optional task-specific extensions, explaining what each component tests, its data requirements, and the supporting evidence. Identify proposals that require further validation. Cite all paper-specific claims with stable study IDs and links, and provide complete bibliographic entries in references.bib. Do not fabricate papers, citations, equations, findings, or search counts.

6. GIT HYGIENE AND COMPLETION
Before downloading, add a narrowly scoped ignore rule for /literature_review_codex/papers/ to the repository .gitignore, preserving existing content. Keep review plans, search and screening logs, inventories, extracted data, notes, bibliography, and synthesized findings eligible for version control. Check whether any original source files are already tracked or staged; ignore rules alone do not remove tracked files. Ensure downloaded original source files are excluded from any task-related staging or commits without deleting local copies or disturbing unrelated user changes. Do not create a commit unless separately requested.

Before finishing, reconcile counts across logs and the review, verify citation and local-file links, check that included studies have notes and extraction records or explicit missing-evidence flags, and verify download status and ignore behavior. State limitations and any unfinished work transparently.

Finish with a concise summary linking to the review and key deliverables, giving the search window, numbers of included studies and downloaded papers, key findings about evaluation methods and losses, and the location of unavailable_papers.md for papers requiring user assistance.
