TL;DR
Frontier vision–language models (VLMs) are great at describing what a scientific chart looks like, but they are practically blind when asked to read the exact numbers off a dense line plot. The authors introduce MatDeplot, a fast local pipeline that extracts precise $(x, y)$ coordinates from materials-science spectra 38 times more accurately than top hosted VLMs. By turning static images back into raw data arrays, AI agents can finally calculate complex physical parameters across thousands of published papers—moving from visual guesswork to actual math.
What Problem Does This Paper Address?
In materials science, the most valuable experimental evidence—like X-ray diffraction (XRD) patterns or Raman spectra—isn't printed in neat tables; it is locked away inside published line plots. When you are trying to determine crystal sizes or atomic disorder, precision is everything: a tiny three-pixel misread on a standard XRD plot can throw off an angle measurement by a quarter of a degree, ruining downstream physics calculations.
Right now, automated literature-mining tools read text and tables well, but stop at the figure boundary. If you hand a scientific plot to a frontier VLM (like GPT-5.4, Claude Opus 4.6, or Gemini-3.1-Pro), it can describe the general shape of a curve, yet it fails to anchor its guesses to the actual pixels. Meanwhile, existing "chart-derendering" AI models are trained on simple bar and pie charts, causing them to truncate or completely collapse when faced with noisy, thousand-point scientific spectra. Researchers needed a way to reliably turn published chart images back into queryable numerical arrays at scale.
Methods
To bridge the gap from a PDF to raw numbers, the authors built MatDeplot, a three-stage local extraction pipeline:
- Subfigure Detection & Routing: Scientific figures are usually multi-panel collages. MatDeplot uses MinerU and a custom-trained YOLOv11x detector to crop individual panels, then uses a multimodal LLM (
qwen-vl-max) to filter out microscopy or schematics and isolate the line plots. - Calibration & Foreground Segmentation: Two specialized YOLOv11 detectors read the axis tick marks (fitting an affine transformation from pixels to physical units) and mask out the chart legend so it doesn't confuse the curve reader. Next, a Mask2Former segmentation head isolates the curve pixels from the background. If a scatter-heavy plot fools the segmenter, a smart fallback mechanism kicks in using Otsu thresholding so the system doesn't return an empty hand.
- Curve Separation: How do you untangle overlapping lines? MatDeplot embeds foreground pixels into a 5D space combining color ($L^*a^*b^*$) and spatial coordinates $(u, v)$, then groups them using $k$-means clustering (using a cached VLM call to get the curve count $k$). Morphological post-processing cleans up anti-aliased edges without color bleed, skeletonizes each cluster into a 1-pixel-wide polyline, and projects it into real physical $(x, y)$ coordinates—flagging low-confidence curves to abstain rather than hallucinate.
Datasets
Existing chart benchmarks test general visual question-answering rather than dense numerical extraction. To fix this, the authors built two coupled benchmarks spanning seven core spectroscopy and electrochemistry modalities (XRD, Raman, XPS, XAFS, EIS, GCD, and CV):
- MatCurvs: A three-tier dataset starting with L0 (1.37 million classified subfigures from 55,763 articles), narrowing to L1 (204 panels with painstakingly hand-traced pixel polylines, including a strict 90-panel leakage-clean holdout set), and L2 (8,026 real-coordinate curves across 3,817 panels verified by VLM judges).
- MatCurvs-Reasoning: A 14,740-question numerical benchmark built on L2 with deterministic
scipy/numpyground truth, testing exact readouts, peak widths, and baseline offsets.
Key Insights and Ideas
- Images become redundant once curves are extracted: When answering quantitative questions, an image-blind text LLM fed only MatDeplot's extracted $(x, y)$ numbers performed just as well as a VLM given both the chart image and the numbers (4.6% vs. 4.3% median error on the rigorous set). For quantitative tasks, MatDeplot captures virtually all the load-bearing numerical information in the plot.
- Conquering publication illusions: Scientists frequently stack multiple XRD or Raman spectra vertically by adding an arbitrary constant offset for visual clarity. Image-only VLMs get completely tripped up by this visual convention (23%–99% error), whereas feeding extracted data to an LLM drops the error to ~3%.
- Extraction unlocks "Agent-Ready" science: Papers often plot raw spectra without reporting derived metrics like crystallite size. With MatDeplot turning charts into spreadsheets, an AI agent can run standard
scipyphysics recipes to compute missing parameters across the literature automatically.
Key Results
Comparison across extractor families on the L1 leakage-clean holdout set
- Closing the Pixel-Anchor Gap: Evaluated on Line Recall ($\text{LR}_{0.5}$, measuring the fraction of ground-truth curves recovered at $\text{IoU} \ge 0.5$ within a 5-pixel raster tolerance), MatDeplot recovers 45.8% of curves on the clean holdout set in ~1.5 seconds per image locally. Every frontier hosted VLM scores $\le$ 1.2% (a 38$\times$ gap), and tabular chart-derenderers like DePlot score 0.0%.
- Dramatic Drop in Reasoning Error: Across the 14,740-question suite, giving extracted $(x,y)$ coordinates to an LLM slashes median relative error from 54.3% (image-only VLM) down to 4.2%–5.5%.
- Real-World Agent Tasks: On a cohort of 7 energy-storage papers requiring 19 derived materials calculations (like Scherrer crystallite sizes and Raman $I_D/I_G$ disorder ratios), MatDeplot + an agent hit 19/19 within tolerance, while an image-only GPT-5.4 scored just 2/19.
Limitations and Future Work
- Strict pixel fidelity is still an open problem: While MatDeplot hits 45.8% at $\text{LR}_{0.5}$, performance drops to 0.5% (1/203 lines) at the ultra-strict $\text{LR}_{0.8}$ threshold. It is 80–200$\times$ faster than manual tracing in WebPlotDigitizer, but hasn't yet matched human-hand precision.
- Scope and Context: Because MatDeplot focuses purely on coordinates, tasks requiring chart-text OCR—like matching a curve's color to a legend name, reading shared axes across multi-panel layouts, or interpreting schematics—still require visual context beyond the extracted numbers. Furthermore, if a plot lacks numeric tick marks, the strict calibration policy must abstain.
- Removing closed-model dependencies: The headline pipeline currently relies on cached Gemini-3.1-Pro calls to count the number of curves ($k$) before clustering; replacing this with purely local, deterministic curve-counting is a prime target for future iterations.
Summary updated