Papers
Topics
Authors
Recent
Search
2000 character limit reached

Plain Mask Transformer (PMT)

Updated 4 July 2026
  • Plain Mask Transformer (PMT) is a segmentation architecture that combines a frozen Vision Transformer encoder with a lightweight Transformer decoder to support both image and video segmentation tasks.
  • It relocates task-specific query processing into the decoder, enabling multi-task encoder sharing without sacrificing inference speed or accuracy.
  • Empirical results show PMT achieves competitive segmentation quality while running up to 3× faster on images and 8× faster on video compared to finetuned models.

Plain Mask Transformer (PMT) is a segmentation architecture designed to preserve the simplicity and low latency of encoder-only designs while keeping a Vision Foundation Model (VFM) encoder frozen and shareable across tasks. Introduced in "PMT: Plain Mask Transformer for Image and Video Segmentation with Frozen Vision Encoders" (Cavagnero et al., 26 Mar 2026), PMT targets both image and video segmentation by placing a lightweight Transformer decoder, the Plain Mask Decoder (PMD), on top of frozen Vision Transformer (ViT) features. The model is positioned against recent VFM-based encoder-only methods such as EoMT and VidEoMT, which inject learnable queries into the ViT’s self-attention and finetune the entire encoder; PMT relocates task-specific query processing into the decoder and thereby restores multi-task encoder sharing (Cavagnero et al., 26 Mar 2026).

1. Conceptual Positioning

PMT is motivated by the deployment setting in which modern large-scale VFMs such as DINOv3 produce patch-token representations rich enough to support multiple downstream tasks from a single frozen backbone. In that setting, encoder finetuning undermines one of the principal practical advantages of VFMs: a shared encoder representation that can be reused across panoptic, instance, semantic, and video segmentation tasks without task-specific backbone updates (Cavagnero et al., 26 Mar 2026).

Within this framing, PMT can be understood as a reconciliation of two previously competing properties. On one side are encoder-only segmentation systems such as EoMT and VidEoMT, which offer architectural simplicity and speed but require encoder finetuning. On the other side are frozen-encoder systems that preserve backbone shareability but often incur additional complexity or latency. PMT addresses this trade-off by introducing the PMD, a fast Transformer-based segmentation decoder that operates on frozen VFM features while maintaining the generality of the encoder-only framework (Cavagnero et al., 26 Mar 2026).

A common misconception is that retaining a frozen encoder necessarily entails a decisive accuracy penalty relative to finetuned alternatives. The PMT results do not support such a blanket conclusion: on standard image segmentation benchmarks, PMT matches the frozen-encoder state of the art while running up to ∼3×\sim 3\times faster, and on video segmentation it performs on par with fully finetuned methods while being up to 8×8\times faster than state-of-the-art frozen-encoder models (Cavagnero et al., 26 Mar 2026). This suggests that, given sufficiently strong frozen features, a substantial portion of task adaptation can be moved into a lightweight decoder without forfeiting the latency profile associated with encoder-only formulations.

2. Architectural Composition

PMT consists of two principal components: a frozen ViT encoder pre-trained at scale, and the PMD, a small stack of Transformer layers that jointly processes a fixed set of learnable object queries and multi-depth encoder features (Cavagnero et al., 26 Mar 2026).

The processing pipeline is specified as follows. An input image I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W} is passed through a frozen ViT encoder with LL layers. Patch tokens Xl∈RD×NX^l \in \mathbb{R}^{D \times N} are extracted at several depths ljl_j, including the final layer LL. For each selected depth, PMT applies final LayerNorm, then a trainable BatchNorm and a two-layer MLP; the resulting feature maps are summed across depths to obtain multi-scale patch tokens Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}. A fixed set of KK learnable queries Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K is then concatenated with the patch tokens to form a sequence of length 8×8\times0, which is processed by 8×8\times1 Transformer layers in the PMD, typically with 8×8\times2 (Cavagnero et al., 26 Mar 2026).

The decoder produces refined queries 8×8\times3 and refined patch tokens 8×8\times4. Prediction is split into a classification branch and a mask branch. Class logits are defined by

8×8\times5

