Add experimental controls for degenerate TransnnMIL fusion#41
Conversation
matthewvaishnav
left a comment
There was a problem hiding this comment.
CI review: the dedicated TransnnMIL fusion CI workflow passed, as did Quick Check, security, repository audit, root-layout, and paper-build checks. The repository-wide CI workflow is currently blocked only by the Black formatting step in Lint and Format Check; flake8 and mypy passed before the matrix was cancelled/skipped downstream. This is a mechanical formatting blocker, not evidence against the fusion tests or defect diagnosis. The draft should remain unmerged until the affected Python files are formatted and the full CI workflow is green.
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Established defect
The historical
TransnnMILfinal fusion passes one TransMIL query token and one nnMIL key/value token through multi-head attention. With exactly one key, the attention softmax is one and the fused representation is invariant to the TransMIL query. Historical code and checkpoints remain untouched for reproducibility.Experimental artifacts
This pull request adds three neutrally named controls:
transnnmil_concat_experimental— concatenation plus projection;transnnmil_gate_experimental— sample-specific normalized gate;transnnmil_branch_attention_experimental— explicit branch-type embeddings, two-token self-attention, and separately named learned pooling weights.No variant is described as corrected or improved before controlled training.
Hostile-review fixes completed
nn.MultiheadAttention;Current decision boundary
The defect diagnosis is established by code and mathematics. Architectural improvement is not established.
CI is passing, but this pull request should remain unmerged until the two open scientific/software-validity blockers are resolved:
Publication claims require repeated-seed PANDA comparisons against standalone nnMIL, standalone TransMIL, historical TransnnMIL, concat, gate, and branch-attention variants under an identical locked protocol. Results from the public PANDA development cohort must be labeled internal-development evidence rather than blinded external validation.