Facilitating Long Context Understanding via Supervised Chain-of-Thought Reasoning
Jingyang Lin, Andy Wong, Tian Xia, Shenghua He, Hui Wei, Mei Han, Jiebo Luo
TL;DR
The paper tackles the challenge of long-context understanding in LLMs by introducing LongFinanceQA, a synthetic long-context QA dataset annotated with intermediate chain-of-thought reasoning. It presents Property-based Agentic Inference (PAI), a three-step framework that generates reasoning-augmented answers, and demonstrates that fine-tuning a lightweight model with supervised CoT (LongPAI) substantially improves long-context performance. Empirical results on the Loong and ∞Bench benchmarks show substantial gains for both PAI (as data annotator) and LongPAI (as a trained model), including strong gains over baselines and competitive results against teacher models, while also highlighting efficiency advantages. The work emphasizes the importance of explicit intermediate reasoning for long-context tasks and provides a scalable approach to producing high-quality reasoning data for domain-specific applications.
Abstract
Recent advances in Large Language Models (LLMs) have enabled them to process increasingly longer sequences, ranging from 2K to 2M tokens and even beyond. However, simply extending the input sequence length does not necessarily lead to effective long-context understanding. In this study, we integrate Chain-of-Thought (CoT) reasoning into LLMs in a supervised manner to facilitate effective long-context understanding. To achieve this, we introduce LongFinanceQA, a synthetic dataset in the financial domain designed to improve long-context reasoning. Unlike existing long-context synthetic data, LongFinanceQA includes intermediate CoT reasoning before the final conclusion, which encourages LLMs to perform explicit reasoning, improving accuracy and interpretability in long-context understanding. To generate synthetic CoT reasoning, we propose Property-based Agentic Inference (PAI), an agentic framework that simulates human-like reasoning steps, including property extraction, retrieval, and summarization. We evaluate PAI's reasoning capabilities by assessing GPT-4o-mini w/ PAI on the Loong benchmark, outperforming standard GPT-4o-mini by 20.0%. Furthermore, we fine-tune LLaMA-3.1-8B-Instruct on LongFinanceQA, achieving a 28.0% gain on Loong's financial subset.