while mask logits are obtained via a dot-product between a small MLP applied to 8×8\times6 and the upsampled patch tokens 8×8\times7:

8×8\times8

In the full formulation, 8×8\times9 is I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}0 reshaped and bilinearly upsampled, and the dot-product is taken between the per-query MLP output of dimension I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}1 and each spatial feature vector in I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}2 (Cavagnero et al., 26 Mar 2026).

The design is notable for preserving a plain sequence-processing interface: queries and patches are handled jointly, and the same decoder principle is stated to apply seamlessly to both image and video segmentation. A plausible implication is that PMT inherits some of the implementation regularity of encoder-only systems while relocating all task-specific adaptation into an independently trainable module.

3. Plain Mask Decoder Mechanics

The PMD mirrors the architecture of the last I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}3 layers of EoMT’s finetuned encoder but operates on top of frozen features and is trained from scratch (Cavagnero et al., 26 Mar 2026). Each decoder block I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}4 implements the residual-preconditioned Transformer updates

I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}5

I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}6

Here, I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}7 denotes LayerNorm and I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}8 denotes multi-head self-attention.

For an input sequence I∈R3×H×WI \in \mathbb{R}^{3 \times H \times W}9 at layer LL0, the decoder computes

LL1

followed by scaled dot-product attention,

LL2

All tokens—queries and patches—attend to each other. The paper explicitly identifies this as realizing query self-attention and cross-attention with patches in one operation (Cavagnero et al., 26 Mar 2026). Rotary position embeddings (RoPE) are applied on patch tokens, while queries receive no positional encoding.

A distinctive training-time mechanism is masked attention. At each layer LL3, an intermediate mask LL4 is predicted per query, and the attention weights from query positions to patch positions are masked so that attention focuses only on regions where LL5. This masking is gradually phased out by a mask-annealing schedule, such that inference uses standard unmasked MHSA, which is stated to be compatible with FlashAttention (Cavagnero et al., 26 Mar 2026). This arrangement couples localized training guidance with inference-time efficiency.

The ablation evidence underscores the functional importance of the decoder itself. On COCO panoptic segmentation, stepwise removal from ViT-Adapter+Mask2Former shows that removing the Transformer decoder in an EoMT-style frozen setting causes PQ to collapse to LL6 at LL7 FPS, whereas building up from frozen EoMT with a Plain PMD yields PQ LL8 at LL9 FPS; adding lateral connections yields PQ Xl∈RD×NX^l \in \mathbb{R}^{D \times N}0 at Xl∈RD×NX^l \in \mathbb{R}^{D \times N}1 FPS; adding RoPE yields PQ Xl∈RD×NX^l \in \mathbb{R}^{D \times N}2 at Xl∈RD×NX^l \in \mathbb{R}^{D \times N}3 FPS (Cavagnero et al., 26 Mar 2026). These measurements indicate that PMD is not a marginal accessory but the core mechanism enabling segmentation quality with frozen features.

4. Training and Inference Regimen

The encoder remains frozen throughout training; only PMD parameters are updated, including Transformer layers, MLPs in the prediction heads, lateral adapters, and BatchNorms (Cavagnero et al., 26 Mar 2026). This training boundary is central to PMT’s intended role as a shareable-head architecture on top of a common VFM.

The supervision setup comprises cross-entropy for classification between predicted Xl∈RD×NX^l \in \mathbb{R}^{D \times N}4 and ground-truth class, together with binary cross-entropy plus Dice loss for mask prediction between Xl∈RD×NX^l \in \mathbb{R}^{D \times N}5 and the ground-truth mask (Cavagnero et al., 26 Mar 2026). Optimization uses AdamW. For image models, the reported configuration is batch size Xl∈RD×NX^l \in \mathbb{R}^{D \times N}6, learning rate Xl∈RD×NX^l \in \mathbb{R}^{D \times N}7, cosine annealing, Xl∈RD×NX^l \in \mathbb{R}^{D \times N}8 epochs on COCO, Xl∈RD×NX^l \in \mathbb{R}^{D \times N}9 epochs on ADE20K, and a ljl_j0-step linear warmup. For video models, the configuration is batch size ljl_j1 with a ljl_j2-frame window, learning rate ljl_j3, polynomial decay with power ljl_j4, a training schedule following CAVIS, and a ljl_j5-step warmup. Data augmentations follow EoMT/VidEoMT protocols, including random flip and scale jitter (Cavagnero et al., 26 Mar 2026).

