Wild Β· Adversarial NLI Stress Lab Β· 150.87 MB WASM q8 Β· Apache-2.0

NLI Stress, Negation, Multi-Label Overlap & Monotonicity Lab

Bag-of-words heuristics fail on double negation and "unless" clauses, softmax collapses under distractor dilution, and 512-token models drop clauses buried at 90% depth. Run all three stress suites locally on onnx-community/ModernBERT-base-nli-ONNX.

1. On-device model

Initialise ModernBERT-Base NLI above to run the adversarial NLI stress labs.

2. Adversarial Logic, Negation & Conditional Probes

Four real NLI reasoning probes (double negation, conditional if/unless, contradictory premise-label negation flip, and quantitative SLA boundary).

Probes passed–
Mean margin–
Total latency–
NaN count–
Adversarial NLI probe results showing expected label, predicted winner, score, and entailment vs contradiction delta
Probe Premise & note Expected Predicted winner Score Verdict
Run the 4 logic probes above.

3. Distractor Label Dilution (3 β†’ 8 β†’ 12 classes) & Monotonicity

Runs the identical premise across 3, 8, and 12 candidate labels in both single-label (softmax competition) and multi-label (independent entailment vs contradiction). Watch single-label probabilities dilute while multi-label top-1 confidence stays invariant (monotonic!).

Label dilution sweep comparing single-label softmax vs multi-label independent scoring at 3, 8, and 12 labels
Label count Single-label winner & score Single entropy Multi-label target score Multi rank Latency
Run the dilution sweep above.

4. Premise-Length Needle Placement (10% Β· 50% Β· 90% Depth)

Inserts a decisive policy override at 10%, 50%, and 90% through a ~700-token premise, comparing Full ModernBERT RoPE against a 512-token truncation cutoff.

Needle placement sweep at 10%, 50%, and 90% premise depth comparing full RoPE vs 512-token clip
Needle depth Pair tokens Full RoPE winner & target score 512-tok clip winner & target score Latency
Run the needle sweep above.

5. Inspect needle placement helper

Show the code Β· modernbert-nli-core.mjs β€” buildNeedlePremise()