NEEDLEINATABLE: Exploring Long-Context Capability of Large Language Models towards Long-Structured Tables
December 30, 2025 ยท View on GitHub
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:
- Lanrui Wang: oliveerwang@tencent.com
Paper Link: arXiv:2504.06560