Manuscript Offprint

arXiv:2610.17009

MaskSense: Confronting the Visual Exploration Trap in Masked Image Generation

Yawen Shao, Jie Xiao, Kai Zhu, Yu Liu, Hongchen Luo, Xueyang Fu, Yang Cao, Wei Zhai, Zheng-Jun Zha

Abstract

Reinforcement learning (RL) has shown strong potential for aligning generative models with human intent, but adapting RL to masked generative models (MGMs) remains largely underexplored. Existing approaches that directly adapt Group Relative Policy Optimization (GRPO) to MGMs leave a foundational conflict unaddressed: MGMs' exploitative decoding nature is inherently at odds with the exploratory diversity that GRPO presupposes. In this work, we reveal a structural decoding bias termed the visual exploration trap: confidence-based sampling trades the exploration of diverse subject realizations for the greedy resolution of low-uncertainty background regions, causing premature collapse of the generative exploration space and starving GRPO of the rollout diversity it depends on. To this end, we propose MaskSense, a novel RL framework for MGMs that confronts the visual exploration trap at both the sampling and optimization stages. Specifically, we introduce a semantic anchored routing sampling mechanism that leverages semantic priors to preserve high-entropy subject token exploration while amplifying intra-group reward variance through exploratory-exploitative routing to yield more discriminative advantage estimates. Furthermore, we design a global entropy transition anchoring strategy to identify the most consequential decoding steps and concentrate gradient updates on them. Extensive experiments on multiple text-to-image benchmarks demonstrate that MaskSense substantially improves upon the base model, with GenEval accuracy improving from 54% to 86% and HPS from 28.89 to 36.39, achieving state-of-the-art performance.

1 Introduction

Masked generative models (MGMs) [1, 5, 63, 15] have recently emerged as a compelling paradigm for visual synthesis, challenging the long-standing dominance of autoregressive models (AR) [57, 24, 48] and diffusion models (DMs) [46, 16, 23] by reformulating image generation as iterative masked token prediction. Central to this paradigm is the confidence-based sampling strategy of MaskGIT [6], which predicts all masked tokens in parallel at each step and retains only the most confident subset while remasking the remainder for subsequent iterations, making the decoding process exploitative.

Reinforcement learning (RL) [45, 40, 36] has proven highly effective in enhancing the reasoning capabilities of large language models (LLMs) [13, 17, 54, 41], while its application to MGMs remains comparatively underexplored relative to diffusion models [25, 42, 65] and AR models [18, 70]. Recent works [69, 28] have begun addressing this gap by applying Group Relative Policy Optimization (GRPO) to MGMs, yet retain the confidence-based sampler as a fixed component with minimal adaptation to the masked generation setting. This overlooks a fundamental prerequisite of

  • Work done at Tongyi Lab.

†^{\dagger} Corresponding author.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Prompt: Two little dogs looking a large pizza sitting on a table.

MaskGIT

Figure

SA-Sampler

t=0

t=10

t=20

t=30

t=40

t=64

(a) Denoising process of MaskGIT and SA-Sampler

(b) HPS score during sampling

(c) Exploration dynamics of subject tokens

Figure 1: Motivation. (a) MaskGIT keeps subject tokens masked while committing background regions early, whereas SA-Sampler resolves subject regions earlier via semantic anchoring. (b) SA-Sampler consistently discovers higher-reward trajectories through broader generative exploration. (c) SA-Sampler maintains higher subject-token fixation ratios and elevated entropy, effectively escaping the visual exploration trap.

GRPO: its effectiveness derives from group-relative advantage estimation, which presupposes rollouts sufficiently diverse to cover meaningful regions of the solution space, a requirement inherently at odds with the exploitative nature of confidence-based sampling.

In this paper, we identify and characterize precisely how this conflict manifests as a structural bias that we term the visual exploration trap. Specifically, tokens with lower uncertainty predominantly correspond to simple background textures in natural images [30], causing background regions to be committed well before semantically critical subject areas are ever explored (Fig. 1 (a)). Subject tokens, by contrast, retain high predictive entropy throughout the early generation steps, while their fixation ratio remains near zero (Fig. 1 (c)), indicating that substantial generative diversity is available yet remains entirely unexploited. By the time subject tokens begin to be retained after step 20, the surrounding background context has been largely committed, severely narrowing the space of potential generative branches [32, 54] and limiting the diversity and quality of the resulting subject regions [30]. The originally high entropy of subject tokens is thus suppressed before any meaningful subject decision is made, as the model effectively sacrifices diverse subject realizations to greedily resolve low-uncertainty background regions, directly undermining the rollout diversity that GRPO requires. This trap necessitates a rethink of RL for MGMs.

To tackle this challenge, we propose MaskSense (Fig. 2), a novel RL framework designed for MGMs that directly confronts the visual exploration trap at both the sampling and optimization stages. At the sampling stage, we propose the semantic anchored routing sampling (SARS) mechanism, built upon the Semantic Anchored Sampler (SA-Sampler), which employs semantic priors to anchor subject tokens during the early generation steps (Fig. 1 (a)). This design preserves the high-entropy exploration space that confidence-based sampling would otherwise suppress (Fig. 1 (c)), enabling the discovery of higher-reward trajectories through broader generative exploration (Fig. 1 (b)). SARS further routes rollouts stochastically between SA-Sampler and MaskGIT, generating a mixture of exploratory and exploitative trajectories within each group to deliberately amplify intra-group reward variance and sharpen discriminative advantage estimates. At the optimization stage, we further introduce global entropy transition anchoring (GETA) to concentrate gradient updates on the most structurally decisive decoding steps, avoiding diffuse optimization across steps of unequal importance. Extensive experiments on multiple text-to-image benchmarks validate the effectiveness of MaskSense.

The contributions of this paper are summarized as follows:

• We identify the visual exploration trap in MGMs, revealing that confidence-based sampling suppresses subject-token entropy before meaningful subject decisions are made, fundamentally depriving GRPO of the exploratory diversity essential to its optimization.

• We propose MaskSense, a novel RL framework for MGMs that promotes diverse rollout exploration through semantic anchored routing sampling, and concentrates gradient updates on the most consequential decoding timesteps via global entropy transition anchoring.

• Extensive experiments on multiple text-to-image benchmarks demonstrate that MaskSense achieves state-of-the-art performance, confirming the effectiveness of confronting the visual exploration trap for RL optimization in MGMs.

References (70)