Manuscript Offprint

arXiv:2609.07072

Detect Anything in Graphic Design: Element-Level Rewards for Autoregressive Detection

Jiangning Zhu, Bowen Li, Shenyu Qiao, Yima Gu, Zhao Zhang, Yuhui Yuan, Shixia Liu

Abstract

Graphic designs, such as posters, advertisements, and infographics, are an important medium for communicating information and shaping understanding. Unlike natural images, they consist of layered elements with explicit compositional order. However, existing object detection models treat these elements as an unordered set, leaving compositional order unexploited. To address this limitation, we present Detect Anything in Graphic Design (DAD), a model that formulates graphic design detection as compositional deconstruction. It decodes elements in compositional order, using lower-layer elements to better detect higher-layer ones.

*Corresponding author.

Preprint.

The key feature of DAD is amodal detection, which predicts the full bounding box of each element, including regions occluded by elements placed above it. Building on this formulation, we propose Element Relative Policy Optimization (EleRPO), which extends GRPO from sequence-level supervision to element-level optimization. EleRPO provides fine-grained training signals that capture how each detected element contributes to overall detection quality, and works synergistically with compositional order to improve detection performance. To support training and evaluation, we build a dataset of 10 million graphic designs. Experiments show that DAD outperforms all baselines and achieves human-level performance in amodal detection, supporting effective image-to-layer decomposition. EleRPO consistently improves over GRPO across nine detection benchmarks.

Code: https://github.com/dad887/DAD

Data & Dataset Card: https://huggingface.co/datasets/dad887/DAD

1 Introduction

Graphic designs, such as posters, advertisements, and infographics, are a ubiquitous visual medium that shapes how people consume information across business communication, news media, public services, and education. By combining text with visual elements such as photographs, pictograms, and diagrams, they clearly organize complex information, attract attention, and make ideas easier to understand. A key property that distinguishes graphic designs from natural images is their compositional nature. They are typically built from discrete, layered elements that are arranged in a deliberate visual order and often partially or fully occlude one another. This layered structure is central to how designs are created, interpreted, edited, and reused. Consequently, access to layer-level representations is essential for understanding and modifying graphic designs [1, 2]. In practice, however, graphic designs are often distributed as flat raster images (e.g., JPEG or PNG) for compatibility, which removes explicit layer information and makes subsequent editing difficult. Recovering the underlying layers from a flat image is therefore a key step for downstream applications [3]. A fundamental task in this process is graphic design detection, which aims to identify the locations, categories, and compositional order of design elements [4].

Recent advances in visual recognition and object detection [5, 6, 7] have led to increasingly capable models that accurately localize and categorize a broad range of objects. However, these models are primarily designed for natural images [8, 9] or text-dominant documents [10, 11, 12], which introduces two key limitations when applied to graphic design detection. First, objects in these two domains generally lack an intrinsic compositional order, so existing models represent them as an unordered set and can not predict the compositional order of the elements. Without this order, the recovered elements can not be faithfully recomposed into the original design. Second, because annotating large-scale occluded regions is challenging, existing models are usually trained to predict only visible regions. As a result, the hidden parts of partially occluded elements remain unrecovered. These limitations call for a graphic design detection model that can infer compositional order while also learning to recover occluded regions from large-scale annotated data.

To fill this gap, we present Detect Anything in Graphic Design (DAD), a model for graphic design detection. Building upon autoregressive detection with vision-language models (VLMs) [8, 13], DAD formulates graphic design detection as compositional deconstruction and predicts elements in compositional order. Each element is specified by its category and an amodal bounding box that captures its full spatial extent, including the regions occluded by the elements above it. With compositional order, DAD uses lower-layer elements as context when detecting a higher-layer one, aligning with the layer-by-layer process by which designers construct graphic designs. Based on this formulation, we propose Element Relative Policy Optimization (EleRPO), which extends Group Relative Policy Optimization (GRPO) [14] from sequence-level supervision to element-level optimization. At the core of EleRPO is the martingale difference decomposition [15], which decomposes a sequence-level reward into unbiased, history-conditioned element-level rewards. Estimating this reward requires no additional reward models or extra sampling passes, making it a simple drop-in replacement for GRPO and applicable to any VLM-based detection model. To support the training and evaluation of DAD, we construct a large-scale dataset of 10 million graphic designs, DAD-10M. The dataset is anchored by a corpus of 5 million designer-created works, from which we extract ground-truth amodal bounding boxes and compositional order using their original layered representations. To further improve the diversity of occluded elements and styles, we augment this corpus with an additional 5 million designs, including those constructed via element replacement, as well as designer-created and AI-generated flat designs.

We validate the effectiveness of DAD and EleRPO through comprehensive experiments. DAD achieves better detection performance than both proprietary and open-source baselines on our dataset, and these gains transfer to existing graphic design detection benchmarks (Fig. 1). Human evaluation further shows that DAD achieves human-level accuracy in predicting the occluded regions of elements. In addition, EleRPO consistently improves over GRPO and other fine-grained reinforcement learning (RL) methods, such as PRIME [16] and VinePPO [17], and generalizes across detection models and a wide range of detection benchmarks.

The main contributions of this work are threefold:

  • We develop a graphic design detection model, DAD, that predicts the amodal bounding boxes of elements in their compositional order.
  • We propose an optimization method, EleRPO, that extends GRPO to element-level supervision by decomposing sequence-level rewards into a martingale difference sequence.
  • We release a subset of DAD-10M containing 100,000 designs for image-to-layer decomposition, each with original layer representations and diverse element styles.

References (79)