ViLegalNLI: Natural Language Inference for Vietnamese Legal Texts

arXiv cs.AI / 5/4/2026

💬 OpinionDeveloper Stack & InfrastructureModels & Research

Key Points

  • The paper introduces ViLegalNLI, a large-scale Vietnamese natural language inference (NLI) dataset tailored specifically to the legal domain, built from official statutory documents and labeled with entailment vs. non-entailment.
  • ViLegalNLI contains 42,012 premise–hypothesis pairs spanning multiple legal domains, reflecting realistic legal reasoning features such as conditional clauses, structured logic, and domain-specific terminology.
  • The authors propose a semi-automatic dataset construction pipeline that uses large language models for controlled hypothesis generation and includes quality validation, artifact mitigation, and cross-model checks to improve label reliability and legal consistency.
  • Experiments across multilingual models, Vietnamese pretrained language models, and instruction-tuned LLMs show that few-shot LLM setups perform best, with accuracy strongly affected by hypothesis length, lexical overlap, and reasoning complexity.
  • Cross-domain tests highlight that legal NLI generalization remains challenging across different legal fields, and the dataset is released publicly to support future work in legal reasoning and trustworthy AI for legal analysis.

Abstract

In this article, we introduce ViLegalNLI, the first large-scale Vietnamese Natural Language Inference (NLI) dataset specifically constructed for the legal domain. The dataset consists of 42,012 premise-hypothesis pairs derived from official statutory documents and annotated with binary inference labels (Entailment and Non-entailment). It covers multiple legal domains and reflects realistic legal reasoning scenarios characterized by structured logic, conditional clauses, and domain-specific terminology. To construct ViLegalNLI, we propose a semi-automatic data generation framework that integrates large language models for controlled hypothesis generation and systematic quality validation procedures. The framework incorporates artifact mitigation strategies and cross-model validation to improve annotation reliability and ensure legal consistency. The resulting dataset captures diverse reasoning patterns, including paraphrasing, logical implication, and legally invalid inferences, thereby providing a comprehensive benchmark for Vietnamese legal inference tasks. We conduct extensive experiments on the ViLegalNLI using multilingual models, Vietnamese-specific pretrained language models, and instruction-tuned large language models. The results show that few-shot LLM configurations consistently achieve superior performance, while performance is significantly influenced by hypothesis length, lexical overlap, and reasoning complexity. Cross-domain evaluations further reveal the challenges of generalizing legal inference across distinct legal fields. Overall, ViLegalNLI establishes a foundational benchmark for Vietnamese legal NLI and supports future research in legal reasoning, statutory text understanding, and the development of reliable AI systems for legal analysis and decision support. The dataset is publicly available for research purposes.