NDA clause model

Can a small model read a non-disclosure agreement and say, for 17 standard clauses, whether the contract includes each one, rules it out or never mentions it, and quote the sentences that show it? Trained on public contracts, then tested once on a sealed set it had never seen: 84.5% accuracy.

Made
Written by
Claude Code, directed by me
Built with
DeBERTa-v3-base, PyTorch, one rented GPU
Status
Concluded; runs locally on a CPU

The question

Reading an NDA is mostly checking the same things every time. Can the other side share it with advisers? Must it be returned at the end? Does anything survive termination? I wanted to know whether a model small enough to run on a laptop, with nothing sent to a cloud service, could do that checking reliably, and show its working.

How it works

The sealed test

The 123 test contracts were never touched while the model was being built. Every choice was made on the development set. At the end, all four candidate checkpoints were run on the test set together, in one pass, and all four are reported below, so the winner can't have been picked after seeing the results. The one adopted, seed 9, was already the front-runner on the development set.

84.5%verdicts correct, 2,091 clause checks
0.741F1 for the quoted evidence
0.788macro F1 across the three answers
31%the same checks by an off-the-shelf NLI model, untuned

The comparison is a general-purpose NLI model (MiniLM) used as it comes, with no training on contracts, on a 340-row development sample. The test score was also slightly higher than the development score (0.836 accuracy, 0.763 macro F1), so choosing a checkpoint on the development set didn't overfit it.

All four candidates on the sealed test
CandidateAccuracyMacro F1Evidence F1
Seed 20.8280.7690.670
Seed 70.7970.7210.559
Seed 80.8170.7710.725
Seed 9 (adopted)0.8450.7880.741

Where it's strong, and where it isn't

Seed 9 on the sealed test, by answer
AnswerPrecisionRecallF1
Entailment0.8240.9340.876
NotMentioned0.9240.8100.863
Contradiction0.6500.6000.624

Contradiction, the rare class, is the weakest, and it's also the one that matters most in practice: it's where a contract says the opposite of what you'd expect. Clause by clause, accuracy runs from 100% for "no reverse engineering" to 57% for "may keep some confidential information after returning it".

All 17 clauses
ClauseAccuracy95% interval
No reverse engineering1.0000.970–1.000
No solicitation0.9670.919–0.987
May develop similar information0.9590.908–0.983
May acquire similar information0.9430.887–0.972
Notice on compelled disclosure0.9430.887–0.972
No licensing0.9190.857–0.955
Confidentiality of the agreement itself0.9020.837–0.943
Limited use0.8940.828–0.937
Sharing with employees0.8540.781–0.905
Includes verbally conveyed information0.8370.762–0.892
Survival of obligations0.8370.762–0.892
Return of confidential information0.8050.726–0.865
Only technical information0.7970.717–0.858
May make copies0.7480.665–0.816
Must be explicitly identified0.7240.639–0.795
Sharing with third parties0.6670.579–0.744
May keep some after return or destruction0.5690.481–0.653

What didn't work

Limits