Deterministic Fuzzy Triage for Legal Compliance Classification and Evidence Retrieval
Organizations: Serval Systems
Abstract
Legal teams increasingly use machine learning to triage large volumes of contractual evidence, but many models are opaque, non-deterministic, and difficult to align with frameworks such as HIPAA or NERC-CIP. We study a simple, reproducible alternative based on deterministic dual encoders and transparent fuzzy triage bands. We train a RoBERTa-base dual encoder with a 512-dimensional projection and cosine similarity on the ACORD benchmark for graded clause retrieval, then fine-tune it on a CUAD-derived binary compliance dataset. Across five random seeds (40-44) on a single NVIDIA A100 GPU, the model achieves ACORD-style retrieval performance of NDCG@5 0.38-0.42, NDCG@10 0.45-0.50, and 4-star Precision@5 about 0.37 on the test split. On CUAD-derived binary labels, it achieves AUC 0.98-0.99 and F1 0.22-0.30 depending on positive-class weighting, outperforming majority and random baselines in a highly imbalanced setting with a positive rate of about 0.6%. We then map scalar compliance scores into three regions: auto-noncompliant, auto-compliant, and human-review. Thresholds are tuned on validation data to maximize automatic decision coverage subject to an empirical error-rate constraint of at most 2% over auto-decided examples. The result is a seed-stable system summarized by a small number of scalar parameters. We argue that deterministic encoders, calibrated fuzzy bands, and explicit error constraints provide a practical middle ground between hand-crafted rules and opaque large language models, supporting explainable evidence triage, reproducible audit trails, and concrete mappings to legal review concepts.
Figures & tables
| Method | N@5 | N@10 | P4@5 | Q |
|---|---|---|---|---|
| Dual enc. ( ) | 0.422 | 0.496 | 0.371 | 57 |
| Dual enc. ( ) | 0.378 | 0.452 | 0.371 | 57 |
| Method | Prec | Rec | F1 |
|---|---|---|---|
| Majority (all neg.) | 0.000 | 0.000 | 0.000 |
| Random | 0.006 | 0.504 | 0.013 |
| Dual enc. ( ) | 0.256 | 0.200 | 0.224 |
| Dual enc. ( ) | 0.174 | 0.975 | 0.295 |
Legal NLP
Legal natural language processing (NLP) develops methods for analyzing and generating statutes, cases, contracts, and legal advice.
See all 109 papers