Inference speed is measured on NVIDIA H100 with FlashAttention-2 and torch.compile, using batch size ljl_j6 and mixed precision (Cavagnero et al., 26 Mar 2026). For images, PMT-L with ViT-L runs at ljl_j7 FPS versus ViT-Adapter+Mask2Former at ljl_j8 FPS, corresponding to approximately ljl_j9 higher throughput. For video, PMT-L runs at LL0–LL1 FPS versus frozen-encoder baselines at LL2–LL3 FPS, yielding up to approximately LL4 higher throughput (Cavagnero et al., 26 Mar 2026).

These choices clarify that PMT’s efficiency claims are not limited to algorithmic FLOP reductions. They are tied to an inference path that avoids training-time masking, uses standard unmasked MHSA at test time, and is explicitly aligned with high-performance attention kernels.

5. Empirical Results on Image Segmentation

On COCO val2017, PMT is compared against ViT-Adapter + Mask2Former in the frozen-encoder regime. At resolution LL5, ViT-Adapter + Mask2Former with DINOv3 and a frozen pyramid uses LL6M parameters, LL7 GFLOPs, runs at LL8 FPS, and attains PQ LL9 and AP Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}0. PMT with DINOv3 and a frozen pyramid uses Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}1M parameters, Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}2 GFLOPs, runs at Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}3 FPS, and attains PQ Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}4 and AP Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}5 (Cavagnero et al., 26 Mar 2026). At Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}6, ViT-Adapter + M2F reaches PQ Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}7 at Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}8 FPS, while PMT reaches PQ Xfrozen∈RD×NX^{\text{frozen}} \in \mathbb{R}^{D \times N}9 at KK0 FPS, i.e., approximately KK1 faster (Cavagnero et al., 26 Mar 2026).

On ADE20K val, ViT-Adapter + M2F with DINOv3 uses KK2M parameters and KK3 GFLOPs, runs at KK4 FPS, and obtains mIoU KK5. PMT uses KK6M parameters and KK7 GFLOPs, runs at KK8 FPS, and obtains mIoU KK9 (Cavagnero et al., 26 Mar 2026). The paper summarizes this as PMT being more than Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K0 faster with less than Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K1 mIoU drop.

Benchmark Baseline result PMT result
COCO val2017 @ Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K2 PQ Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K3, AP Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K4, Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K5 FPS PQ Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K6, AP Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K7, Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K8 FPS
COCO val2017 @ Qlrn={qilrn∈RD}i=1KQ^{\text{lrn}} = \{q_i^{\text{lrn}} \in \mathbb{R}^D\}_{i=1}^K9 PQ 8×8\times00, 8×8\times01 FPS PQ 8×8\times02, 8×8\times03 FPS
ADE20K val mIoU 8×8\times04, 8×8\times05 FPS mIoU 8×8\times06, 8×8\times07 FPS

The image results characterize PMT as a frozen-encoder model that remains very close to the strongest reported frozen-encoder baselines in quality while materially shifting the speed-accuracy operating point (Cavagnero et al., 26 Mar 2026). A plausible implication is that, for applications constrained by throughput or latency rather than by the last fraction of a point in PQ or mIoU, PMT changes the practical baseline for frozen-VFM segmentation.

6. Empirical Results on Video Segmentation

On YouTube-VIS 2019/2021 at 8×8\times08, CAVIS with DINOv3 and a frozen encoder uses 8×8\times09 GFLOPs, runs at 8×8\times10 FPS, and attains AP19 8×8\times11, AP8×8\times12 8×8\times13, and AR8×8\times14 8×8\times15. PMT with DINOv3 and a frozen encoder uses 8×8\times16 GFLOPs, runs at 8×8\times17 FPS, and attains AP19 8×8\times18, AP8×8\times19 8×8\times20, and AR8×8\times21 8×8\times22 (Cavagnero et al., 26 Mar 2026). The reported summary is that PMT is approximately 8×8\times23 faster while slightly improving AP.

