Masking primitives for self-supervised objectives #
This file gives a small finite-index vocabulary for masked prediction objectives. It is deliberately
independent of any particular image or transformer implementation: a patch/token collection is just
Fin n → α, and a mask is a Boolean predicate on Fin n.
The goal is to make MAE/JEPA-style objectives precise enough to prove local invariants before we connect them to larger executable models.
A finite mask over n patches/tokens. true means the index is selected.
Instances For
The all-visible/all-target mask.
Instances For
Complement a mask.
Instances For
Generic masked loss over an explicit list of selected indices.
For theory files we keep the scalar loss as Nat; concrete runtime losses can instantiate this
with squared-error bins, quantized patch losses, or any other executable per-patch score.