Contrast Is All You Need
Abstract: In this study, we analyze data-scarce classification scenarios, where available labeled legal data is small and imbalanced, potentially hurting the quality of the results. We focused on two finetuning objectives; SetFit (Sentence Transformer Finetuning), a contrastive learning setup, and a vanilla finetuning setup on a legal provision classification task. Additionally, we compare the features that are extracted with LIME (Local Interpretable Model-agnostic Explanations) to see which particular features contributed to the model's classification decisions. The results show that a contrastive setup with SetFit performed better than vanilla finetuning while using a fraction of the training samples. LIME results show that the contrastive learning approach helps boost both positive and negative features which are legally informative and contribute to the classification results. Thus a model finetuned with a contrastive objective seems to base its decisions more confidently on legally informative features.
- BERT goes to law school: Quantifying the competitive advantage of access to large legal corpora in contract understanding, CoRR abs/1911.00473 (2019). URL: http://arxiv.org/abs/1911.00473. arXiv:1911.00473.
- CUAD: an expert-annotated NLP dataset for legal contract review, CoRR abs/2103.06268 (2021). URL: https://arxiv.org/abs/2103.06268. arXiv:2103.06268.
- Ledgar: A large-scale multi-label corpus for text classification of legal provisions in contracts, in: International Conference on Language Resources and Evaluation, 2020.
- Attention is all you need, CoRR abs/1706.03762 (2017). URL: http://arxiv.org/abs/1706.03762. arXiv:1706.03762.
- LEGAL-BERT: The muppets straight out of law school, in: Findings of the Association for Computational Linguistics: EMNLP 2020, Association for Computational Linguistics, Online, 2020, pp. 2898–2904. URL: https://aclanthology.org/2020.findings-emnlp.261. doi:10.18653/v1/2020.findings-emnlp.261.
- "why should I trust you?": Explaining the predictions of any classifier, in: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, August 13-17, 2016, 2016, pp. 1135–1144.
- N. Limsopatham, Effectively leveraging BERT for legal document classification, in: Proceedings of the Natural Legal Language Processing Workshop 2021, Association for Computational Linguistics, Punta Cana, Dominican Republic, 2021, pp. 210–216. URL: https://aclanthology.org/2021.nllp-1.22. doi:10.18653/v1/2021.nllp-1.22.
- Extracting contract elements, in: Proceedings of the 16th Edition of the International Conference on Articial Intelligence and Law, ICAIL ’17, Association for Computing Machinery, New York, NY, USA, 2017, p. 19–28. URL: https://doi.org/10.1145/3086512.3086515. doi:10.1145/3086512.3086515.
- S. M. Lundberg, S. Lee, A unified approach to interpreting model predictions, CoRR abs/1705.07874 (2017). URL: http://arxiv.org/abs/1705.07874. arXiv:1705.07874.
- Grad-cam: Why did you say that? visual explanations from deep networks via gradient-based localization, CoRR abs/1610.02391 (2016). URL: http://arxiv.org/abs/1610.02391. arXiv:1610.02391.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.