On VIPSeg val, CAVIS with DINOv3 and a frozen encoder uses 8×8\times24 GFLOPs, runs at 8×8\times25 FPS, and reaches VPQ 8×8\times26 and STQ 8×8\times27. PMT uses 8×8\times28 GFLOPs, runs at 8×8\times29 FPS, and reaches VPQ 8×8\times30 and STQ 8×8\times31 (Cavagnero et al., 26 Mar 2026). The reported interpretation is that PMT runs approximately 8×8\times32 faster at a small VPQ/STQ gap of 8×8\times33.

On VSPW val, VidEoMT with DINOv2 and a finetuned encoder uses 8×8\times34 GFLOPs, runs at 8×8\times35 FPS, and obtains mVC 8×8\times36 and mIoU 8×8\times37. PMT with DINOv3 and a frozen encoder uses 8×8\times38 GFLOPs, runs at 8×8\times39 FPS, and obtains mVC 8×8\times40 and mIoU 8×8\times41 (Cavagnero et al., 26 Mar 2026). The paper states that PMT sets a new state-of-the-art mIoU of 8×8\times42 with a frozen encoder.

Task Comparator PMT
YouTube-VIS 2019/2021 AP19 8×8\times43, 8×8\times44 FPS AP19 8×8\times45, 8×8\times46 FPS
VIPSeg val VPQ 8×8\times47, STQ 8×8\times48, 8×8\times49 FPS VPQ 8×8\times50, STQ 8×8\times51, 8×8\times52 FPS
VSPW val mIoU 8×8\times53, 8×8\times54 FPS mIoU 8×8\times55, 8×8\times56 FPS

These video results are particularly relevant to the frequent assumption that frozen-encoder systems are structurally disadvantaged on temporally demanding tasks. PMT does not uniformly dominate every metric-speed pair—for example, VIPSeg shows a small VPQ/STQ gap—but it consistently demonstrates that a frozen encoder can remain competitive across video instance, panoptic, and semantic segmentation when paired with an efficient decoder (Cavagnero et al., 26 Mar 2026).

7. Multi-Task Sharing, Limitations, and Prospective Extensions

Because PMT leaves the encoder untouched, the same frozen VFM can serve multiple tasks with different lightweight PMDs loaded on top, including panoptic, instance, semantic, and video segmentation (Cavagnero et al., 26 Mar 2026). The paper states that this drastically reduces deployment complexity and memory footprint when varied output spaces or label definitions must be supported. In operational terms, the shareable unit is the encoder representation, while task specialization is isolated in the decoder.

The principal limitations are also explicitly identified. PMD relies on sufficiently rich frozen features, and accuracy degrades when smaller encoders or weaker pre-training are used, with ImageNet-1K given as an example (Cavagnero et al., 26 Mar 2026). Spatial detail missing from final encoder layers is only partially recovered via lateral connections, suggesting that more advanced multi-scale fusion or lightweight adapters may close remaining gaps. PMT also addresses per-task decoders separately; the paper notes that unified multi-task decoders or prompt-based extensions could further improve parameter sharing (Cavagnero et al., 26 Mar 2026).

A common misunderstanding is that PMT is simply a frozen reimplementation of encoder-only segmentation. The architecture differs in a substantive way: all task-specific query processing is moved out of the ViT and into a dedicated decoder, while the decoder jointly processes queries and patches with a plain Transformer stack. Conversely, PMT should not be construed as eliminating all trade-offs. The VIPSeg results and the stated reliance on strong frozen features indicate that shareability and speed are obtained within a regime where encoder quality remains a determining factor (Cavagnero et al., 26 Mar 2026).

In that sense, PMT occupies a specific point in the design landscape of VFM-based segmentation: it treats the frozen encoder as a stable, reusable feature interface and shifts the burden of specialization into a lightweight PMD. This suggests a broader architectural principle for multi-task VFM deployment: when frozen representations are sufficiently expressive, decoder-centric adaptation may offer a favorable balance between throughput, modularity, and competitive segmentation accuracy.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Plain Mask Transformer (PMT).