Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PaperFigure

Open retrieval. Evidence-grounded. Main figure only.

An original Codex skill for turning AI research into clear, publication-ready main figures.

Codex Skill Python License: MIT

SemCoT example generated by PaperFigure

PaperFigure researches the target method, retrieves candidate papers, reads their actual Figure images together with captions and method context, ranks visual structure at Figure level, plans an original visual explanation, renders one main figure, and critiques it for factual fidelity, exact text, and readability.

It is intentionally narrow: method overviews, architectures, training/inference pipelines, and conceptual frameworks. It does not generate result plots, posters, slide decks, or a full paper illustration suite.

Why PaperFigure

  • Open scholarly retrieval - searches beyond a fixed reference bank, prioritizing arXiv and official proceedings such as NeurIPS, ICML, ICLR, ACL, EMNLP, CVPR, ICCV, ECCV, AAAI, and KDD.
  • Actual Figure understanding - extracts Figure images, captions, and surrounding method text; identifies panels, layout, modules, arrows, loops, branching, hierarchy, insets, and frozen/trainable encoding.
  • Figure-level multimodal ranking - ranks each Figure by topic (35%), visual structure (35%), multi-label intent (15%), source quality (10%), and recency (5%).
  • Explicit fallback provenance - image+text means the image was inspected; unavailable images are marked text-only and receive reduced structure confidence.
  • Evidence/appearance separation - the primary paper determines facts; retrieved figures influence visual grammar only.
  • Main-figure discipline - extracts the smallest set of components needed to communicate the paper's central contribution.
  • Four-gate critique - checks factual fidelity, character-level text correctness, thumbnail-scale readability, and semantic palette discipline.
  • No API key for retrieval - the included Python search utility uses public arXiv and OpenAlex endpoints and only the standard library.

Workflow

Paper / method notes
        |
        v
Target Visual Profile       Open literature paper recall
        |                              |
        |                    Candidate Figure extraction
        |                              |
        |              image + caption + method context
        |                              |
        +-------> VisualFigureProfile ranking <---------+
                         |
                         v
             Evidence-grounded Figure Brief
                         |
                         v
                  Main-figure generation
                         |
                         v
       Fidelity -> Text -> Readability -> Palette gates
                         |
                         v
        main-figure.png + brief.md + evidence.json

Install

git clone https://github.com/goya4140/PaperFigure.git
cp -R PaperFigure/paper-figure ~/.codex/skills/paper-figure

The default ar5iv extraction path uses only Python's standard library. Install the PDF fallback when needed:

python3 -m pip install -r PaperFigure/requirements.txt

Restart Codex after installation, then invoke the skill directly or let Codex select it automatically.

Use

Use $paper-figure to turn this paper into a publication-ready main figure:
https://arxiv.org/abs/2510.24940

You can provide an arXiv/proceedings URL, title, abstract, method section, draft, or structured notes. The standard deliverables are:

  • main-figure.png
  • brief.md
  • evidence.json
  • target-visual-profile.json
  • candidate VisualFigureProfile files
  • visual-ranking.json

For reproducible candidate discovery:

python3 paper-figure/scripts/search_open_literature.py \
  "open vocabulary segmentation language prompts SAM2" \
  --limit 8 \
  --output retrieval.json

Paper recall intentionally assigns no visual score. Continue with Figure extraction and multimodal profiling:

python3 paper-figure/scripts/figure_extractor.py 2602.08224 \
  --output-dir work/efficient-sam2 --max-figures 3

python3 paper-figure/scripts/visual_profile.py build-requests \
  work/efficient-sam2/figures.json \
  --paper-title "Efficient-SAM2" \
  --topic-text "efficient SAM2 segmentation" \
  --output work/profile-requests.json

