FineCat-NLI v2 Small — WSP edit
Experimental. This is
finecat-nli-v2-swith a small gradient-free weight edit found by weight-space programming (WSP): only the classification head changed (2 of its 3 rows, plus the calibrated temperature folded in); every other weight is identical. OpenNLI Skill Index 47.1 → 47.5, calibration error 8.8 → 7.8. See WSP findings.
Natural Language Inference (NLI): the Swiss Army knife of encoders
Provide a text (premise) and statement (hypothesis), and it returns calibrated probabilities
that the text entails, contradicts, or is neutral to the statement.
A multiple-choice question is one statement per option.
Examples
| Use | Text → statement | Result |
|---|---|---|
| Routing / triage | request → "The user wants to set an alarm." | 96.0% (MASSIVE intents) |
| RAG grounding | retrieved passages → generated answer | 0.77 F1 (RAGTruth) |
| Guardrails / Moderation | message → policy statement | 90.8% (CrossingGuard), 92.7% (Wikipedia insults) |
| Zero-shot classification / tagging | review → "This review is positive." | 87.8% (18 tasks) |
| Clinical extraction | clinical note → "The patient is unemployed." | 97.9% (SDOH-NLI) |
68M parameters · documents up to 8k tokens · ~5,600 pairs/s · Apache-2.0
from sentence_transformers import CrossEncoder
model = CrossEncoder("dleemiller/finecat-nli-v2-s-wsp")
text = "My credit card was billed twice for one purchase."
labels = ["billing", "shipping", "account access"]
probs = model.predict([(text, f"This text is about {l}.") for l in labels], apply_softmax=True)
print({l: round(float(p[0]), 3) for l, p in zip(labels, probs)}) # p[0] = P(entailment)
# {'billing': 0.87, 'shipping': 0.03, 'account access': 0.12}
More in Recommended Applications and the 45-dataset evaluation.
Table of Contents
- WSP findings
- NLI Evaluation Results
- Usage
- Recommended Applications
- Extended Evaluation (45 datasets)
- Training Details
- Acknowledgments
- Citation
WSP findings
An LLM agent edited the weights directly from forward-pass reads and probe sets (no training), looking for unexpected behaviour: confident errors a model of this size should not make. This edit rolls up the recipe first found on finecat-nli-v2-xxs-wsp.
- Denied structural entailments. Entailments that keep part of the premise are read as neutral: relative-clause deletion, object relative clauses, modus ponens, conditionals. The encoder already separates them from look-alike traps (linear probe AUC ≈ 0.95 at the classifier input); the readout did not use it.
- The edit: one classifier-input direction, fitted to repair those denials while held invisible on a pool of the model's own unsure not-entailed families, added to the entailment row and subtracted (half as much) from the neutral row.
- What did not work: an installed, gated MLP unit (an Oskin-style detector neuron) beat a same-slot random control on the targets but cost monotonicity and negation reasoning on the real benchmarks (NMoNLI, MED), so it was removed; steering and head edits never beat their controls.
- Result: Skill Index 47.1 → 47.5 (as shipped 45.6 → 47.5, the temperature is folded in), ECE 8.8 → 7.8, overall accuracy 0.7693 → 0.7679. Largest Skill gains: seahorse +0.274, frank_sent +0.082, hans +0.062, legal_domain +0.024; largest losses: bionli -0.057, conjnli -0.041, vast -0.027, fol -0.024. The gain is concentrated in grounding and hallucination detection and in HANS; accuracy is slightly lower (macro −0.15 pt; 45-set 0.7703 vs 0.7718).
NLI Evaluation Results
Comparison on the OpenNLI leaderboard (v0.2.9). finecat-nli-v2-m is shown for reference (not ranked). WSP models share their base model's architecture, so they use its measured throughput.
| Model | Params | Skill Index | Accuracy | mnli | mnli_mismatched | snli | anli_r1 | anli_r2 | anli_r3 | wanli | lingnli | CAL | Throughput (pairs/s) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dleemiller/finecat-nli-v2-m | 150M | 52.7 | 0.7942 | 0.8953 | 0.8946 | 0.9221 | 0.7050 | 0.5190 | 0.4983 | 0.7448 | 0.8499 | 7.5 | 2,836 |
dleemiller/finecat-nli-v2-s-wsp | 68M | 47.5 | 0.7679 | 0.8628 | 0.8625 | 0.9058 | 0.6660 | 0.5120 | 0.4717 | 0.7230 | 0.7998 | 7.8 | 5,591 |
dleemiller/finecat-nli-v2-s | 68M | 47.1 | 0.7693 | 0.8671 | 0.8663 | 0.9084 | 0.6590 | 0.4990 | 0.4700 | 0.7228 | 0.7992 | 8.8 | 5,591 |
dleemiller/finecat-nli-v2-xs | 32M | 39.1 | 0.7233 | 0.8152 | 0.8179 | 0.8847 | 0.5890 | 0.4640 | 0.4550 | 0.6810 | 0.7360 | 9.6 | 14,505 |
sileod/deberta-v3-xsmall-tasksource-nli* | 71M | 21.1 | 0.6143 | 0.8411 | 0.8526 | 0.8718 | 0.5490 | 0.3880 | 0.4158 | 0.6934 | 0.7708 | 14.8 | 7,492 |
dleemiller/EttinX-nli-s | 68M | 9.9 | 0.5468 | 0.8765 | 0.8795 | 0.9124 | 0.3340 | 0.2810 | 0.3083 | 0.6234 | 0.8012 | 27.4 | 5,570 |
cross-encoder/nli-deberta-v3-xsmall | 71M | 6.1 | 0.5301 | 0.8781 | 0.8780 | 0.9167 | 0.3600 | 0.3020 | 0.3192 | 0.6108 | 0.8117 | 37.2 | 7,466 |
cross-encoder/nli-MiniLM2-L6-H768 | 82M | 3.8 | 0.5126 | 0.8658 | 0.8688 | 0.9131 | 0.3080 | 0.2820 | 0.2892 | 0.5824 | 0.7898 | 34.5 | 14,016 |
cross-encoder/nli-distilroberta-base | 82M | 1.8 | 0.4899 | 0.8367 | 0.8394 | 0.8997 | 0.2670 | 0.2810 | 0.2950 | 0.5522 | 0.7523 | 34.5 | 14,066 |
* trained on one or more OpenNLI test sets; those scores are replaced by estimates, as on the leaderboard.
Usage
Label Map:
entailment: 0neutral: 1contradiction: 2
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load the model and run inference.
from sentence_transformers import CrossEncoder
import numpy as np
model = CrossEncoder("dleemiller/finecat-nli-v2-s-wsp")
id2label = model.model.config.id2label # {0:'entailment', 1:'neutral', 2:'contradiction'}
pairs = [
("The glass fell off the counter and shattered on the tile.",
"The glass broke when it hit the floor."), # E
("The store opens at 9 a.m. every day.",
"The store opens at 7 a.m. on weekdays."), # C
("A researcher presented results at the conference.",
"The presentation won the best paper award."), # N
("It started raining heavily, so the match was postponed.",
"The game was delayed due to weather."), # E
("Every seat on the flight was taken.",
"There were several empty seats on the plane."), # C
]
logits = model.predict(pairs) # shape: (5, 3)
for (prem, hyp), row in zip(pairs, logits):
pred_idx = int(np.argmax(row))
pred = id2label[pred_idx]
print(f"[{pred}] Premise: {prem} | Hypothesis: {hyp}")
Recommended Applications
Frame each check as a premise (text) and hypothesis (statement), and use the entailment probability.
| Application | Example hypothesis | Supporting results |
|---|---|---|
| Zero-shot tagging / topic classification | "This text is about billing." | zs_meta, fin_topics |
| Routing and decisions in agent pipelines | "The user wants to cancel an order." | zs_meta, mnli, snli |
| RAG grounding / hallucination checks | Each answer sentence vs. retrieved passages | ragtruth, wice, vitaminc |
| Contract and policy review | "The agreement permits sharing data with third parties." | contractnli_a/b, docnli |
| Biomedical and health claim checking | Claim vs. abstract or clinical note | sdoh_nli, biosift, bionli, scifact, pubhealth |
| Dialogue fact-checking | Assistant reply vs. knowledge source | dialfact, vitaminc |
| Guardrails / policy matching | Policy statement vs. user or model text | crossingguard |
| Stance detection | "The author supports the proposal." | vast |
Less suited: financial and general legal verification (findver, legal_domain), clinical-trial eligibility (nli4ct), multi-document legal reasoning (control), and adversarial reasoning (anli_r3, nope_adv).
Extended Evaluation (45 datasets)
Accuracy on the test splits of 45 NLI and adjacent datasets, this model vs. the original finecat-nli-v2-s, both scored with the same OpenNLI script (FineCat: the labelled test split).
2-way datasets (entailed vs. not) are scored as entailment vs. any non-entailment prediction.
DocNLI and VitaminC are evaluated on fixed random subsets of 1,000 and 10,000 pairs.
FRANK (news-summary factuality) is scored per summary sentence: each sentence vs. its source article, labelled by the majority annotator judgment.
| Dataset | n | finecat-nli-v2-s-wsp | finecat-nli-v2-s | Δ |
|---|---|---|---|---|
| finecat | 18012 | 0.7911 | 0.7914 | -0.0003 |
| mnli | 9815 | 0.8628 | 0.8671 | -0.0044 |
| mnli_mismatched | 9830 | 0.8625 | 0.8663 | -0.0039 |
| snli | 9824 | 0.9058 | 0.9084 | -0.0025 |
| anli_r1 | 1000 | 0.6660 | 0.6590 | +0.0070 |
| anli_r2 | 1000 | 0.5120 | 0.4990 | +0.0130 |
| anli_r3 | 1200 | 0.4717 | 0.4700 | +0.0017 |
| wanli | 5000 | 0.7230 | 0.7228 | +0.0002 |
| lingnli | 7361 | 0.7998 | 0.7992 | +0.0005 |
| glue_diagnostic | 1100 | 0.6864 | 0.6918 | -0.0055 |
| med | 5380 | 0.7572 | 0.7645 | -0.0072 |
| nan_nli | 258 | 0.6705 | 0.6938 | -0.0233 |
| scone_test | 1000 | 0.9980 | 0.9990 | -0.0010 |
| nmonli_test | 200 | 1.0000 | 1.0000 | +0.0000 |
| conjnli | 623 | 0.6758 | 0.6918 | -0.0161 |
| nope_adv | 345 | 0.4116 | 0.4145 | -0.0029 |
| nli4ct | 199 | 0.6281 | 0.6583 | -0.0302 |
| sdoh_nli | 990 | 0.9788 | 0.9788 | +0.0000 |
| healthver | 230 | 0.6957 | 0.7087 | -0.0130 |
| scifact | 300 | 0.7700 | 0.7733 | -0.0033 |
| biosift | 1000 | 0.9010 | 0.9140 | -0.0130 |
| scientsbank | 971 | 0.6982 | 0.6910 | +0.0072 |
| beetle | 819 | 0.5788 | 0.5861 | -0.0073 |
| legal_domain | 1163 | 0.5064 | 0.5082 | -0.0017 |
| findver | 500 | 0.6140 | 0.6260 | -0.0120 |
| dialfact | 1499 | 0.7992 | 0.8005 | -0.0013 |
| frank_sent | 3176 | 0.7166 | 0.6820 | +0.0346 |
| ragtruth | 1497 | 0.8150 | 0.8196 | -0.0047 |
| vast | 1500 | 0.7013 | 0.7267 | -0.0253 |
| zs_meta | 5400 | 0.8722 | 0.8776 | -0.0054 |
| seahorse | 800 | 0.8812 | 0.8363 | +0.0450 |
| pubhealth | 600 | 0.8217 | 0.8217 | +0.0000 |
| bionli | 600 | 0.7933 | 0.8017 | -0.0083 |
| fin_topics | 600 | 0.9483 | 0.9500 | -0.0017 |
| vitaminc | 10000 | 0.8240 | 0.8144 | +0.0096 |
| docnli | 1000 | 0.7620 | 0.7650 | -0.0030 |
| contractnli_a | 1707 | 0.9115 | 0.9121 | -0.0006 |
| contractnli_b | 2074 | 0.8689 | 0.8698 | -0.0010 |
| control | 800 | 0.6088 | 0.6025 | +0.0062 |
| fol | 10277 | 0.7691 | 0.7855 | -0.0164 |
| scitail | 2126 | 0.9196 | 0.9318 | -0.0122 |
| wice | 958 | 0.8351 | 0.8111 | +0.0240 |
| sick | 4906 | 0.9101 | 0.9119 | -0.0018 |
| crossingguard | 5397 | 0.8979 | 0.9081 | -0.0102 |
| hans | 15000 | 0.8423 | 0.8215 | +0.0208 |
Macro average over the 45 datasets: 0.7703 (original 0.7718).
Training Details
The base model (before the WSP edit) is a fine-tune of jhu-clsp/ettin-encoder-68m,
trained on the dleemiller/FineCat-NLI-Reason dataset, a compilation of several high-quality
NLI data sources with quality screening and reduction of easy samples in the training split. Also includes additional
NLI, fact verification and long document sources (2.05M pairs in total).
The training uses logit distillation from an NLI finetune of Qwen3.8-27B.
Distillation loss looks like this: $$ \begin{equation} \mathcal{L} = \alpha \cdot \mathcal{L}_{\text{CE}}(z^{(s)}, y) + \beta \cdot T^2 \cdot \mathrm{KL}\left(\sigma(z^{(t)}/T) ,|, \sigma(z^{(s)}/T)\right) \end{equation} $$
where \(z^{(s)}\) and \(z^{(t)}\) are the student and teacher logits, \(y\) are the ground truth labels, \(\alpha = 0.2\), \(\beta = 0.8\) and \(T = 1\).
Training inputs keep the full documents the teacher labelled (up to 8k tokens). The model was trained for 3 epochs
at a constant learning rate followed by a 1-epoch cooldown. The released weights are the soup greedy_val, selected on the validation/dev objective (never a test set),
with the output temperature calibrated on the validation split. The learning rate was 8e-05, chosen from a WSD learning-rate probe (1x and 4x probe horizons, extrapolated to the full run) combined with the size trend of the larger v2 models.
Acknowledgments
We thank the creators and contributors of jhu-clsp (Ettin) and the Qwen team for making their work available.
This model would not be possible without their efforts and open source contributions.
Citation
@misc{nli-compiled-2025,
title = {FineCat NLI Dataset},
author = {Lee Miller},
year = {2025},
howpublished = {Refined compilation of 6 major NLI datasets}
}