Sign inGet started
Paper · arXiv

Masked Attention Pooling Is Invariant to Padding and Permutation: A Formal Proof in Lean

Attention-based multiple instance learning (MIL) pools a variable-size bag of instance embeddings into one vector. In batched training, bags are padded to a common length, and the pooled output is expected not to depend on how much padding was added or on the order in which instances are stored. This expectation holds only if padded rows are removed from both the numerator and the softmax normalizer. Common implementation idioms meet it only under side conditions. Zeroing padded features alone does not work. Masking logits with $-\infty$ fails on empty bags and on nonfinite padding. Masking with a large negative constant is exact only after floating-point underflow. We define masked atten...

AuthorsYusuf Khaled Sadek, Enes Yilmaz
Primary categorycs.LG
Published12 October 2026
Last updated at source12 October 2026
cs.LG
Embed this entry
<iframe src="https://silytics.si/embed/item/86da4c2f-84be-47b4-b508-f6dd4ae96a21" width="420" height="190" style="border:0" loading="lazy" title="Silytics entry"></iframe>

Free, no tracking. More about feeds and embeds.

Silytics shows public metadata from arXiv and links to the original. Information may be incomplete or out of date. Last refreshed 15 October 2026. Licenses and terms of the original apply to the work itself. Not financial, legal or professional advice.