Implementation of JEDI from the EMNLP 2025 paper Extractive Fact Decomposition for Interpretable Natural Language Inference in one Forward Pass.
| jedi/modeling.py | Model (IENLIModel, sentence-span ablation IENLIModelSentences), losses, span inference |
| jedi/data.py | Token-level supervision, negative span sampling, batching |
| jedi/prepare_data.py | Builds training files from the Hub corpus and resources/anli_fact_spans.json.gz |
| jedi/train.py | Training |
| jedi/evaluate.py, jedi/tasks.py | Evaluation: ANLI, ConTRoL, RTE, WNLI, HANS |
pip install -r requirements.txt
python -m spacy download en_core_web_sm # only for --variant sentenceRun all commands from the repository root.
Training data (ANLI with synthetic rationale spans from nicpopovic/syrp-nli plus atomic-fact spans) is created
automatically on the first run, or explicitly with python -m jedi.prepare_data --out_dir data/jedi.
python -m jedi.train --model microsoft/deberta-v3-large --batch_size 32 --learning_rate 9e-6 \
--num_epochs 25 --number_of_spans 50 --seed 42AdamW (encoder LR 7e-6 to 1e-5 for large, 2e-5 to 5e-5 for base; 1e-4 for other parameters), 1 epoch warm-up then linear
decay, early stopping on the combined ANLI dev accuracy. The best checkpoint is saved to checkpoints/weights_<id>.ckpt.
--wandb enables Weights & Biases logging.
Tasks: anli_r1, anli_r2, anli_r3, anli_all, control, rte, wnli, hans. Several checkpoints can be passed;
per-checkpoint and mean accuracy / macro-F1 are printed. --save_predictions out.json stores verdicts and extracted spans.
python -m jedi.evaluate --task anli_r3 --model microsoft/deberta-v3-large --checkpoints checkpoints/weights_*.ckptVariants: --variant sentence (sentence spans), --loss bce (span loss, pass to train and evaluate),
--verdict global_only|spans_only (evaluate).
Accuracy (%) of the released checkpoints. ConTRoL excludes premises of 2000+ characters; RTE, WNLI and HANS use the validation split.
| Model | ANLI R1 | R2 | R3 | ANLI | ConTRoL | RTE | WNLI | HANS |
|---|---|---|---|---|---|---|---|---|
| JEDI large (checkpoint) | 76.9 | 63.5 | 58.7 | 65.9 | 53.6 | 88.5 | 77.5 | 76.9 |
| JEDI base (checkpoint) | 67.6 | 52.9 | 50.5 | 56.6 | 50.5 | 80.1 | 59.2 | 75.0 |
from huggingface_hub import hf_hub_download
path = hf_hub_download("nicpopovic/jedi-deberta-v3-large", "weights.ckpt")
# python -m jedi.evaluate --task anli_r3 --model microsoft/deberta-v3-large --checkpoints <path>@inproceedings{popovic-farber-2025-extractive,
title = "Extractive Fact Decomposition for Interpretable Natural Language Inference in one Forward Pass",
author = {Popovi{\v{c}}, Nicholas and
F{\"a}rber, Michael},
editor = "Christodoulopoulos, Christos and
Chakraborty, Tanmoy and
Rose, Carolyn and
Peng, Violet",
booktitle = "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
month = nov,
year = "2025",
address = "Suzhou, China",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.emnlp-main.1615/",
doi = "10.18653/v1/2025.emnlp-main.1615",
pages = "31692--31705",
ISBN = "979-8-89176-332-6",
abstract = "Recent works in Natural Language Inference (NLI) and related tasks, such as automated fact-checking, employ atomic fact decomposition to enhance interpretability and robustness. For this, existing methods rely on resource-intensive generative large language models (LLMs) to perform decomposition. We propose JEDI, an encoder-only architecture that jointly performs extractive atomic fact decomposition and interpretable inference without requiring generative models during inference. To facilitate training, we produce a large corpus of synthetic rationales covering multiple NLI benchmarks. Experimental results demonstrate that JEDI achieves competitive accuracy in distribution and significantly improves robustness out of distribution and in adversarial settings over models based solely on extractive rationale supervision. Our findings show that interpretability and robust generalization in NLI can be realized using encoder-only architectures and synthetic rationales."
}