# Inspect each image with a vision-capable model, save profile JSON, then:
python3 paper-figure/scripts/visual_profile.py validate work/profiles/*.json
python3 paper-figure/scripts/visual_ranker.py \
  --target target-visual-profile.json \
  --profiles work/profiles/*.json \
  --output visual-ranking.json

Supported multi-label intents are architecture, pipeline, training-inference, iterative-optimization, multi-agent, data-flow, and conceptual-comparison.

Multimodal ranking verification

The repository includes a real image-level verification run over five candidate Figures. Three method Figures were ranked for SemCoT, OpenWorldSAM, and DataRater; two attention/dataset grids were excluded after image inspection.

View inspected sources, profiles, score breakdowns, and results

Palette-optimized benchmark

PaperFigure now plans color as a semantic system instead of a collection of decorative hues: a pure-white publication canvas, one dark ink, pale role tints, no more than three chromatic roles plus neutrals, and an approximate 80/15/5 area balance that reserves saturated accent color for the paper's central intervention.

The complete ten-case gallery below now uses this protocol. The original 4DGS-1K regression, including its brief, pixel audit, and Gemini revision trace, remains available here.

Ten-case Codex vs Gemini benchmark

The benchmark contains ten PaperBananaBench diagram cases. The completed 4DGS-1K palette regression is retained, while the other nine cases were rerun for this update. For every case, the same palette-optimized prompt was supplied to the Codex image-generation path and Google's gemini-3.1-flash-image; narrow issue-specific revisions are noted, and unresolved failures remain visible.

Every image was inspected at original resolution against PaperFigure's four gates: factual fidelity, exact text, visual readability, and palette/white background. Codex passes all four gates on 10/10 cases and Gemini on 6/10; all 20 images pass the readability and palette gates. Open the full protocol, shared prompts, and structured results.

# Case Source Codex Gemini
1 SemCoT test.json:test_233 PASS PASS
2 OpenWorldSAM ref.json:ref_191 PASS PASS
3 DataRater diagram image collection PASS REJECTED
4 3D-Prover test.json:test_2 PASS REJECTED
5 4DGS-1K test.json:test_1 PASS PASS
6 MINI test.json:test_5 PASS REJECTED
7 DyFlow test.json:test_68 PASS PASS
8 AutoData ref.json:ref_26 PASS REJECTED
9 HyperGraphRAG ref.json:ref_123 PASS PASS
10 BIFROST-1 ref.json:ref_34 PASS PASS

1. SemCoT

CodexGemini 3.1 Flash Image
SemCoT Codex outputSemCoT Gemini output
PASS
Factual · Exact text · Readability · Palette
PASS
All four gates after targeted revision

2. OpenWorldSAM

CodexGemini 3.1 Flash Image
OpenWorldSAM Codex outputOpenWorldSAM Gemini output
PASS
Factual · Exact text · Readability · Palette
PASS
Factual · Exact text · Readability · Palette

3. DataRater

CodexGemini 3.1 Flash Image
DataRater Codex outputDataRater Gemini output
PASS
Factual · Exact text · Readability · Palette
REJECTED
Literal theta text still fails after revision

4. 3D-Prover

CodexGemini 3.1 Flash Image
3D-Prover Codex output3D-Prover Gemini output
PASS
All four gates after targeted revision
REJECTED
Predictor output topology still fails

5. 4DGS-1K

CodexGemini 3.1 Flash Image
4DGS-1K Codex output4DGS-1K Gemini output
PASS
Factual · Exact text · Readability · Palette
PASS
Factual · Exact text · Readability · Palette

6. MINI

CodexGemini 3.1 Flash Image
MINI Codex outputMINI Gemini output
PASS
All four gates after white-background revision
REJECTED
Duplicated backbone regions remain

7. DyFlow

CodexGemini 3.1 Flash Image
DyFlow Codex outputDyFlow Gemini output
PASS
Factual · Exact text · Readability · Palette
PASS
All four gates after targeted revision

8. AutoData

CodexGemini 3.1 Flash Image
AutoData Codex outputAutoData Gemini output
PASS
Factual · Exact text · Readability · Palette
REJECTED
Duplicated external Web endpoint remains

9. HyperGraphRAG

CodexGemini 3.1 Flash Image
HyperGraphRAG Codex outputHyperGraphRAG Gemini output
PASS
All four gates after white-background revision
PASS
Factual · Exact text · Readability · Palette

10. BIFROST-1

CodexGemini 3.1 Flash Image
BIFROST-1 Codex outputBIFROST-1 Gemini output
PASS
Factual · Exact text · Readability · Palette
PASS
All four gates after targeted revision

Repository layout

PaperFigure/
├── paper-figure/
│   ├── SKILL.md                 # Codex workflow and boundaries
│   ├── agents/openai.yaml       # Skill UI metadata
│   ├── references/              # Retrieval, profile, and critique protocols
│   └── scripts/                 # Paper recall, Figure extraction/profile/ranking
├── examples/                    # Benchmark runs and multimodal ranking evidence
├── tests/                       # Retrieval/ranking unit tests
├── LICENSE
└── README.md

Validate

python3 -m unittest discover -s tests -v
python3 paper-figure/scripts/visual_profile.py validate examples/multimodal-ranking/profiles/*.json
python3 /path/to/skill-creator/scripts/quick_validate.py paper-figure

Design principles

  1. The target paper is the authority for content.
  2. Retrieved papers are references for visual structure, never a license to copy a figure.
  3. Venue priority breaks ties; it does not rescue a weak topic or intent match.
  4. A concise main figure is better than a complete but unreadable method dump.
  5. If the method cannot be verified, PaperFigure stops at a draft brief instead of rendering false certainty.

License

MIT

About

Open-retrieval Codex skill for evidence-grounded, publication-ready AI paper main figures

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages