Skip to content

Fix MICRON handling of unequal code lists - #1234

Open
fbonc wants to merge 2 commits into
sunlabuiuc:masterfrom
fbonc:fix-micron-padding-concat
Open

Fix MICRON handling of unequal code lists#1234
fbonc wants to merge 2 commits into
sunlabuiuc:masterfrom
fbonc:fix-micron-padding-concat

Conversation

@fbonc

@fbonc fbonc commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Issue
MICRON treats individual codes as visits. Unequal diagnosis and procedure counts can crash concatenation, while padding alone can cause predictions to ignore the shorter list.

Fix
Pool flat code lists into one visit, preserve nested visit histories, and return zero reconstruction loss for single-visit inputs.

Notes
Regression tests verify that both features receive prediction gradients and nested inputs retain their visits.

fbonc added 2 commits August 26, 2026 23:02
_pool_embedding padded a length-1 temporal dim up to exactly 2, then
features were concatenated along the embedding dim (requiring equal
temporal lengths), so any real sequence length != 2 crashed. Pad each
feature to the longest feature sequence (>= 2 for the residual step)
before concatenating, and combine per-feature masks with OR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant