NEEDLEINATABLE: Exploring Long-Context Capability of Large Language Models towards Long-Structured Tables

December 30, 2025 ยท View on GitHub

arXiv License: MIT

This repository contains the official implementation and data for the paper "NEEDLEINATABLE: Exploring Long-Context Capability of Large Language Models towards Long-Structured Tables", accepted at NeurIPS 2025.

๐Ÿ“– Overview

NEEDLEINATABLE (NIAT) is a benchmark designed to evaluate the fine-grained perception of Large Language Models (LLMs) regarding individual table cells within long-context structured tables. Unlike previous benchmarks that focus on high-level reasoning or unstructured text, NIAT treats each cell as a "needle" to test the model's fundamental understanding of table structures.

We also introduce a Strong2Weak data synthesis method, using GPT-4o to generate Chain-of-Thought (CoT) training data, which significantly improves open-source model performance on both NIAT and downstream tabular tasks.

โš ๏ธ Data Availability Note

Note: Due to the massive size of the original QA (Question-Answer) dataset (up to 287K questions), we have uploaded all original raw tables but only a random sample of the QA pairs in this repository for demonstration and testing purposes.

If you require the full training/testing dataset, please contact the authors.

๐Ÿ“‚ Project Structure

Below is an overview of the repository structure and the function of each module:

NeedleInATable/
โ”œโ”€โ”€ data_synthesis/                 # Data synthesis modules
โ”‚   โ”œโ”€โ”€ synthetic_table/            # Core synthesis scripts
โ”‚   โ”‚   โ”œโ”€โ”€ build_cell-locating.py  # Script for cell location tasks
โ”‚   โ”‚   โ””โ”€โ”€ build_cell-lookup.py    # Script for cell retrieval tasks
โ”‚   โ””โ”€โ”€ promptp_cot4_cell-locating.py # CoT prompts for location tasks
โ”œโ”€โ”€ NIAT_data/                      # Evaluation datasets
โ”‚   โ”œโ”€โ”€ NIAT_LLM_test_data/         # Benchmarks for text-based LLMs
โ”‚   โ”‚   โ”œโ”€โ”€ cell-locating/          # Location task samples
โ”‚   โ”‚   โ”œโ”€โ”€ cell-lookup/            # Retrieval task samples
โ”‚   โ”‚   โ””โ”€โ”€ NIAT_cropped_tables.json # Cropped table data (JSON)
โ”‚   โ”œโ”€โ”€ NIAT_MLLM_test_data/        # Benchmarks for Vision-Language Models
โ”‚   โ”‚   โ”œโ”€โ”€ cropped_table_images/   # Cropped table screenshots
โ”‚   โ”‚   โ”œโ”€โ”€ table_images/           # Full table screenshots
โ”‚   โ”‚   โ”œโ”€โ”€ vlm_cell_locating.json  # VLM location annotations
โ”‚   โ”‚   โ”œโ”€โ”€ vlm_cell_locating_50.json # VLM location subset (50 samples)
โ”‚   โ”‚   โ””โ”€โ”€ vlm_cell_lookup.json    # VLM retrieval annotations
โ”‚   โ””โ”€โ”€ 360_NIAT_tables.json        # Main source table collection
โ””โ”€โ”€ README.md                       # Project documentation

๐Ÿ“œ Citation

If you use this code or dataset in your research, please cite our paper:

@inproceedings{wang2025needleinatable,
  title={NEEDLEINATABLE: Exploring Long-Context Capability of Large Language Models towards Long-Structured Tables},
  author={Wang, Lanrui and Zheng, Mingyu and Tang, Hongyin and Lin, Zheng and Cao, Yanan and Wang, Jingang and Cai, Xunliang and Wang, Weiping},
  booktitle={39th Conference on Neural Information Processing Systems (NeurIPS 2025)},
  year={2025}
}

๐Ÿ“ง Contact

For inquiries regarding the full dataset or the codebase, please contact:

Paper Link: arXiv:2504.06560