medsci-skills 5.15.0 → 5.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -5
- package/metadata/distribution_files.json +135 -20
- package/metadata/distribution_manifest.json +3 -1
- package/metadata/skills_catalog.json +23 -3
- package/package.json +1 -1
- package/skills/architecture-zoo/SKILL.md +6 -3
- package/skills/architecture-zoo/references/graph.md +110 -0
- package/skills/architecture-zoo/references/index.md +5 -1
- package/skills/architecture-zoo/skill.yml +1 -1
- package/skills/model-scaffold/SKILL.md +35 -16
- package/skills/model-scaffold/references/finetuning_guide.md +91 -0
- package/skills/model-scaffold/references/mlops_guide.md +77 -0
- package/skills/model-scaffold/references/training_guide.md +3 -1
- package/skills/model-scaffold/scripts/check_training_hygiene.py +38 -2
- package/skills/model-scaffold/scripts/scaffold.py +263 -1
- package/skills/model-scaffold/scripts/scaffold_challenge/problem.md +6 -0
- package/skills/model-scaffold/scripts/scaffold_challenge/verify.sh +20 -2
- package/skills/model-scaffold/skill.yml +4 -1
- package/skills/model-scaffold/tests/fixtures/finetune_no_provenance/train.py +24 -0
- package/skills/model-scaffold/tests/test_training_hygiene.sh +14 -1
- package/skills/radiomics-ml/SKILL.md +134 -0
- package/skills/radiomics-ml/references/radiomics_ml_guide.md +115 -0
- package/skills/radiomics-ml/scripts/check_radiomics_ml.py +229 -0
- package/skills/radiomics-ml/scripts/check_radiomics_ml_challenge/expected/strong.txt +9 -0
- package/skills/radiomics-ml/scripts/check_radiomics_ml_challenge/expected/weak.txt +14 -0
- package/skills/radiomics-ml/scripts/check_radiomics_ml_challenge/fixture/pipeline_strong.json +13 -0
- package/skills/radiomics-ml/scripts/check_radiomics_ml_challenge/fixture/pipeline_weak.json +13 -0
- package/skills/radiomics-ml/scripts/check_radiomics_ml_challenge/problem.md +20 -0
- package/skills/radiomics-ml/scripts/check_radiomics_ml_challenge/verify.sh +37 -0
- package/skills/radiomics-ml/skill.yml +46 -0
- package/skills/radiomics-ml/tests/test_radiomics_ml.sh +88 -0
- package/skills/uncertainty-imaging/SKILL.md +133 -0
- package/skills/uncertainty-imaging/references/uncertainty_guide.md +93 -0
- package/skills/uncertainty-imaging/scripts/check_uncertainty_reporting.py +261 -0
- package/skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/expected/strong.txt +9 -0
- package/skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/expected/weak.txt +11 -0
- package/skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/fixture/uncertainty_strong.json +12 -0
- package/skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/fixture/uncertainty_weak.json +9 -0
- package/skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/problem.md +38 -0
- package/skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/verify.sh +38 -0
- package/skills/uncertainty-imaging/skill.yml +47 -0
- package/skills/uncertainty-imaging/tests/test_uncertainty_reporting.sh +80 -0
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
# MedSci Skills
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**55 skills that actually work.** Built by a physician-researcher, tested on real publications.
|
|
6
6
|
|
|
7
7
|
*MedSci Skills is an end-to-end research tool for physician and medical-engineering researchers — design → scaffold → validate → publish — for the clinical manuscript and the medical-AI model behind it. Its moat is the compliance layer — 44 reporting guidelines and risk-of-bias tools, reference/citation verification, and deterministic integrity gates before peer review — now extended by a model-engineering lane that scaffolds reproducible, leakage-safe training repos and audits model validation. Clinical AI model research engineering is in scope; a general AI-scientist platform is not. It competes on clinical submission reliability, not skill count.*
|
|
8
8
|
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://github.com/Aperivue/medsci-skills/releases/latest)
|
|
11
11
|
[](https://github.com/Aperivue/medsci-skills/actions/workflows/validate.yml)
|
|
12
|
-

|
|
13
13
|
[](https://www.npmjs.com/package/medsci-skills)
|
|
14
14
|
[](https://youtu.be/MclQ_RIofpE)
|
|
15
15
|
[](https://github.com/Aperivue/medsci-skills/contribute)
|
|
@@ -285,6 +285,10 @@ The E2E pipeline (`orchestrate --e2e`) produces everything up to `qc/`. The `sub
|
|
|
285
285
|
|
|
286
286
|
## What's New
|
|
287
287
|
|
|
288
|
+
**v5.17** — model-engineering produce-side depth, **completion**. Deployment safety + the final roadmap/candidate items: a new **`uncertainty-imaging`** skill + `check_uncertainty_reporting` gate (calibrated per-case uncertainty / OOD guard on a held-out set / abstention at a pre-specified target / calibration-under-shift — for a deployment-framed model), an **MLOps wiring reference** for `model-scaffold` (experiment tracking, config/data/environment versioning, CI-for-ML — pointing to W&B / MLflow / nnU-Net, reimplementing nothing), and an **`architecture-zoo` graph-neural-net family card** (GCN / GraphSAGE / GAT / GIN / BrainGNN for brain connectomes) that closes the last candidate gap. The six-item produce-side depth roadmap and its candidate list are now complete. Additive and backward-compatible; **55 skills / 44 guidelines / 50 integrity detectors / 22 domain-probe modules**. (See the [CHANGELOG](CHANGELOG.md) for v5.0–v5.16.)
|
|
289
|
+
|
|
290
|
+
**v5.16** — model-engineering produce-side depth, clinical fine-tuning focus (Items 3–4 of the [produce-side depth roadmap](docs/roadmap_model_engineering_depth.md)). A new **`radiomics-ml`** skill + `check_radiomics_ml` gate for the most common solo-doable clinical-ML workflow — radiomics / tabular features → any classical learner (LASSO / SVM / random forest / XGBoost / …) → a clinical outcome, no GPU — with a learner-agnostic nested-CV / calibration / stability gate; plus a **`model-scaffold` fine-tuning mode** (`--task finetune` + `--from-pretrained`) that adapts a pretrained backbone on collected clinical data with a frozen→unfrozen schedule, discriminative learning rates, and a pretrained-weight provenance record (`PRETRAINED.md` + a `PRETRAINED_PROVENANCE_MISSING` verdict on the existing `check_training_hygiene`, plus a MedSAM-adaptation + train-only diffusion-augmentation guide). Additive and backward-compatible; **54 skills / 44 guidelines / 49 integrity detectors / 22 domain-probe modules**. (See the [CHANGELOG](CHANGELOG.md) for v5.0–v5.15.)
|
|
291
|
+
|
|
288
292
|
**v5.15** — model-engineering produce-side depth. Two new skills that *produce* what the review lane previously only audited: **`preprocess-imaging`** (DICOM/NIfTI data prep + a `check_preprocessing_leakage` gate that extends the split-leakage moat upstream to the data stage) and **`explainability`** (Grad-CAM / saliency held to the reviewer bar — Adebayo sanity checks, quantitative localisation vs ground truth, attribution-not-validation framing, via `check_explainability_report`). Plus a by-stage skill index, multi-host README/About (Claude Code · Codex · Cursor · Copilot), copy-paste citation ergonomics, and a real-project precision fix. Additive and backward-compatible; **53 skills / 44 guidelines / 48 integrity detectors / 22 domain-probe modules**. (See the [CHANGELOG](CHANGELOG.md) for v5.0–v5.14.)
|
|
289
293
|
|
|
290
294
|
**v4.10** — reviewer-coverage expansion reverse-engineered from high-IF, CC-BY papers (learn-only under the `reverse_engineer/` license firewall), plus a clinician-friendly update path. Additive and backward-compatible; 45 skills / **44 guidelines** / 36 detectors / **15 domain-probe modules** (was 12):
|
|
@@ -402,6 +406,8 @@ MedSci Skills is **opinionated and narrow on purpose**: a single physician-resea
|
|
|
402
406
|
|
|
403
407
|
📖 **Per-skill reference:** [`docs/skills/`](docs/skills/) — one page per skill (what it does, when it activates, its Quality Card — purpose, safety boundaries, known limitations, validation, evidence — and bundled resources), generated from each `SKILL.md` + `skill.yml`. See [`docs/skills/AUDIT.md`](docs/skills/AUDIT.md) for how the skills are validated.
|
|
404
408
|
|
|
409
|
+
🧠 **ML / DL method coverage:** [`docs/method_coverage_map.md`](docs/method_coverage_map.md) — which machine-learning and deep-learning method families (CNN / transformer / segmentation / detection / foundation / diffusion / SSL for imaging; the full classical family — penalised regression, SVM, k-NN, trees, boosting [XGBoost / LightGBM / CatBoost], MLP, ensembles, clustering — for radiomics/tabular; LLM/MLLM) map to which skills for selection, production, validation, interpretation, and reporting.
|
|
410
|
+
|
|
405
411
|
```
|
|
406
412
|
┌─────────────────────────────────┐
|
|
407
413
|
│ orchestrate: single entry point │
|
|
@@ -451,14 +457,14 @@ ma-scout -> search-lit -> fulltext-retrieval -> design-study ──> write-proto
|
|
|
451
457
|
|
|
452
458
|
### By research stage
|
|
453
459
|
|
|
454
|
-
All
|
|
460
|
+
All 55 skills, grouped by where they fit in the clinical-manuscript and medical-AI lifecycle. Full descriptions are in the table below; one page per skill lives in the [per-skill reference](docs/skills/).
|
|
455
461
|
|
|
456
462
|
| Stage | Skills |
|
|
457
463
|
|-------|--------|
|
|
458
464
|
| 🔭 **Discover & scope** | `ma-scout` · `find-cohort-gap` · `search-lit` · `fulltext-retrieval` · `lit-sync` · `author-strategy` |
|
|
459
465
|
| 📐 **Design & plan** | `design-study` · `calc-sample-size` · `define-variables` · `write-protocol` · `fill-protocol` · `design-ai-benchmarking` |
|
|
460
466
|
| 🧹 **Data & analysis** | `deidentify` · `clean-data` · `generate-codebook` · `version-dataset` · `analyze-stats` · `batch-cohort` · `cross-national` · `replicate-study` |
|
|
461
|
-
| 🤖 **Medical-AI model engineering** | `preprocess-imaging` · `architecture-zoo` · `model-scaffold` · `model-validation` · `model-evaluation` · `explainability` · `model-card` · `mllm-eval` |
|
|
467
|
+
| 🤖 **Medical-AI model engineering** | `preprocess-imaging` · `architecture-zoo` · `model-scaffold` · `model-validation` · `model-evaluation` · `uncertainty-imaging` · `explainability` · `radiomics-ml` · `model-card` · `mllm-eval` |
|
|
462
468
|
| ✍️ **Write & visualize** | `write-paper` · `make-figures` · `review-paper` · `present-paper` · `humanize` · `polish-language` · `academic-aio` |
|
|
463
469
|
| ✅ **Comply & verify** | `check-reporting` · `self-review` · `verify-refs` · `manage-refs` |
|
|
464
470
|
| 📤 **Submit & respond** | `find-journal` · `add-journal` · `sync-submission` · `revise` · `peer-review` · `fill-icmje-coi` |
|
|
@@ -481,11 +487,13 @@ All 53 skills, grouped by where they fit in the clinical-manuscript and medical-
|
|
|
481
487
|
| **design-ai-benchmarking** | Design and validity review for benchmarking AI system(s) against a human-expert panel: evaluation-question and arm definition, decoupled multi-dimensional rubrics with anchors, planted calibration probes (positive-control / known-bad / instability / mechanism-contradiction), reviewer-panel construction with per-reviewer randomization, inter-rater reliability targets with separate control-item reliability, LLM-as-judge vs human-as-judge adjudication, construct-independence guards, and a structured JSON rating-export schema. Locks the rubric before data collection. |
|
|
482
488
|
| **model-validation** | Design or audit the clinical-validation study for an engineer-built medical-imaging model (segmentation / classification / detection): patient-level split disjointness and the data-leakage taxonomy, tuning-on-test, internal vs genuine external validation, comparator design, single-run vs multi-seed variance, task-correct metric selection (Metrics Reloaded), test-set sizing, and CLAIM 2024 / TRIPOD+AI / STARD-AI reporting fit. Ships a deterministic split-leakage gate that proves patient disjointness by set arithmetic on the emitted split table. Integrates with MONAI / nnU-Net — does not replace them. |
|
|
483
489
|
| **preprocess-imaging** | Design or audit the data-preparation stage of a medical-imaging model — DICOM/NIfTI intake, resampling, intensity normalization, and the augmentation plan — so the pipeline is leakage-safe before `model-scaffold` builds the training repo. Emits a declarative preprocessing manifest and a deterministic data-stage leakage gate (`check_preprocessing_leakage`) that catches what the split table cannot see: a dataset-level normaliser fit on non-train data (`NORMALIZATION_LEAKAGE`), a data-fitted transform run before the split (`PREPROCESS_BEFORE_SPLIT`), and a patient's slices crossing splits (`PATIENT_CROSS_SPLIT`). Integrates MONAI / TorchIO transforms; never reimplements them or touches real patient data. |
|
|
484
|
-
| **model-scaffold** | Generate a reproducible, runnable PyTorch training repo for a medical-imaging task — segmentation (U-Net), classification, detection, image-to-image synthesis,
|
|
490
|
+
| **model-scaffold** | Generate a reproducible, runnable PyTorch training repo for a medical-imaging task — segmentation (U-Net), classification, detection, image-to-image synthesis, self-supervised pretraining, or fine-tuning a pretrained backbone (transfer learning) — the missing middle link between choosing an architecture and validating a trained model. Emits a patient-level seed-locked split as an auditable artifact, a task-appropriate model, train/evaluate scripts that seed every RNG and infer under eval mode, a config, requirements, a reproducibility record, and a Methods stub with VERIFY placeholders (no fabricated numbers). Fine-tuning mode (`--task finetune`) adds a frozen→unfrozen schedule, discriminative learning rates, and a pretrained-weight provenance record (`PRETRAINED.md`), with a MedSAM-adaptation + train-only diffusion-augmentation guide. Reproducibility holds by construction; ships a `check_training_hygiene` AST gate (RNG seeding, eval-mode inference, train-split-only loaders, pretrained-provenance) + a network-free build→validate challenge. Integrates with MONAI / nnU-Net / TorchIO / timm / torchvision for production-grade models. |
|
|
485
491
|
| **architecture-zoo** | "Which architecture for which research question" decision tool: maps task (classification / segmentation / detection / transfer), modality, data scale, and class imbalance to a paper-grounded architecture shortlist. Curates the foundational curriculum (ResNet / DenseNet / EfficientNet / ViT / Swin; U-Net / 3-D U-Net / Attention & Residual U-Net / nnU-Net / Mask R-CNN; SAM/MedSAM / TotalSegmentator / BiomedCLIP / DINO / MAE / SimCLR) — each with core idea, when-to-use, medical-imaging use, reference implementation, validation setup, and the matching model-scaffold template. Advisory; teaches archetypes, not a live SOTA leaderboard. |
|
|
486
492
|
| **model-card** | Generate the documentation an engineer-built medical-imaging model must carry — a Model Card (Mitchell et al. 2019), a Datasheet for its dataset (Gebru et al. 2021), and a METRIC-informed data-quality pass — filled from user-supplied facts (never fabricated), then verify every required section is present and non-empty with a deterministic completeness gate (`check_model_card_complete`). Model Card / Datasheet are documentation standards vendored as templates, not counted reporting checklists. |
|
|
487
493
|
| **model-evaluation** | Compute and report task-correct held-out metrics for a trained medical-imaging model — segmentation (Dice + a boundary metric HD95/NSD, per structure), classification (AUROC + AUPRC + sensitivity/specificity with bootstrap CIs at the deployment prevalence), or detection (FROC/mAP with a stated IoU criterion) — plus calibration and subgroup slices. Emits a per-case table for analyze-stats and gates the metric choice against Metrics Reloaded / CLAIM 2024 (`check_metric_reporting`). Numbers come only from executed code. |
|
|
488
494
|
| **explainability** | Produce or audit the interpretability/explainability analysis of a medical-imaging model — Grad-CAM / Grad-CAM++ / attention-rollout / saliency / integrated-gradients — so it clears the rigor bar: mandatory Adebayo sanity checks (model- and data-randomisation), a quantitative localisation metric against ground truth (IoU / pointing game / Dice) instead of eyeballed examples, a cohort-level result, and attribution framing rather than "proof the model is correct". Emits an explainability-report manifest + a deterministic gate (`check_explainability_report`): `SALIENCY_AS_VALIDATION`, `NO_SANITY_CHECK`, `NO_LOCALIZATION_METRIC` (Major); `INSUFFICIENT_SANITY`, `CHERRY_PICKED_EXAMPLES`, `MISSING_METHOD` (Minor). Integrates captum / pytorch-grad-cam; never reimplements them or touches real patient data. |
|
|
495
|
+
| **radiomics-ml** | Produce or audit a radiomics / tabular clinical-ML study — features → random forest / XGBoost / regularised logistic → clinical outcome — the most common solo-doable clinical-ML workflow (no GPU, no engineer). Emits a pipeline manifest + a deterministic rigor gate (`check_radiomics_ml`): `NO_NESTED_CV`, `HIGH_DIM_LOW_EVENTS`, `SELECTION_OUTSIDE_CV` (Major); `NO_FEATURE_STABILITY`, `NO_CALIBRATION`, `NO_EXTERNAL_VALIDATION` (Minor). pyradiomics/IBSI settings, nested CV with in-fold selection, ICC stability, SHAP, calibration + decision curve, CLEAR/TRIPOD+AI/PROBAST-AI reporting. Integrates scikit-learn / xgboost / pyradiomics; never reimplements them. |
|
|
496
|
+
| **uncertainty-imaging** | Design or audit the uncertainty / out-of-distribution / selective-prediction layer of a deployment-framed medical-imaging model — so a clinical-use claim carries calibrated per-case uncertainty (MC-dropout / deep ensemble / conformal / Bayesian), an OOD guard validated on a held-out OOD set, an abstention rule at a pre-specified operating point, and calibration checked under distribution shift. Emits an uncertainty manifest + a deterministic gate (`check_uncertainty_reporting`): `POINT_PREDICTION_NO_UNCERTAINTY`, `CONFORMAL_NO_COVERAGE_VALIDATION`, `OOD_NO_HELDOUT_SET` (Major); `ENSEMBLE_NOT_INDEPENDENT`, `MCDROPOUT_DISABLED_AT_INFERENCE`, `SELECTIVE_NO_TARGET`, `NO_CALIBRATION_UNDER_SHIFT` (Minor). Integrates MAPIE / captum / OOD scorers; never reimplements them or touches real patient data. |
|
|
489
497
|
| **mllm-eval** | Model-agnostic evaluation harness (closed API or open weights) for an LLM/MLLM on a clinical task — radiology report generation, VQA, clinical text extraction — covering the adjudicated reference standard, clinical-efficacy metrics (RadGraph-F1 / CheXbert-F1 beyond BLEU/ROUGE), faithfulness/hallucination, pretraining-contamination, prompt sensitivity, and a reader study; gates the plan with `check_mllm_eval_completeness` and routes the reviewer audit to the MLLM probe. |
|
|
490
498
|
| **intake-project** | Classifies new research projects, summarizes current state, identifies missing inputs, and recommends next steps. |
|
|
491
499
|
| **grant-builder** | Structures grant proposals: significance, innovation, approach, milestones, and consortium roles. |
|
|
@@ -423,8 +423,8 @@
|
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
425
|
"path": "skills/architecture-zoo/SKILL.md",
|
|
426
|
-
"size":
|
|
427
|
-
"sha256": "
|
|
426
|
+
"size": 6094,
|
|
427
|
+
"sha256": "abb4656f36e0ef068508269ce2ec87c832b7c8fb13c4cbc44af27b2dc8058bff"
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
430
|
"path": "skills/architecture-zoo/references/classification.md",
|
|
@@ -441,10 +441,15 @@
|
|
|
441
441
|
"size": 5267,
|
|
442
442
|
"sha256": "495453b025f1cb13d5ba0bac9be6d3b0d63dd958ea48d2b9e55bc222e9c26786"
|
|
443
443
|
},
|
|
444
|
+
{
|
|
445
|
+
"path": "skills/architecture-zoo/references/graph.md",
|
|
446
|
+
"size": 6913,
|
|
447
|
+
"sha256": "d6bea2d61a2f1d515810d1bf96bef80f156d816998134a3c911e6c4585728c2e"
|
|
448
|
+
},
|
|
444
449
|
{
|
|
445
450
|
"path": "skills/architecture-zoo/references/index.md",
|
|
446
|
-
"size":
|
|
447
|
-
"sha256": "
|
|
451
|
+
"size": 4334,
|
|
452
|
+
"sha256": "f812ec9afe2ba06c42da8de851cea08632d61eb98e87cd3edd7cdd17f39e226e"
|
|
448
453
|
},
|
|
449
454
|
{
|
|
450
455
|
"path": "skills/architecture-zoo/references/segmentation.md",
|
|
@@ -458,8 +463,8 @@
|
|
|
458
463
|
},
|
|
459
464
|
{
|
|
460
465
|
"path": "skills/architecture-zoo/skill.yml",
|
|
461
|
-
"size":
|
|
462
|
-
"sha256": "
|
|
466
|
+
"size": 2851,
|
|
467
|
+
"sha256": "c9e03a47973bab737587d22ebac4cd7b27b5c5af55a271efb8f71abba7fa70cf"
|
|
463
468
|
},
|
|
464
469
|
{
|
|
465
470
|
"path": "skills/author-strategy/SKILL.md",
|
|
@@ -2868,23 +2873,33 @@
|
|
|
2868
2873
|
},
|
|
2869
2874
|
{
|
|
2870
2875
|
"path": "skills/model-scaffold/SKILL.md",
|
|
2871
|
-
"size":
|
|
2872
|
-
"sha256": "
|
|
2876
|
+
"size": 9527,
|
|
2877
|
+
"sha256": "8fcf4060f064a1924d4bec278e0c0c628c99caf6ea75f617f8b9748cbb207ed8"
|
|
2878
|
+
},
|
|
2879
|
+
{
|
|
2880
|
+
"path": "skills/model-scaffold/references/finetuning_guide.md",
|
|
2881
|
+
"size": 6208,
|
|
2882
|
+
"sha256": "b7817d53eeeb506b573beaae1889fa863dd81286d474ab99b46b38ad046b32e7"
|
|
2883
|
+
},
|
|
2884
|
+
{
|
|
2885
|
+
"path": "skills/model-scaffold/references/mlops_guide.md",
|
|
2886
|
+
"size": 5171,
|
|
2887
|
+
"sha256": "cc9b62ed588daf97b40b6d7a8e27f9b6de96b9f5752ad2baa8e180e01d3d4973"
|
|
2873
2888
|
},
|
|
2874
2889
|
{
|
|
2875
2890
|
"path": "skills/model-scaffold/references/training_guide.md",
|
|
2876
|
-
"size":
|
|
2877
|
-
"sha256": "
|
|
2891
|
+
"size": 2840,
|
|
2892
|
+
"sha256": "9a7f7b5dda65e71d8007cb6539cda0cfb9c6b1f2c877aedee4646f368686e96f"
|
|
2878
2893
|
},
|
|
2879
2894
|
{
|
|
2880
2895
|
"path": "skills/model-scaffold/scripts/check_training_hygiene.py",
|
|
2881
|
-
"size":
|
|
2882
|
-
"sha256": "
|
|
2896
|
+
"size": 14095,
|
|
2897
|
+
"sha256": "57542a54dac607e89e7f13e5025bd2ce6b32e629064a18cbb0f0c15fdfc6181c"
|
|
2883
2898
|
},
|
|
2884
2899
|
{
|
|
2885
2900
|
"path": "skills/model-scaffold/scripts/scaffold.py",
|
|
2886
|
-
"size":
|
|
2887
|
-
"sha256": "
|
|
2901
|
+
"size": 51482,
|
|
2902
|
+
"sha256": "150abbc4864a92913b202893962c29cda8ec6ce1918f35558aa5b02514b6a0cb"
|
|
2888
2903
|
},
|
|
2889
2904
|
{
|
|
2890
2905
|
"path": "skills/model-scaffold/scripts/scaffold_challenge/expected/split_assignment.csv",
|
|
@@ -2898,18 +2913,18 @@
|
|
|
2898
2913
|
},
|
|
2899
2914
|
{
|
|
2900
2915
|
"path": "skills/model-scaffold/scripts/scaffold_challenge/problem.md",
|
|
2901
|
-
"size":
|
|
2902
|
-
"sha256": "
|
|
2916
|
+
"size": 3226,
|
|
2917
|
+
"sha256": "950af6c956f73b491b2bee102d884765aaeb783b5842eb428ac2ad81b49f67e8"
|
|
2903
2918
|
},
|
|
2904
2919
|
{
|
|
2905
2920
|
"path": "skills/model-scaffold/scripts/scaffold_challenge/verify.sh",
|
|
2906
|
-
"size":
|
|
2907
|
-
"sha256": "
|
|
2921
|
+
"size": 6396,
|
|
2922
|
+
"sha256": "77d81387647abf00de4b03f91a7c7bf9bef38d9679b148762c906eaccfee9f73"
|
|
2908
2923
|
},
|
|
2909
2924
|
{
|
|
2910
2925
|
"path": "skills/model-scaffold/skill.yml",
|
|
2911
|
-
"size":
|
|
2912
|
-
"sha256": "
|
|
2926
|
+
"size": 3772,
|
|
2927
|
+
"sha256": "aaae59edb50c50b01be2aaca3c94b63ce76af067ff25750248517c5ce91ccf41"
|
|
2913
2928
|
},
|
|
2914
2929
|
{
|
|
2915
2930
|
"path": "skills/model-validation/SKILL.md",
|
|
@@ -3411,6 +3426,56 @@
|
|
|
3411
3426
|
"size": 1372,
|
|
3412
3427
|
"sha256": "81caa10775246f2db3f5e08948292f63076d44ffc039d8eec764f1d46aab275f"
|
|
3413
3428
|
},
|
|
3429
|
+
{
|
|
3430
|
+
"path": "skills/radiomics-ml/SKILL.md",
|
|
3431
|
+
"size": 8273,
|
|
3432
|
+
"sha256": "cc65bfd50db2b6e9b6681e1c9649b306490cd5dd74192bfdf5316362b71f141b"
|
|
3433
|
+
},
|
|
3434
|
+
{
|
|
3435
|
+
"path": "skills/radiomics-ml/references/radiomics_ml_guide.md",
|
|
3436
|
+
"size": 6707,
|
|
3437
|
+
"sha256": "29bf2b2b847c488ddb33e50cd21ea0e2cd4937a1a62ab2655f31227a0e42215a"
|
|
3438
|
+
},
|
|
3439
|
+
{
|
|
3440
|
+
"path": "skills/radiomics-ml/scripts/check_radiomics_ml.py",
|
|
3441
|
+
"size": 10179,
|
|
3442
|
+
"sha256": "b1cfbd9991aa8871d5aabc528c9aa22eecf8e46cb5983872bca2359229223840"
|
|
3443
|
+
},
|
|
3444
|
+
{
|
|
3445
|
+
"path": "skills/radiomics-ml/scripts/check_radiomics_ml_challenge/expected/strong.txt",
|
|
3446
|
+
"size": 369,
|
|
3447
|
+
"sha256": "c73c776e6558d9a78dacd3c63ae1cc3dee183d9e1a2f27d99b1e0db70f44997e"
|
|
3448
|
+
},
|
|
3449
|
+
{
|
|
3450
|
+
"path": "skills/radiomics-ml/scripts/check_radiomics_ml_challenge/expected/weak.txt",
|
|
3451
|
+
"size": 1408,
|
|
3452
|
+
"sha256": "3bb90f31587e94f3f2b267874a9ac58cce5adf3436254bc206092e0acfb86cd7"
|
|
3453
|
+
},
|
|
3454
|
+
{
|
|
3455
|
+
"path": "skills/radiomics-ml/scripts/check_radiomics_ml_challenge/fixture/pipeline_strong.json",
|
|
3456
|
+
"size": 322,
|
|
3457
|
+
"sha256": "83d128fe0b728ef52a1fd98ef5b5bd478c3e48455cdb07d8040f9d130df81cee"
|
|
3458
|
+
},
|
|
3459
|
+
{
|
|
3460
|
+
"path": "skills/radiomics-ml/scripts/check_radiomics_ml_challenge/fixture/pipeline_weak.json",
|
|
3461
|
+
"size": 313,
|
|
3462
|
+
"sha256": "2fa1a3f98f952faf2e6e1faf1bdbf4675a44dc88679dcfaf18a4f32eb47ba9e7"
|
|
3463
|
+
},
|
|
3464
|
+
{
|
|
3465
|
+
"path": "skills/radiomics-ml/scripts/check_radiomics_ml_challenge/problem.md",
|
|
3466
|
+
"size": 894,
|
|
3467
|
+
"sha256": "9a6abad4e12f9b4e9290eb305fb9ad04127fa1cde03961a38ac4ccb5431a2100"
|
|
3468
|
+
},
|
|
3469
|
+
{
|
|
3470
|
+
"path": "skills/radiomics-ml/scripts/check_radiomics_ml_challenge/verify.sh",
|
|
3471
|
+
"size": 1988,
|
|
3472
|
+
"sha256": "b9e55aaf9b29f3e810b837fc373c7a212dc5f778a49bac11854bdb50ed84a184"
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
"path": "skills/radiomics-ml/skill.yml",
|
|
3476
|
+
"size": 3790,
|
|
3477
|
+
"sha256": "9b99b87add656873d3f7277ce12490ffea36d919e9538bc4f4fbe1ebbfedc18e"
|
|
3478
|
+
},
|
|
3414
3479
|
{
|
|
3415
3480
|
"path": "skills/render-pdf-doc/SKILL.md",
|
|
3416
3481
|
"size": 7490,
|
|
@@ -3976,6 +4041,56 @@
|
|
|
3976
4041
|
"size": 1911,
|
|
3977
4042
|
"sha256": "7f549269905cad97493d7699dad0068e410e8a8d771814988911bec5b0648d4c"
|
|
3978
4043
|
},
|
|
4044
|
+
{
|
|
4045
|
+
"path": "skills/uncertainty-imaging/SKILL.md",
|
|
4046
|
+
"size": 8224,
|
|
4047
|
+
"sha256": "0ff26311b9b372a074751d9b64c5fc20ec7440aabe76fd17c3f2e09d54d4a080"
|
|
4048
|
+
},
|
|
4049
|
+
{
|
|
4050
|
+
"path": "skills/uncertainty-imaging/references/uncertainty_guide.md",
|
|
4051
|
+
"size": 5574,
|
|
4052
|
+
"sha256": "fb63c7b48b00fc371dca2ed1a7bdb9932b318ceba6334bae5097f4da3b08b38a"
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
"path": "skills/uncertainty-imaging/scripts/check_uncertainty_reporting.py",
|
|
4056
|
+
"size": 13042,
|
|
4057
|
+
"sha256": "2f14f78da71254d82977c8edc9f8c32bcde2e6d6d8e9c971af8114219ce558b5"
|
|
4058
|
+
},
|
|
4059
|
+
{
|
|
4060
|
+
"path": "skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/expected/strong.txt",
|
|
4061
|
+
"size": 414,
|
|
4062
|
+
"sha256": "2d3f1cbeb88b00d1ef8968c276f17d276c152eafbf445d3879315bd727a16c61"
|
|
4063
|
+
},
|
|
4064
|
+
{
|
|
4065
|
+
"path": "skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/expected/weak.txt",
|
|
4066
|
+
"size": 1077,
|
|
4067
|
+
"sha256": "b37379da88b17881678d50534ad993823a9a7c3b96a9942ca45be21caed39aaf"
|
|
4068
|
+
},
|
|
4069
|
+
{
|
|
4070
|
+
"path": "skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/fixture/uncertainty_strong.json",
|
|
4071
|
+
"size": 323,
|
|
4072
|
+
"sha256": "39a64a9e327bf00151d3bb7e1394e7ba87c04ed0df6523256f22d55c127320bf"
|
|
4073
|
+
},
|
|
4074
|
+
{
|
|
4075
|
+
"path": "skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/fixture/uncertainty_weak.json",
|
|
4076
|
+
"size": 204,
|
|
4077
|
+
"sha256": "5748d22600c8f68485f3ab665c32eace4a4dfc827df7f98c1c09640d82f304c2"
|
|
4078
|
+
},
|
|
4079
|
+
{
|
|
4080
|
+
"path": "skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/problem.md",
|
|
4081
|
+
"size": 2460,
|
|
4082
|
+
"sha256": "fb3350f915b3b4a36a91718f93837f4331410d209f66fbd7e7d751fd35af4cc9"
|
|
4083
|
+
},
|
|
4084
|
+
{
|
|
4085
|
+
"path": "skills/uncertainty-imaging/scripts/check_uncertainty_reporting_challenge/verify.sh",
|
|
4086
|
+
"size": 2117,
|
|
4087
|
+
"sha256": "5ff542ed3c4b0a479a6c2f906cefbb75494cb1ca8118e121afaf45f07f31bb80"
|
|
4088
|
+
},
|
|
4089
|
+
{
|
|
4090
|
+
"path": "skills/uncertainty-imaging/skill.yml",
|
|
4091
|
+
"size": 3753,
|
|
4092
|
+
"sha256": "a229c56e3133db1ed616880f76903bbf825ee59591eb26534d4ddb172cf0945c"
|
|
4093
|
+
},
|
|
3979
4094
|
{
|
|
3980
4095
|
"path": "skills/verify-refs/SKILL.md",
|
|
3981
4096
|
"size": 11846,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.0",
|
|
4
4
|
"owned_skills": [
|
|
5
5
|
"academic-aio",
|
|
6
6
|
"add-journal",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"preprocess-imaging",
|
|
44
44
|
"present-paper",
|
|
45
45
|
"publish-skill",
|
|
46
|
+
"radiomics-ml",
|
|
46
47
|
"render-pdf-doc",
|
|
47
48
|
"replicate-study",
|
|
48
49
|
"review-paper",
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"self-review",
|
|
52
53
|
"setup-medsci",
|
|
53
54
|
"sync-submission",
|
|
55
|
+
"uncertainty-imaging",
|
|
54
56
|
"verify-refs",
|
|
55
57
|
"version-dataset",
|
|
56
58
|
"write-paper",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_comment": "AUTO-GENERATED by scripts/gen_skills_catalog_json.py from each skills/<slug>/SKILL.md + skill.yml. Machine-readable skill catalog (single source of truth) consumed by external surfaces such as the aperivue.com storefront to gate skill-list completeness. Do not hand-edit; CI gate: python3 scripts/gen_skills_catalog_json.py --check.",
|
|
3
|
-
"skill_count":
|
|
3
|
+
"skill_count": 55,
|
|
4
4
|
"categories": [
|
|
5
5
|
{
|
|
6
6
|
"key": "literature_references",
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
"model-evaluation",
|
|
39
39
|
"model-scaffold",
|
|
40
40
|
"model-validation",
|
|
41
|
-
"preprocess-imaging"
|
|
41
|
+
"preprocess-imaging",
|
|
42
|
+
"radiomics-ml",
|
|
43
|
+
"uncertainty-imaging"
|
|
42
44
|
]
|
|
43
45
|
},
|
|
44
46
|
{
|
|
@@ -415,7 +417,7 @@
|
|
|
415
417
|
"layer": "B",
|
|
416
418
|
"owner_domain": "model_development",
|
|
417
419
|
"maturity": "official",
|
|
418
|
-
"description": "Generate a reproducible, runnable PyTorch training repo for a medical-imaging task — segmentation, classification, detection, image-to-image synthesis,
|
|
420
|
+
"description": "Generate a reproducible, runnable PyTorch training repo for a medical-imaging task — segmentation, classification, detection, image-to-image synthesis, self-supervised pretraining, or fine-tuning a pr…"
|
|
419
421
|
},
|
|
420
422
|
{
|
|
421
423
|
"slug": "model-validation",
|
|
@@ -480,6 +482,15 @@
|
|
|
480
482
|
"maturity": "official",
|
|
481
483
|
"description": "Convert a personal agent skill into a distributable, open-source-ready skill."
|
|
482
484
|
},
|
|
485
|
+
{
|
|
486
|
+
"slug": "radiomics-ml",
|
|
487
|
+
"category": "model_engineering",
|
|
488
|
+
"category_label": "Model Engineering & Validation",
|
|
489
|
+
"layer": "D",
|
|
490
|
+
"owner_domain": "model_validation",
|
|
491
|
+
"maturity": "official",
|
|
492
|
+
"description": "Produce or audit a radiomics / tabular clinical-ML study — imaging or clinical features → any classical learner (penalised logistic [LASSO / ridge / elastic-net], SVM, k-NN, naive Bayes, LDA/QDA, deci…"
|
|
493
|
+
},
|
|
483
494
|
{
|
|
484
495
|
"slug": "render-pdf-doc",
|
|
485
496
|
"category": "presentation_tooling",
|
|
@@ -552,6 +563,15 @@
|
|
|
552
563
|
"maturity": "official",
|
|
553
564
|
"description": "Audit SSOT-to-submission drift and create journal submission manifests from canonical manuscript artifacts."
|
|
554
565
|
},
|
|
566
|
+
{
|
|
567
|
+
"slug": "uncertainty-imaging",
|
|
568
|
+
"category": "model_engineering",
|
|
569
|
+
"category_label": "Model Engineering & Validation",
|
|
570
|
+
"layer": "D",
|
|
571
|
+
"owner_domain": "model_validation",
|
|
572
|
+
"maturity": "official",
|
|
573
|
+
"description": "Design or audit the uncertainty-quantification, out-of-distribution (OOD) detection, and selective-prediction layer of a medical-imaging model framed for deployment — so a clinical-use claim carries c…"
|
|
574
|
+
},
|
|
555
575
|
{
|
|
556
576
|
"slug": "verify-refs",
|
|
557
577
|
"category": "literature_references",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "medsci-skills",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.0",
|
|
4
4
|
"description": "MedSci Skills — a medical/scientific research skill suite for AI coding agents (Claude Code, Codex, Cursor, Copilot). The npm package is a terminal-friendly installer shortcut; the canonical distribution remains the GitHub repository and the Claude Code plugin marketplace.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://github.com/Aperivue/medsci-skills#readme",
|
|
@@ -7,9 +7,10 @@ description: >
|
|
|
7
7
|
when-to-use, a medical-imaging use, a reference implementation, the typical validation setup, and the
|
|
8
8
|
matching model-scaffold template. Covers the foundational curriculum (ResNet, DenseNet, EfficientNet,
|
|
9
9
|
ViT, Swin; U-Net, 3-D U-Net, Attention/Residual U-Net, nnU-Net, Mask R-CNN; SAM/MedSAM,
|
|
10
|
-
TotalSegmentator, BiomedCLIP, DINO/MAE/SimCLR
|
|
11
|
-
logic, not a live SOTA
|
|
12
|
-
|
|
10
|
+
TotalSegmentator, BiomedCLIP, DINO/MAE/SimCLR; and graph neural nets — GCN/GraphSAGE/GAT/GIN/BrainGNN —
|
|
11
|
+
for brain connectomes). It teaches archetypes and the task-to-architecture logic, not a live SOTA
|
|
12
|
+
leaderboard.
|
|
13
|
+
triggers: architecture zoo, which architecture, choose a model, model selection, ResNet vs ViT, U-Net vs nnU-Net, what backbone, foundation model for, transfer learning choice, MedSAM, TotalSegmentator, DINO, MAE, self-supervised, graph neural network, GNN, brain connectome, GCN, GAT, GraphSAGE, BrainGNN, population graph, paper to architecture, reference implementation, when to use ViT, segmentation architecture, classification backbone
|
|
13
14
|
tools: Read, Write, Edit, Grep, Glob
|
|
14
15
|
model: inherit
|
|
15
16
|
---
|
|
@@ -62,6 +63,8 @@ a family card.
|
|
|
62
63
|
VAE / fastMRI reconstruction.
|
|
63
64
|
- `${CLAUDE_SKILL_DIR}/references/foundation_models.md` — SAM / MedSAM / MedSAM2 / TotalSegmentator /
|
|
64
65
|
SegVol / BiomedCLIP / DINO / MAE / SimCLR / MoCo.
|
|
66
|
+
- `${CLAUDE_SKILL_DIR}/references/graph.md` — GCN / GraphSAGE / GAT / GIN / BrainGNN for brain
|
|
67
|
+
connectomes & population graphs (integrate PyTorch Geometric / DGL; not scaffolded by model-scaffold).
|
|
65
68
|
Each card gives the paper, core idea, when-to-use, medical-imaging use, reference implementation, and the
|
|
66
69
|
**typical validation/experiment setup** for that architecture class.
|
|
67
70
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Graph neural networks — brain connectomes & population graphs (architecture-zoo)
|
|
2
|
+
|
|
3
|
+
For when the data is a **graph, not an image grid**: a brain **connectome** (nodes = ROIs /
|
|
4
|
+
parcels, edges = structural connectivity from DTI tractography or functional connectivity
|
|
5
|
+
from fMRI correlation), or a **population graph** (nodes = subjects, edges = phenotypic /
|
|
6
|
+
imaging similarity). The task is usually **graph-level classification** (diagnose a subject
|
|
7
|
+
from their connectome), **node-level** (flag abnormal ROIs, or classify subjects on a
|
|
8
|
+
population graph), or **link prediction** (connectivity changes).
|
|
9
|
+
|
|
10
|
+
This is a distinct family because a CNN/U-Net assumes a regular pixel grid; a connectome has
|
|
11
|
+
no grid — permuting the ROI order must not change the prediction, which is exactly the
|
|
12
|
+
symmetry a GNN respects. Each card: **paper → core idea → when to use → medical use →
|
|
13
|
+
reference impl → validation/experiment setup.**
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## The general-purpose message-passing GNNs
|
|
18
|
+
|
|
19
|
+
### GCN (graph convolutional network)
|
|
20
|
+
- **Paper**: Kipf & Welling, "Semi-Supervised Classification with Graph Convolutional
|
|
21
|
+
Networks", *ICLR* 2017.
|
|
22
|
+
- **Core idea**: each layer averages a node's features with its neighbours' (a first-order
|
|
23
|
+
spectral-graph approximation), stacking to widen the receptive field over the graph.
|
|
24
|
+
- **When to use**: the transparent baseline for any connectome / population-graph task — try
|
|
25
|
+
it before anything fancier.
|
|
26
|
+
- **Medical use**: connectome classification; **Parisot et al.** (*Medical Image Analysis*
|
|
27
|
+
2018) put subjects on a **population graph** (phenotypic-similarity edges) for autism
|
|
28
|
+
(ABIDE) and Alzheimer's (ADNI) prediction — a semi-supervised node-classification framing.
|
|
29
|
+
- **Reference impl**: **PyTorch Geometric** (`GCNConv`) or **DGL**; do not reimplement.
|
|
30
|
+
- **Validation setup**: split at the **subject level** (a subject's graph — or, on a
|
|
31
|
+
population graph, a subject node's label — never spans train/test); with a small cohort,
|
|
32
|
+
report a **permutation test** and cross-validated CIs, not a single split.
|
|
33
|
+
|
|
34
|
+
### GraphSAGE (inductive aggregation)
|
|
35
|
+
- **Paper**: Hamilton, Ying & Leskovec, "Inductive Representation Learning on Large Graphs",
|
|
36
|
+
*NeurIPS* 2017.
|
|
37
|
+
- **Core idea**: learn an **aggregator** over a sampled neighbourhood so the model generalises
|
|
38
|
+
to **unseen** nodes/graphs (inductive), unlike transductive GCN.
|
|
39
|
+
- **When to use**: a **new subject** must be classified without retraining (the realistic
|
|
40
|
+
clinical setting), or the graph is too large to process whole.
|
|
41
|
+
- **Medical use**: inductive connectome classification where test subjects are genuinely held
|
|
42
|
+
out (the honest deployment framing for a population-graph model).
|
|
43
|
+
- **Reference impl**: PyTorch Geometric (`SAGEConv`) / DGL.
|
|
44
|
+
- **Validation setup**: exploit the inductive setup to keep the test subjects fully out of
|
|
45
|
+
message passing during training (transductive leakage is a real trap on population graphs).
|
|
46
|
+
|
|
47
|
+
### GAT (graph attention)
|
|
48
|
+
- **Paper**: Veličković et al., "Graph Attention Networks", *ICLR* 2018.
|
|
49
|
+
- **Core idea**: learn **attention weights** over neighbours, so the model decides which
|
|
50
|
+
connections matter instead of averaging uniformly.
|
|
51
|
+
- **When to use**: when *which edges/connections drive the prediction* is itself a finding
|
|
52
|
+
(edge importance is a built-in interpretability signal).
|
|
53
|
+
- **Medical use**: connectome studies that report the most-attended edges/ROIs as candidate
|
|
54
|
+
biomarkers.
|
|
55
|
+
- **Reference impl**: PyTorch Geometric (`GATConv` / `GATv2Conv`) / DGL.
|
|
56
|
+
- **Validation setup**: treat attention as a **hypothesis-generating** attribution, not proof
|
|
57
|
+
— sanity-check it (does it survive label permutation?) as `/explainability` requires of any
|
|
58
|
+
saliency.
|
|
59
|
+
|
|
60
|
+
### GIN (graph isomorphism network)
|
|
61
|
+
- **Paper**: Xu et al., "How Powerful are Graph Neural Networks?", *ICLR* 2019.
|
|
62
|
+
- **Core idea**: an aggregation as discriminative as the Weisfeiler-Lehman test — the most
|
|
63
|
+
**expressive** simple GNN for **graph-level** classification.
|
|
64
|
+
- **When to use**: graph-level diagnosis where subtle topology differences separate classes
|
|
65
|
+
and GCN/GAT underfit.
|
|
66
|
+
- **Reference impl**: PyTorch Geometric (`GINConv`).
|
|
67
|
+
- **Validation setup**: expressiveness raises overfitting risk on small connectome cohorts —
|
|
68
|
+
pair with heavy regularisation and nested CV (as `/radiomics-ml` does for the p ≫ n regime).
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## The brain-specific model
|
|
73
|
+
|
|
74
|
+
### BrainGNN (ROI-aware, interpretable)
|
|
75
|
+
- **Paper**: Li et al., "BrainGNN: Interpretable Brain Graph Neural Network for fMRI Analysis",
|
|
76
|
+
*Medical Image Analysis* 2021.
|
|
77
|
+
- **Core idea**: ROI-aware convolution + a pooling layer that scores and selects the most
|
|
78
|
+
informative ROIs, so the model is **interpretable at the region level** by construction.
|
|
79
|
+
- **When to use**: fMRI connectome classification where you must report **which ROIs** drove
|
|
80
|
+
the decision (the usual neuroimaging reviewer demand).
|
|
81
|
+
- **Medical use**: task-fMRI / resting-state connectome diagnosis (ASD, disorders) with a
|
|
82
|
+
salient-ROI readout.
|
|
83
|
+
- **Reference impl**: the authors' released BrainGNN repo (on PyTorch Geometric).
|
|
84
|
+
- **Validation setup**: report salient ROIs with **stability across folds** (not one split);
|
|
85
|
+
keep site-harmonisation (**ComBat**) fit on the **training** fold only.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Connectome-specific validation traps (read before publishing)
|
|
90
|
+
- **Subject-level split.** A subject's connectome must not appear in more than one split; on a
|
|
91
|
+
population graph, hold test-subject **labels** out of training and (ideally, inductive)
|
|
92
|
+
their **nodes** out of message passing. This is `/model-validation`'s split-leakage discipline
|
|
93
|
+
at the subject level.
|
|
94
|
+
- **Site / scanner harmonisation leakage.** Multi-site connectome data (ABIDE, ADNI) is
|
|
95
|
+
harmonised with **ComBat** — fit it on the **training** fold only, never the whole cohort
|
|
96
|
+
(the graph analogue of `/preprocess-imaging`'s `NORMALIZATION_LEAKAGE`).
|
|
97
|
+
- **p ≫ n.** A connectome has thousands of edges on tens–hundreds of subjects; treat it like
|
|
98
|
+
radiomics — nested CV, regularisation, a **permutation test** for tiny cohorts, and don't
|
|
99
|
+
over-read a single fold (`/radiomics-ml`).
|
|
100
|
+
- **Interpretability ≠ proof.** Attention / ROI-saliency is hypothesis-generating; sanity-check
|
|
101
|
+
it (`/explainability`).
|
|
102
|
+
|
|
103
|
+
## Boundary — this family is not scaffolded by `/model-scaffold`
|
|
104
|
+
`/model-scaffold` builds **image-grid** repos (CNN / U-Net / transformer); it has **no graph
|
|
105
|
+
task template**. For GNNs, **integrate PyTorch Geometric / DGL directly** — they own the graph
|
|
106
|
+
layers, loaders, and training loop; the lane does not reimplement them. The lane's
|
|
107
|
+
**subject-level** gates still apply: `/model-validation` (split leakage), `/radiomics-ml`
|
|
108
|
+
(nested-CV rigor for p ≫ n), `/explainability` (attribution sanity), `/uncertainty-imaging`
|
|
109
|
+
(deployment uncertainty), and `/check-reporting` (TRIPOD+AI). Record the choice + paper in the
|
|
110
|
+
decision note; validate the built model with `/model-validation`.
|
|
@@ -14,12 +14,16 @@ per-paper detail and the `/model-scaffold` template to instantiate.
|
|
|
14
14
|
| "I have few labels / want to pretrain on unlabelled scans" | **self-supervised pretraining → fine-tune** | `foundation_models.md` |
|
|
15
15
|
| "adapt a released medical foundation model" | **transfer / prompt a foundation model** | `foundation_models.md` |
|
|
16
16
|
| "synthesise / translate a modality" (MRI→CT, denoise) | **image-to-image / generative** | `synthesis.md` |
|
|
17
|
+
| "classify from a brain connectome / graph" (ROI connectivity, DTI/fMRI) | **graph neural network** | `graph.md` |
|
|
17
18
|
| "generate a report / answer a visual question" | **multimodal LLM** | *(use `/mllm-eval`; not a CNN choice)* |
|
|
18
19
|
|
|
19
20
|
## Step 2 — let the constraints narrow it
|
|
20
21
|
- **Modality / dimensionality**: 2-D (CXR, fundus, path tiles, single CT/MR slices) →
|
|
21
22
|
2-D backbones / 2-D U-Net. 3-D volumes (CT, MR) → **3-D U-Net / SegResNet / nnU-Net**
|
|
22
|
-
(3-D context matters; do not collapse to slices if the structure is volumetric).
|
|
23
|
+
(3-D context matters; do not collapse to slices if the structure is volumetric). A
|
|
24
|
+
**graph** (brain connectome, ROI-connectivity matrix — no pixel grid) → a **GNN**
|
|
25
|
+
(`graph.md`); integrate PyTorch Geometric / DGL directly (`/model-scaffold` has no graph
|
|
26
|
+
template).
|
|
23
27
|
- **Labelled data scale** (events/structures, not just images):
|
|
24
28
|
- **small** (hundreds) → a **pretrained** backbone fine-tuned (ImageNet / a medical
|
|
25
29
|
foundation model), strong augmentation, heavy regularisation; prefer **nnU-Net**
|
|
@@ -29,7 +29,7 @@ safety_boundaries:
|
|
|
29
29
|
- "Advisory only: it writes a decision note, never code or weights; the build is /model-scaffold."
|
|
30
30
|
- "Every recommendation names its source paper; benchmark numbers are cited, never invented; the zoo describes archetypes, not a live leaderboard."
|
|
31
31
|
known_limitations:
|
|
32
|
-
- "The literature moves fast; this is a curated archetype map (classification, segmentation, detection, synthesis, foundation/SSL families), not an exhaustive or current SOTA ranking."
|
|
32
|
+
- "The literature moves fast; this is a curated archetype map (classification, segmentation, detection, synthesis, foundation/SSL, and graph/GNN families), not an exhaustive or current SOTA ranking."
|
|
33
33
|
- "A sound architecture choice is necessary, not sufficient; validity still depends on the split, validation design, and metrics (/model-validation, /model-evaluation)."
|
|
34
34
|
validation_commands:
|
|
35
35
|
- "carry the decision note into /model-scaffold to instantiate the chosen template, then /model-validation"
|