Research map / Large language models / Language, safety and interpretability
SAIL: Sample-Centric In-Context Learning for Document Information Extraction
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes SAIL, a training-free sample-centric in-context learning method for document information extraction that selects per-sample layout-similar, entity-level text-similar, and document-level text-similar examples and fills a unified prompt template.
Problem
Training-free document information extraction from visually rich documents struggles with understanding layout-text relationships and with giving precise, model-agnostic guidance to LLMs via fixed in-context examples.
Approach
Select tailored demonstrations for each test sample using three similarity signals (document-level text via Sentence-BERT, entity-level text via nearest-neighbor entity search, and layout similarity via MSE on rendered box images), and place them in a unified ICL prompt template with an LLM-generated layout analysis step.
Key results
- SAIL with GPT-4 reaches 84.67 F1 on FUNSD, 96.41 on CORD, and 98.18 on SROIE, versus 78.94, 87.47, 89.23 for ICL-D3IE with GPT-4.
- SAIL with ChatGLM3 drops only about 12.7% on SROIE when switching from GPT-3.5 (85.03 F1), while ICL-D3IE drops 73.8% (18.83 F1).
- GPT-4o multimodal baseline achieves 50.72 F1 on FUNSD, 71.53 on CORD, and 47.49 on SROIE, below SAIL.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use SAIL instead of ICL-D3IE | GPT-3.5 DIE · CORD | F1: 87.13 -> 95.80 | Helped |
| Use adaptive rather than fixed examples (ablation) | GPT-3.5 SAIL · CORD | F1: 82.35 -> 95.80 | Helped |
| Add layout-similar examples to document-level examples (ablation) | GPT-3.5 SAIL · CORD | F1: 92.13 -> 92.97 | Helped |
| Add entity-level similar examples to document-level examples (ablation) | GPT-3.5 SAIL · CORD | F1: 92.13 -> 92.51 | Helped |
| Add entity-level similar examples to document-level and layout examples (ablation) | GPT-3.5 SAIL · FUNSD | F1: 73.13 -> 83.48 | Helped |
| Add layout-similar examples to document-level and entity-level examples (ablation) | GPT-3.5 SAIL · CORD | F1: 92.51 -> 95.80 | Helped |
| Sort layout and text examples consistently, highest similarity first (ablation) | GPT-3.5 SAIL · CORD | F1: 94.73 -> 95.80 | Helped |
| Replace cosine layout comparison with MSE (ablation) | GPT-3.5 SAIL · CORD | F1: 94.73 -> 95.80 | Helped |
| Use cropped-image box coordinates instead of original-image boxes (ablation) | GPT-3.5 SAIL · CORD | F1: 95.11 -> 95.42 | Helped |
| Include box coordinates in entity-level demonstrations (ablation) | GPT-3.5 SAIL · FUNSD | F1: 79.43 -> 82.20 | Helped |
| Increase entity-level text examples from two to four (ablation) | GPT-3.5 SAIL · FUNSD | F1: 82.20 -> 83.48 | Helped |
| Reduce the example pool to 30 examples (ablation) | GPT-3.5 SAIL · CORD | F1: 95.80 -> 84.57 | Hurt |
Surprising findings
- Document-level text similarity examples alone gave lower F1 than fixed random examples on the long-text FUNSD dataset (69.60 vs 69.87 with none).
- Pulling layout images into a 1D vector for cosine similarity markedly reduced F1 (94.73) compared to MSE or SSIM on layout images (95.80, 95.42).
Limitations
- Search process adds time cost (13.3% with GPT-4).
- Diverse per-sample examples increase total token count.
- Reported results depend on API LLMs and specific prompt budgets (e.g., 4 examples per type limited by token count).
Experimental setup
Datasets: FUNSD CORD SROIE
Benchmarks: FUNSD CORD SROIE
Metrics: entity-level F1 precision recall
Baselines: ICL-D3IE Standard ICL BERT LiLT BROS XYLayoutLM LayoutLM LayoutLMv2 LayoutLMv3 GPT-4o LLaVA-v1.5-7B
Builds on: ICL-D3IE Sentence-BERT in-context learning
Closest papers by meaning
- In-Context Pretraining: Language Modeling Beyond Document Boundaries (ICLR 2024 · similarity 0.86)
- Relation-Rich Visual Document Generator for Visual Information Extraction (CVPR 2025 · similarity 0.86)
- A Simple yet Effective Layout Token in Large Language Models for Document Understanding (CVPR 2025 · similarity 0.85)
- DocKS-RAG: Optimizing Document-Level Relation Extraction through LLM-Enhanced Hybrid Prompt Tuning (ICML 2025 · similarity 0.84)
- Adaptive Markup Language Generation for Contextually-Grounded Visual Document Understanding (CVPR 2025 · similarity 0.84)
- DocLayLLM: An Efficient Multi-modal Extension of Large Language Models for Text-rich Document Understanding (CVPR 2025 · similarity 0.84)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
