Skip to main content
Back

ResearAI's AutoFigure-Edit Turns Research Text Into Editable SVG Diagrams

AutoFigure-Edit turns a paper's method section into a fully editable SVG diagram in ~20 minutes, using SAM3 segmentation, background removal, and LLM-driven vectorization

Pro

  • AutoFigure-Edit converts a paper's methods section into a fully editable SVG figure via a 4-stage pipeline: LLM generation, SAM3 segmentation, SVG templating, and icon assembly.
  • Output figures scored 4.04–4.11/5 on semantic correctness and completeness in a 262-sample human study from 217 participants.
  • Supports style transfer: upload a reference paper figure to match its visual style during generation.
  • Each run costs ~$0.50, uses ~30K tokens, and takes ~20 minutes with the recommended Gemini configuration.
  • v1.1 adds official OpenAI model support (gpt-image-2, gpt-5.5), import of existing stage-1 figures, and bilingual UI.
  • Free to self-host (MIT license) via GitHub; hosted demo at deepscientist.cc.

AutoFigure-Edit is an open-source pipeline from ResearAI that takes the methods section of a research paper as plain text and outputs a fully editable SVG figure -- the kind of clean, vector-based diagram you'd see in a top-conference paper. It's the successor to AutoFigure, which was accepted at ICLR 2026, and it solves the one problem the original left open: the output was a raster image you couldn't touch without redrawing it from scratch.

The figure-making bottleneck nobody talks about

High-quality scientific illustrations are crucial for effectively communicating complex scientific and technical concepts, yet their manual creation remains a well-recognized bottleneck in both academia and industry. Most researchers either spend hours in Inkscape or PowerPoint, hire a designer, or settle for a rough diagram that undersells their work. Text-to-image models like Stable Diffusion or DALL-E can generate pretty pictures, but mainstream end-to-end text-to-image models often fail to effectively visualize long scientific texts -- although they generate aesthetically pleasing images, they struggle to preserve structural fidelity.

AutoFigure-Edit takes a different approach. Instead of trying to generate a perfect image in one shot, it breaks the problem into four stages, each handled by a specialized component.

Four stages, one editable SVG

The pipeline is the core innovation here. AutoFigure-Edit's pipeline transforms a raw generation into an editable SVG in four distinct stages:

  1. Generation: An LLM renders a journal-style schematic from your method text, saved as a raster PNG.
  2. Segmentation: SAM3 (Meta's latest Segment Anything model) detects and segments distinct icons, arrows, and text regions using text prompts like icon,diagram,arrow. Overlapping detections are merged using an IoU-like threshold.
  3. Templating: Each detected region is cropped and passed through RMBG-2.0 for background removal. The LLM then receives the original figure, the segmentation overlay, and a JSON of bounding boxes as multimodal input, and generates a placeholder-style SVG wireframe whose boxes match the labeled regions.
  4. Assembly: The transparent icon crops are injected into the SVG template, matched by label ID, producing the final final.svg.

The result is a structured SVG where every component -- text, shapes, arrows, icons -- is independently editable. An optional LLM optimizer can run iterative refinement passes on the template to better align strokes and layouts, though the README recommends skipping it (--optimize_iterations 0) for standard use.

Style transfer is the sleeper feature

Beyond the vectorization pipeline, AutoFigure-Edit supports reference-guided style transfer. You upload a target paper's figure as a reference image, and the system mimics its visual style -- color palette, layout density, icon aesthetic -- while generating your figure. Combining LLM-based generation with SAM3 segmentation and vectorization, AutoFigure produces high-quality methodology diagrams, supports style transfer from reference images, and includes a built-in SVG editor for in-browser refinement. This means you can match the visual identity of a specific venue or research group without any manual styling work.

What the numbers say

The team collected 262 evaluation samples from 217 unique participants. For the generated PNG figures, AutoFigure-Edit achieves strong performance across all evaluation dimensions, with mean scores of 4.04 (Scientific Semantic Correctness), 4.11 (Information Completeness), 3.95 (Visual Presentation Quality), and 4.09 (Style Consistency). Notably, ratings are heavily concentrated at the highest level: 48% and 51% of evaluations assign Score 5 to semantic correctness and completeness, respectively, and 50% to style consistency.

The evaluation was run against FigureBench, which provides 3,300 long-form scientific text-figure pairs sourced from papers, surveys, blogs, and textbooks, curated and filtered for quality and stylistic diversity. The predecessor AutoFigure set a high bar: its effectiveness was strongly validated by human expert evaluations, with up to 66.7% of generated results judged to meet publication standards.

Known limitations

The pipeline has a few rough edges worth knowing about before you commit to it:

  • Speed and cost: The recommended configuration uses gemini-3.1-flash-image-preview for image generation and gemini-3.1-pro-preview for SVG reconstruction. Each run costs approximately $0.50, consumes around 30,000 tokens, and takes about 20 minutes.
  • Resolution sensitivity: The README strongly recommends the 4K option. Using 1K or 2K resolutions results in the final SVG being unusually blurry.
  • Error propagation: AutoFigure-Edit derives vector structures from an intermediate raster, so any errors in the initial image generation or segmentation step cascade into the final SVG.
  • Foundation model dependence: Output quality is directly tied to the underlying LLM. Weaker models produce noticeably worse results.
  • SAM3 setup: The local SAM3 install targets Python 3.12+, PyTorch 2.7+, and CUDA 12.6. If you don't have a GPU, you'll need to use the Roboflow or fal.ai API backends instead.

Getting started

The fastest path to a working setup is Docker. Clone the repo, copy .env.example to .env, add your HuggingFace token, and run:

docker compose up -d --build

Then open http://localhost:8000. The web UI lets you paste method text, pick a provider, optionally upload a reference image for style transfer, and watch the pipeline run in real time. For CLI use:

python autofigure2.py \
  --method_file paper.txt \
  --output_dir outputs/demo \
  --provider gemini \
  --api_key YOUR_GEMINI_KEY \
  --image_size 4K

If you already have a raster figure from a previous run or another tool, you can skip the image generation step entirely with --input_figure_path ./my_figure.png and jump straight to SAM segmentation and SVG reconstruction.

Provider flexibility and v1.1 additions

AutoFigure-Edit v1.1 focuses on two practical workflows that were still awkward in earlier public builds: starting from a user-supplied stage-1 academic figure, and running the pipeline cleanly with official OpenAI models or OpenAI-compatible gateways. The supported providers now include:

  • OpenRouter -- routes to Gemini, Claude, and others
  • Google Gemini -- direct API access, recommended default
  • OpenAI Responses -- uses gpt-image-2 for generation and gpt-5.5 for SVG reconstruction
  • Bianxie AI -- an OpenAI-compatible aggregate API that provides mainland China users access to GPT-image-2 and Gemini without a foreign credit card
  • Custom -- any OpenAI-compatible /v1 endpoint you self-host

The paper behind AutoFigure-Edit was presented as a system demonstration at ACL 2026, and the full paper is on arXiv. The benchmark dataset, FigureBench, is available on Hugging Face. The tool is free to self-host under MIT license, and a hosted version is available at deepscientist.cc at no cost for academic users.

What this changes

The implicit assumption in most AI-assisted figure generation work has been that the output is a deliverable -- something you render and insert into your PDF. AutoFigure-Edit challenges that by treating the figure as a starting point. The SVG output is a working file, not a screenshot. You can open it in Inkscape, drag elements around, change colors, swap icons, or hand it to a designer who can iterate on it without starting over.

The tool handles methodology visualizations, system overviews, process flowcharts, and more -- all derived from plain text and delivered as fully customizable vector artwork. For anyone writing papers with complex pipeline diagrams, that's a meaningful shift in how much of the figure-making process can be automated without losing editorial control.