Repository navigation
Description
KEEP preprocessing still has unresolved implementation details: the paper describes the overall method, but the paper and inspected released code do not specify enough to settle the choices below. These choices change rolled-up histories, vocabulary membership and co-occurrence counts. We need further study of the preprocessing code and artifacts, and clarification from the authors, to resolve them and assess reproduction fidelity.
This issue tracks that work following #1706.
What the sources establish
Appendices A.1.1 and A.4 of the KEEP paper describe Condition concepts within minimum root distance five, all-parent roll-up, complete patient histories and a two-occurrence presence threshold.
At released-code revision 89cb482, the Node2Vec script loads a prebuilt hierarchy, and the GloVe script loads a prebuilt co-occurrence matrix and vocabulary. The cohort-history script starts from an already rolled-up CSV. These scripts leave the upstream construction steps unresolved.
Implementation details to resolve
| Gap | Why further evidence is needed |
|---|---|
| Occurrence identity and threshold order | The paper specifies two occurrences but does not define how duplicate source rows, one-to-many mappings and converging ancestor paths contribute to that threshold. #1706 counts distinct diagnosis events after mapping and roll-up, with each event supporting a target at most once. We need the authors' counting procedure to verify that interpretation. |
| Roll-up boundaries | All-parent expansion is described, but the exact handling of already-retained concepts, Disease as a target and sources without a retained target remains unclear. The clinical examples use all_retained and exclude Disease from targets. We need explicit rules or intermediate outputs to verify these choices. |
| Hierarchy construction | The released training script consumes a graph artifact. The inspected scripts do not show how its edges were selected or how direct “Is a” relationships, CONCEPT_ANCESTOR separations and missing direct parents were reconciled. We need the graph producer or artifact comparison to resolve reconstruction differences. |
| Matrix and vocabulary construction | The trainer consumes prebuilt counts and vocabulary dictionaries. That leaves the producer's diagonal convention, vocabulary filters and inclusion of unobserved or graph-only concepts unresolved. These details determine which counts and coordinates should match. |
| Conflicting and malformed records | The sources do not define duplicate-conflict checks or malformed-record handling. #1706 includes deduplication, conflict errors and unmapped diagnostics. We need to study how these choices affect retained histories and document the supported behavior. |
Repeated diagnosis IDs and metadata aggregation
The MIMIC history task keys diagnoses by occurrence identity within each patient: MIMIC-III uses row_id; MIMIC-IV uses (hadm_id, seq_num, icd_code, icd_version). Exact copies collapse to one record. Different records with the same ID raise a conflict error because the current comparator checks the whole dictionary, including annotations added to supplied histories. It does not silently overwrite one conflicting record with another.
This leaves a follow-up: how should multiple records for one diagnosis preserve their source information while still representing one occurrence for counting? The investigation should distinguish incidental annotations and representation differences from contradictory clinical fields, and decide whether to retain a group of source records or aggregate selected fields. Different diagnosis IDs carrying the same code must remain distinct occurrences.
Appendix A.4 specifies patient-history counting and a two-occurrence threshold, but gives no procedure for reconciling metadata attached to repeated diagnosis IDs. Section 7.2 identifies visit-level temporal modeling as future work. Metadata preservation matters for that broader modeling use; its effect on KEEP counts needs measurement, particularly because current conflicts stop counting.
- Define meaningful duplicate equivalence and metadata preservation separately from occurrence counting.
- Study representative repeated-ID records, preserving source information, and measure changes to histories, threshold crossings and counts in keep-validation.
Follow-up
- Locate the preprocessing producers, intermediate artifacts or author clarification for each gap.
- Record the source evidence alongside the current implementation choice and the remaining question.
- Compare shared-input histories, roll-up targets, vocabulary axes and raw counts against reference outputs; use small hand-derived fixtures to explain differences.
- Measure sensitivity where the method remains ambiguous, and document what the experiments resolve and what still requires author clarification.
- Open focused implementation follow-ups and update the reproduction documentation as each question is resolved.
Local graph tests support investigation of the processor. Shared CI configuration can be handled separately; the KEEP follow-up here is resolving the missing methodological details.
Activity
[-]Track KEEP preprocessing evidence gaps and provisional assumptions[/-][+]Resolve missing KEEP preprocessing details for faithful reproduction[/+]