Manuscript Offprint

arXiv:2610.35491

S2^2-RL: Sample-Set Dual Reinforcement Learning for Generative Semantic Segmentation Dataset Distillation

Haoyu Wang, Fei Zhou, Qingqing Qiu, Lei Zhang, Wei Wei, Chen Ding

Abstract

While dataset distillation has witnessed significant advances in image classification, its extension to dense prediction tasks such as semantic segmentation is plagued by two core bottlenecks: bi-level optimization-based approaches suffer from prohibitive computational costs stemming from pixel-wise gradient unrolling, whereas proxy-based generative methods merely infuse visual textures into fixed semantic masks derived from real data, thus failing to condense rich semantic knowledge into a compact set of informative, novel scene generations. To address both bottlenecks simultaneously, we propose a novel Sample-Set Reinforcement Learning (S²-RL) framework for generative semantic segmentation dataset distillation (SSDD). Specifically, S²-RL formulates SSDD as a diffusion model based text-to-image generation paradigm, enabling flexible generation of images with informative, novel semantic distributions via a concise text prompt. Furthermore, we fine-tune a diffusion policy via Group Relative Policy Optimization (GRPO), leveraging a sample-set dual reward paradigm: for individual samples, it enforces semantic alignment with input text prompts and intra-class feature diversity; for sample sets, it maximizes inter-sample semantic distribution diversity by solving a contextual multi-armed bandit problem. These design choices enable S²-RL to distill large-scale semantic segmentation datasets into a compact set of generated samples that encapsulate diverse, informative semantic knowledge without the need of pixel-wise gradient unrolling. Extensive experiments on the ADE20K and COCO datasets demonstrate that S²-RL achieves substantial and consistent improvements over state-of-the-art baselines, establishing a new benchmark for SSDD.

Figure

(a) Optimization-based methods

(b) Proxy-based methods

(c) S2S^{2}-RL (Ours)

Figure 1: Comparison of paradigms. (Left) Optimization-based methods incur prohibitive memory costs from unrolling pixel-wise gradients. (Middle) Proxy-based generative methods require masks from real data, restricting synthesized datasets to existing layouts. (Right) S 2^{2}-RL treats distillation as active scene construction, using RL to generate diverse spatial topologies and valid scene layouts from text alone.

†^{\dagger}Corresponding author.

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

1 Introduction

Data-efficient learning has become crucial as deep learning models grow increasingly data-hungry. Dataset distillation [40] addresses this by condensing massive datasets into compact synthetic surrogates. Existing advances in dataset distillation fall into two primary paradigms: optimization-based methods and proxy-based generative methods. While both paradigms yield strong performance on image classification, their extension to dense prediction tasks such as semantic segmentation remains fraught with substantial challenges.

Specifically, optimization-based methods (Figure 1a), such as gradient matching [48, 3, 50] and distribution matching [39, 49, 28], formulate dataset distillation as a bi-level optimization problem aiming to align the gradients or distributions of student models on synthetic data with those on the real counterpart. While theoretically rigorous, these methods suffer from computational intractability in semantic segmentation tasks. Unlike image classification, which only relies on sparse supervision, semantic segmentation requires unrolling pixel-wise gradients at full spatial resolution, leading to severe memory overhead and making end-to-end optimization practically infeasible.

To circumvent this memory bottleneck, proxy-based generative methods [45, 35] (Figure 1b) have emerged as an efficient alternative, which bypass bi-level optimization via data inversion or global statistic matching. Since global statistics matching cannot comprehensively depict the complex spatial arrangements of multiple categories, existing approaches, such as those for object detection [26] or universal dataset distillation [27], turn to rely on fixed spatial masks from real data for structural regularization. This strategy reduces the model to a mere texture filler within static boundaries, rather than a genuine scene composer, and thus fails to synthesize a compact set of novel, informative spatial layouts necessary for covering the long-tail distributions of real-world scenes.

To bridge these gaps, we propose a novel Sample-Set Reinforcement Learning (S²-RL) framework for generative semantic segmentation dataset distillation (SSDD), as shown in Figure 1c. Unlike existing gradient-heavy or mask-conditioned methods, we reformulate SSDD as a diffusion-based text-to-image generation paradigm and optimize it through reward-driven reinforcement learning without pixel-wise gradient unrolling through downstream segmentation training. By framing the generative model as an agent, S²-RL directly utilizes appropriate rewards to drive policy updates. This framework not only eliminates the need for heavy second-order gradient computations, but also empowers the model to flexibly synthesize a compact set of images with novel, informative contents from concise text prompts, thus enabling effective SSDD.

However, applying RL to generative dataset distillation introduces a new challenge. Standard RL methods (e.g., DDPO [2], Flow-GRPO [21, 38]) are typically designed for sample-level optimization, aiming to maximize the quality of individual instances. In contrast, dataset distillation is fundamentally a set-level optimization problem: the objective is to construct a collective dataset that covers the original dataset distribution with fewer samples. Straightforwardly applying standard RL is prone to incur model collapse, where the model over-optimizes for easy patterns while ignoring the long-tail distribution characteristics of real datasets. To address this problem, we introduce a sample-set dual reward mechanism. At the sample-level, for each individual generated sample, we enforce semantic alignment with the input prompt while penalizing collapsed local textures within the same class. At the set-level, we maximize inter-sample semantic distribution diversity by solving a contextual multi-armed bandit problem, enabling the generated compact sample set to appropriately cover the original long-tail dataset distribution. Empirical evaluations on ADE20K [51] and COCO [20] benchmarks demonstrate that S²-RL outperforms state-of-the-art baselines, reconciling generation quality with distributional diversity.

Our main contributions are summarized as follows:

• We propose S 2^{2}-RL, a novel generative dataset distillation framework that leverages RL to enable efficient image synthesis for dense prediction tasks, bypassing the memory bottlenecks of explicit gradient matching.

• We design a dual reward mechanism that balances sample quality and set diversity, mitigating semantic mode collapse.

• We obtain new state-of-the-art SSDD performance on ADE20K and COCO datasets.

References (48)