Skip to content

Research plan

Research project, not a build sprint. Each phase ends in a written deliverable under docs/research/; no phase starts until the previous one's write-up exists. A parallel docs/learn/ track teaches every prerequisite from zero — study its lessons alongside each phase as mapped in ../learn/README.md.

Research questions:

  1. Does adding a scalogram branch improve N/V/S/F/Q classification over raw signal alone?
  2. Does a dual-path late-fusion Mamba (Approach A) beat early fusion (Approach B)?
  3. Can V-class recall reach safety-relevant levels without collapsing macro F1?

Phase 0 — project docs (done)

  • README, architecture, data, model, approaches docs.
  • uv chosen for package management; no pyproject yet.

Phase 1 — literature review (first, before any code)

Survey and write up literature.md:

  1. MIT-BIH benchmarks on AAMI N/V/S/F/Q: reported per-class F1, splits used (de Chazal DS1/DS2 vs random — note which papers leak).
  2. Preprocessing standards: baseline removal, beat windowing, normalization.
  3. Time-frequency methods for ECG: CWT/scalogram papers, wavelet choice, scale ranges.
  4. Sequence models for ECG: CNN, LSTM, transformers, and SSM/Mamba on biosignals.
  5. Class imbalance handling in heartbeat literature: weighting, sampling, focal loss.
  6. Multi-label vs single-label framing per beat vs per record.

Acceptance: literature.md exists with a results table (paper, split, macro F1, V recall), a gap analysis naming what is missing (Mamba + scalogram fusion gap), and explicit decisions the survey forces (window length, scale range, split protocol, baseline set).

Phase 2 — data protocol + baselines

  1. MIT-BIH via wfdb, AAMI mapping, preprocessing exactly as the survey justifies.
  2. Patient-wise DS1/DS2 splits; publish class counts per split.
  3. Baseline experiments: 1D-CNN, CNN+LSTM. Write up baselines.md with numbers.

Acceptance: baselines.md reproduces literature ballpark on DS2; any deviation explained.

Phase 3 — Approach A experiments (primary)

  1. Branch A (signal Mamba) and Branch B (scalogram Mamba), single-batch overfit first.
  2. Full train, per-branch scores, then logit fusion + threshold tuning.
  3. Write up experiments-a.md: per-branch and fused results vs baselines.

Acceptance: fused A compared against Phase 2 baselines on macro F1 and V recall, with error analysis on Q/F failures.

Phase 4 — Approach B ablation + comparison

  1. Early-fusion single model as the ablation.
  2. Head-to-head A vs B write-up in experiments-b.md; keep whichever wins, report both.

Acceptance: the fusion question (RQ2) answered with numbers, not opinion.

Phase 5 — final evaluation + write-up

  1. Final DS2 eval, confusion matrices, PR curves, threshold table.
  2. Limitations + future work (second lead, record-level multi-label, real-time).
  3. results.md as the paper-style summary of the whole project.

Acceptance: results.md lets a stranger reproduce splits, training, and numbers.

Blocked on

  • Terminal access (env check was denied) — Phases 2+ need you to approve commands.
  • Open question: single-label per beat vs multi-label per window (to be settled in Phase 1).