Retrieval-Based Multi-Label Legal Annotation: Extensible, Data-Efficient and Hallucination-Free

Li Zhang, Jaromir Savelka, Kevin Ashley

arXiv:2605.16767 · 2026-05-19 공개 · arXiv · PDF

data-efficient multi-label retrieval-models legal-annotation hallucination-free k-nearest-neighbors eurlex ecthr-a

Abstract

Multi-label legal annotation requires assigning multiple labels from large, evolving taxonomies to long, fact-intensive documents, often under limited supervision. Parametric encoders typically require task-specific training and retraining when the label set changes, while prompting generative large language models becomes costly and degrades as the label space grows. We cast legal annotation as retrieval: we embed documents and label descriptions with a frozen retrieval model and predict labels via k-nearest neighbors in the embedding space, enabling updates by re-embedding and re-indexing rather than gradient-based backpropagation. Across three legal datasets (ECtHR-A, ECtHR-B, and Eurlex with 100 labels), retrieval achieves competitive accuracy and strong data efficiency; on Eurlex, Qwen-8B retrieval improves Macro-F1 from 40.41 (GPT-5.2, zero-shot) to 49.12 while reducing estimated compute by 20-30 times compared to fine-tuning. With only (N=100) training samples, retrieval nearly doubles Micro-F1 over hierarchical Legal-BERT on ECtHR-A (48.29 vs. 27.87). We also quantify a reliability failure mode of generative inference: GPT-5.2 hallucinates labels outside the provided taxonomy in 0.12-0.9% of test samples under deterministic decoding. In contrast, retrieval strictly respects defined label sets, eliminating hallucination by design. These results suggest retrieval-model-based annotators are a practical, deployable alternative for high-cardinality and rapidly changing legal label spaces.

한국어 요약

📋 한 줄 요약

**[법률 NLP]** 법률 문서의 다중 라벨 주석 문제를 retrieval로 재정의하여 환각 없이, 라벨 변경에도 재학습 없이 동작하는 데이터 효율적 시스템을 제안했다.

🎯 핵심 기여도

💡 핵심 아이디어

법률 라벨 체계는 크고 자주 바뀌며 문서는 길고 사실 중심이다. 파라미터 인코더는 라벨 변경 시 재학습이 필요하고, 생성형 LLM은 라벨 공간이 커질수록 비용·환각이 증가한다. 문서와 라벨 설명을 같은 임베딩 공간에 두고 kNN으로 라벨을 예측하면, 라벨 변경은 단순한 재임베딩·재인덱싱으로 처리되며 정의된 라벨 집합 외부로의 환각이 구조적으로 불가능해진다.

🔬 기술적 접근법

📊 주요 결과

💭 의의 및 한계

환각이 곧 법적 리스크인 도메인에서 "정의된 라벨만 보장"이라는 강한 안전 속성을 설계 수준에서 확보한 점이 중요하다. retrieval 모델 품질에 성능이 의존하며, ECtHR/Eurlex 외 다른 법체계·언어로의 일반화 검증은 더 필요하다.

🚀 실용적 활용

판례 분류, 규제 태깅, 계약 조항 매핑 등 라벨 체계가 크고 자주 바뀌는 법률·규제·컴플라이언스 워크플로에서 운영 가능한 대안으로, 사내 KMS·legal-tech 솔루션의 핵심 분류 엔진으로 배포할 수 있다.