mlsanityData to 14 Oct 2026

Legal2LogicICL: Improving Generalization in Transforming Legal Cases to Logical Formulas via Diverse Few-Shot Learning

arXiv 2604.11699 ↗First posted 13 Apr 2026cs.CL cs.AI cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

This work aims to improve the generalization of logic-based legal reasoning systems by integrating recent advances in NLP with legal-domain adaptive few-shot learning techniques using LLMs. Existing logic-based legal reasoning pipelines typically rely on fine-tuned models to map natural-language legal cases into logical formulas before forwarding them to a symbolic reasoner. However, such approaches are heavily constrained by the scarcity of high-quality annotated training data. To address this limitation, we propose a novel LLM-based legal reasoning framework that enables effective in-context learning through retrieval-augmented generation. Specifically, we introduce Legal2LogicICL, a few-shot retrieval framework that balances diversity and similarity of exemplars at both the latent semantic representation level and the legal text structure level. In addition, our method explicitly accounts for legal structure by mitigating entity-induced retrieval bias in legal texts, where lengthy and highly specific entity mentions often dominate semantic representations and obscure legally meaningful reasoning patterns. Our Legal2LogicICL constructs informative and robust few-shot demonstrations, leading to accurate and stable logical rule generation without requiring additional training. In addition, we construct a new dataset, named Legal2Proleg, which is annotated with alignments between legal cases and PROLEG logical formulas to support the evaluation of legal semantic parsing. Experimental results on both open-source and proprietary LLMs demonstrate that our approach significantly improves accuracy, stability, and generalization in transforming natural-language legal case descriptions into logical representations, highlighting its effectiveness for interpretable and reliable legal reasoning. Our code is available at https://github.com/yingjie7/Legal2LogicICL.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 12 of its 27 references that are in the map. First posted on arXiv 13 Apr 2026.

Builds on

12 of 27 references.

References · 12

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  4. 2025Qwen3 Technical Reportcited by 8,820
  5. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  6. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  7. 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
  8. 2022Active Example Selection for In-Context Learningcited by 196
  9. 2022Diverse Demonstrations Improve In-context Compositional Generalizationcited by 139
  10. 2021Controllable Semantic Parsing via Retrieval Augmentationcited by 35
  11. 2022Structurally Diverse Sampling for Sample-Efficient Training and Comprehensive Evaluationcited by 8
  12. 2024Diversity Over Quantity: A Lesson From Few Shot Relation Classificationcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Elevating Legal LLM Responses: Harnessing Trainable Logical Structures and Semantic Knowledge with Legal Reasoning
  2. 2024Exploiting LLMs' Reasoning Capability to Infer Implicit Concepts in Legal Information Retrieval
  3. 2026Legal-R1: Agentic Retrieval for Evidence-Based Legal Reasoning
  4. 2024Leveraging Large Language Models for Relevance Judgments in Legal Case Retrieval
  5. 2024KRAG Framework for Enhancing LLMs in the Legal Domain
  6. 2025When Large Language Models Meet Law: Dual-Lens Taxonomy, Technical Advances, and Ethical Governance
  7. 2024CBR-RAG: Case-Based Reasoning for Retrieval Augmented Generation in LLMs for Legal Question Answering
  8. 2023One Law, Many Languages: Benchmarking Multilingual Legal Reasoning for Judicial Support