TL;DR
When AI systems read research or business PDFs, they often silently ignore crucial data locked inside charts and tables—or require sending private files to expensive cloud APIs. CLEAR solves both problems by running a specialized, lightweight pipeline entirely on a single laptop GPU, turning messy PDFs into clean Markdown where every figure is carefully transcribed into structured text. Not only does this keep private data completely offline, it actually makes downstream AI answers more accurate and up to 18 times cheaper than feeding the raw PDF directly.
What Problem Does This Paper Address?
Picture an engineer asking an AI assistant a question based on a technical report. Half the answer sits in a paragraph on page two; the other half is a subtle peak in a line chart on page five. Standard text parsers miss the chart completely, causing the AI to hallucinate or give an incomplete answer with total confidence. Over time, as AI outputs get recycled into training data for future models, this "blindness" to visual data risks becoming a permanent, compounding bias.
You could upload the raw PDF pages as images to a massive, closed-source cloud model, which has two major downsides: it burns through tokens (and money) fast, and it requires shipping potentially sensitive medical, financial, or proprietary research data off your machine. The authors wanted a system that extracts everything—layout, headings, tables, and complex charts—with frontier-grade accuracy, without a single byte leaving a standard 12 GB consumer GPU.
Methods
Instead of relying on one giant model to do everything, CLEAR chains together specialized local tools inside Docker containers, spinning each one up and tearing it down sequentially so only one model occupies GPU memory at a time.
Here is how the assembly line works:
- Layout & Heading Repair: First, an open-source parser called MinerU extracts raw text, images, and draft headings. MinerU finds headings well, but struggles with hierarchy (mixing up sections and subsections). To fix this locally, the authors quantized a post-processing language model called Popo, shrinking it from 17.75 GB down to 4.31 GB (retaining 99.995% output similarity), followed by a tiny regex script to catch stragglers like "Abstract" and "Keywords."
- Type-Specific Image Parsing: Next, a compact vision-language model (Qwen3.5-4B) classifies extracted visuals into types (chart, diagram, table, photo, etc.). Tables are routed back to MinerU’s dedicated table engine (with Qwen as fallback), while charts and diagrams get carefully tuned, defect-tested prompts so the model reads axes and panels accurately without inventing numbers.
- The
<image>XML Tag & MCP Server: Rather than dumping descriptions into plain text, every visual is wrapped in a structured<image>block containing its<type>,<text>description, and<url>pointing to the local image file. Wrapped in a Model Context Protocol (MCP) server—a standardized way for AI agents to use external tools—an agent reads the cheap<text>first, and only opens the heavy<url>image file if it realizes details are missing.
Datasets
To build and grade each piece without guesswork, the authors curated four human-verified datasets (plus one public benchmark):
- 30 Open-Access Papers: Sampled via OpenAlex across five distinct layout styles (Computer Science, Engineering, Medicine, Physics/Astronomy, and Social Sciences).
- Heading Ground Truth: All 542 headings across the 30 papers manually checked for text and depth level.
- 100 Labeled Figures: Extracted from the papers and hand-annotated by type and description to tune prompts.
- 19 "Figure-Only" Two-Hop Questions: A clever new benchmark built using a creator-validator AI loop and human review. Answering each question requires combining two facts from two different figures that never appear in the main text.
- PubTabNet (Subset): 30 validation tables (24 hard with merged cells, 6 easy) from PubMed Central to benchmark table extraction.
Key Insights and Ideas
- Pre-digested text beats raw vision—especially for local models: You might assume letting a multimodal LLM look straight at PDF pages is the gold standard. In reality, feeding models CLEAR’s structured Markdown beat raw PDFs in 4 of 6 head-to-head setups. Most notably, an open-weight model (Qwen 3.8 Flash) jumped 12.3 percentage points (from 75.4% to 87.7%), nearly closing the gap with frontier closed models and proving a 100% local workflow is viable.
- Agents know what they don't know: Giving agents two tiers of information—a fast text summary and an optional link to the raw image—works remarkably well. Across 342 answers where image fallback was enabled, text alone solved 258 correctly. Agents chose to open the actual image just 58 times, getting 56 of those 58 right and recovering from the rare spots where the local 4B vision model misread an unlabeled plot.
- Small vision models struggle with table grids: While Qwen3.5-4B excelled at describing charts, it frequently hallucinated row/column alignments on complex tables with merged cells—even when given extra output tokens. Dedicated layout engines like MinerU remain much better suited for grid structures.
Key Results
- Heading Accuracy: Combining MinerU, quantized Popo, and a simple regex fix pushed heading F1 score to 0.969, while heading depth accuracy jumped from MinerU's baseline of 0.550 up to 0.965.
- Downstream QA & Cost: On the 19 two-hop figure questions, Markdown input outperformed raw PDFs in 4 out of 6 matched model pairs—pushing Claude Opus 5.5 (medium effort) from 89.5% to a perfect 100%. Even including occasional image-fallback calls, answering from Markdown was 1.6x to 18.1x cheaper per query than reading PDFs.
- Local Speed: Running on a single laptop (RTX 5070 Ti GPU with 12 GB VRAM), the pipeline processed all 30 papers in 2.91 hours (median 254.3 seconds per paper).
Limitations and Future Work
The primary bottleneck is speed: Qwen3.5-4B's image-to-text step consumes 73.5% of total processing time (~257 seconds per paper). Additionally, MinerU still stumbled on complex tables (scoring 75.4% on hard merged-cell tables vs. 87.5% on easy ones), and the evaluation only tested 30 academic papers rather than scanned documents or messy business reports.
For future work, the authors plan to swap in tiny, ultra-specialized models built strictly for tables (like TeleOCR or UniTable) and charts to speed up visual parsing while boosting accuracy on tricky, unlabeled plots—all while keeping everything comfortably inside a single local GPU.
Summary updated