Abstract
We present JEC-QA, the largest question answering dataset in the legal domain, collected from the National Judicial Examination of China. The examination is a comprehensive evaluation of professional skills for legal practitioners. College students are required to pass the examination to be certified as a lawyer or a judge. The dataset is challenging for existing question answering methods, because both retrieving relevant materials and answering questions require the ability of logic reasoning. Due to the high demand of multiple reasoning abilities to answer legal questions, the state-of-the-art models can only achieve about 28% accuracy on JEC-QA, while skilled humans and unskilled humans can reach 81% and 64% accuracy respectively, which indicates a huge gap between humans and machines on this task. We will release JEC-QA and our baselines to help improve the reasoning ability of machine comprehension models.
Introduction
Legal Question Answering (LQA) represents a significant challenge in Natural Language Processing. Unlike standard reading comprehension tasks that often rely on simple factoid retrieval, LQA requires understanding the "law of the needle" rather than just finding it. Professionals must retrieve relevant statutes and then apply abstract logic to complex, real-world scenarios.
The authors identify two primary hurdles in LQA research:
- Data Scarcity: Previous legal datasets were insufficient for training modern deep learning models effectively.
- Reasoning Complexity: Legal questions frequently demand "multi-hop" reasoning—synthesizing information from multiple laws and facts to reach a legal conclusion.
To address these, the authors introduced JEC-QA, modeled after the National Judicial Examination of China (NJEC), one of the world's most rigorous professional exams with a pass rate of approximately 10%.
Dataset Characteristics
JEC-QA consists of 26,365 multiple-choice questions, making it roughly 50 times larger than previous legal QA benchmarks. The dataset is supported by a comprehensive knowledge base derived from the National Unified Legal Professional Qualification Examination Counseling Book and a collection of 3,382 distinct Chinese legal provisions.
The data is categorized into two main types:
- Knowledge-Driven (KD): Testing the understanding of legal definitions and concepts.
- Case-Analysis (CA): Requiring the application of law to specific factual scenarios.
Methodology
The researchers developed an OpenQA framework consisting of two main stages:
- Retrieval: Utilizing ElasticSearch to identify relevant paragraphs from the legal database.
- Reading Comprehension (RC): Adapting seven neural models (including BERT, Co-matching, and SeaReader) to select the correct answer from four options based on the retrieved text. These models were modified to handle multi-paragraph inputs and multi-answer formats.
The Reasoning Gap
A core finding of the study is the "Reasoning Gap." The paper identifies five levels of reasoning: Word Matching, Concept Understanding, Numerical Analysis, Multi-Paragraph Reading, and Multi-Hop Reasoning. While models perform adequately at word matching, they struggle with multi-hop reasoning, which is essential for over 66% of case-analysis questions.
Key insights include:
- Retrieval is Insufficient: Even in an "All Hit" scenario—where models are manually provided with the exact correct paragraphs—the best model achieved only 32% accuracy. This indicates that the bottleneck is legal understanding, not just retrieval.
- Human Advantage: Skilled legal professionals reach 81.12% accuracy, while even unskilled humans (non-experts) reach 64.21%. This suggests that basic human logic and linguistic common sense are currently absent in AI models.
- Numerical Complexity: Models consistently fail at tasks requiring basic mathematical calculations, such as determining if a financial loss meets a specific statutory threshold.
Results and Conclusion
The best-performing model, Multi-Matching, achieved only 28.63% overall accuracy, highlighting a massive performance gap compared to humans. While models performed slightly better on Knowledge-Driven questions than Case-Analysis questions, the overall performance remains low across the board.
The authors conclude that future LQA systems must move beyond pure text processing. Integrating structured legal knowledge graphs and sophisticated multi-hop reasoning architectures will be essential to mimic the cognitive processes of legal professionals.
The dataset is available at http://jecqa.thunlp.org/.
Summary updated