arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.18878cs.CL

LegalBench-BR: 一个用于评估大型语言模型在巴西法律决策分类上的基准

LegalBench-BR: A Benchmark for Evaluating Large Language Models on Brazilian Legal Decision Classification

Teresina, PI, Brazil(巴西蒂雷西纳州,PI)

Pedro Barbosa de Carvalho Neto

AI总结:

本文提出LegalBench-BR,首个公开的巴西法律文本分类评估基准,通过LoRA微调在消费级GPU上实现零边际推理成本,展示领域适应模型在巴西法律分类中的必要性。

摘要:

我们介绍了LegalBench-BR,首个公开的用于评估语言模型在巴西法律文本分类上的基准。数据集包含3,105份圣卡塔琳娜州法院(TJSC)的上诉案件,通过DataJud API(CNJ)收集并经过五类法律领域标注。在平衡测试集上,BERTimbau-LoRA仅更新0.3%的模型参数,达到87.6%的准确率和0.87宏F1(比Claude 3.5 Haiku高22个百分点,比GPT-4o mini高28个百分点)。在行政法(administrativo)类别上,GPT-4o mini的F1为0.00,Claude 3.5 Haiku为0.08,而微调模型达到0.91。两种商业LLM都系统性地偏向民法(civel),吸收模糊类别而非区分它们,这是领域适应微调所消除的失败模式。这些结果表明,通用LLM无法在巴西法律分类中替代领域适应模型,即使任务是简单的五类问题,并且LoRA微调在消费级GPU上实现了零边际推理成本。我们发布完整数据集、模型和流程,以促进葡萄牙法律NLP的可重复研究。

英文摘要:

We introduce LegalBench-BR, the first public benchmark for evaluating language models on Brazilian legal text classification. The dataset comprises 3,105 appellate proceedings from the Santa Catarina State Court (TJSC), collected via the DataJud API (CNJ) and annotated across five legal areas through LLM-assisted labeling with heuristic validation. On a class-balanced test set, BERTimbau-LoRA, updating only 0.3% of model parameters, achieves 87.6% accuracy and 0.87 macro-F1 (+22pp over Claude 3.5 Haiku, +28pp over GPT-4o mini). The gap is most striking on administrativo (administrative law): GPT-4o mini scores F1 = 0.00 and Claude 3.5 Haiku scores F1 = 0.08 on this class, while the fine-tuned model reaches F1 = 0.91. Both commercial LLMs exhibit a systematic bias toward civel (civil law), absorbing ambiguous classes rather than discriminating them, a failure mode that domain-adapted fine-tuning eliminates. These results demonstrate that general-purpose LLMs cannot substitute for domain-adapted models in Brazilian legal classification, even when the task is a simple 5-class problem, and that LoRA fine-tuning on a consumer GPU closes the gap at zero marginal inference cost. We release the full dataset, model, and pipeline to enable reproducible research in Portuguese legal NLP.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