TL;DR
Ever needed to tweak a label or move an arrow in a scientific diagram, only to realize you’re stuck with a flat, uneditable PNG? Pixel2Primitives solves this by turning rasterized scientific figures into native, fully editable PowerPoint slides—preserving both crisp visual appearance and the underlying object structure.
What Problem Does This Paper Address?
Scientific figures pack complex architectures and workflows into compact visuals, but we usually encounter them as raster images (like PNGs) or AI-generated bitmaps. While raster images preserve how a figure looks, they throw away the object structure needed to edit it.
Existing workarounds fall short on dense scientific diagrams. Traditional vectorization traces contours into low-level paths that don't behave like coherent objects (e.g., an arrow's shaft and head end up as separate, ungrouped pieces). Meanwhile, newer Vision-Language Model (VLM) approaches that generate SVG or drawing code directly often struggle to balance visual fidelity with true element-level editability—especially when thin connectors, overlapping shapes, and nested labels are involved.
Methods
Instead of asking a VLM to write drawing code from scratch, Pixel2Primitives decouples visual perception from geometric construction in three stages:
- Localization and Planning: A domain-adapted Segment Anything Model (SAM 3) proposes precise regions for shapes and connectors. Because SAM proposals can be fragmented, a VLM uses full-image context to merge fragments, discard noise, and organize elements into reconstruction tasks (e.g., grouping overlapping shapes or connected arrow trunks). Text, formulas, and embedded image assets are localized via a coarse-to-fine VLM pass.
- Category-Specific Reconstruction: For shapes and connectors, the VLM predicts explicit geometric observations—hierarchies of parts, paths, sample points, and occlusion flags—in local image crops. These predictions are rendered as overlays on the crop so a VLM critic can inspect and iteratively refine them (e.g., "shorten last arrow" or "shift left"). Numerical fitting then converts the refined points into native PowerPoint shapes, connectors, and freeform curves. Meanwhile, text becomes editable text boxes, formulas are converted to native Office equations (OMML), and image assets are cleaned of overlapping labels and given transparent backgrounds.
- Layered Assembly: All reconstructed elements are mapped back to their original coordinates and assembled into a
.pptxfile with Z-order (stacking) adjustments so every object remains editable at its intended granularity.
Datasets
- PDF-to-PPTX Data Engine (98,861 figures): To train SAM on dense scientific diagrams without manual labeling, the authors built an automated pipeline that extracts framework figures from research paper PDFs, parses their vector drawing objects into PowerPoint primitives, and groups fragmented paths (like an arrow's shaft and head) into coherent instances. This yields 98,861 figures and over 9.1 million annotated instances.
- P2PBench (150 figures): A new, expert-verified benchmark of 150 scientific figures across three difficulty tiers (Easy, Medium, Hard) from 10 conferences. Each figure includes a verified PowerPoint ground truth and semantic annotations to evaluate both Fidelity (semantic and visual correctness) and Editability (structural validity plus executable editing operations).
- PPTBench (500 tasks): An existing benchmark used alongside P2PBench to evaluate overall slide reconstruction.
Key Insights and Ideas
- Decoupling perception from code generation pays off: Having a VLM predict explicit geometric points and letting a visual critic refine them on local crops is far more reliable than asking a VLM to directly output
python-pptxor SVG code. - Pixel similarity doesn't equal editability: Standard image metrics (like 1-MSE or SSIM) can be inflated by large background regions and completely miss broken topology. For instance, a baseline can score reasonably on visual fidelity while scoring near zero on connection editability.
- Domain adaptation is critical for thin primitives: Pretrained segmentation models struggle with thin lines and arrowheads. Fine-tuning SAM on grouped vector-PDF primitives accounts for a major jump in connection fidelity (+8.09 points over pretrained SAM).
Key Results
- P2PBench: Using GPT-5.6 Sol as the backbone, Pixel2Primitives achieves 94.36 Overall Fidelity and 93.40 Overall Editability, outperforming the strongest baselines by 3.32 and 8.64 points, respectively. Using GLM-5.3 Flash, it reaches 92.55 Fidelity and 92.26 Editability.
- PPTBench: Pixel2Primitives scores 79.64 (GPT-5.6 Sol) and 64.23 (GLM-5.3 Flash), beating AutoFigure-Edit by 8.07 and 29.45 points under the same backbones, and showing much stronger robustness across different models.
- Qualitative gains: Compared to baselines that suffer from reversed arrows, missing module boxes, or overlapping labels, Pixel2Primitives preserves both clean geometry and native editing structure.
Limitations and Future Work
- Iterative geometric refinement requires additional model calls, and very dense, intersecting lines or complex curves remain challenging for VLM perception.
- The framework currently targets discrete diagrams (shapes, connectors, text, formulas, image assets); data-driven statistical plots and continuous illustrations are left for future work.
- Because a single figure can have multiple valid PowerPoint reconstructions, evaluating against a single reference involves some inherent subjectivity.
Summary updated