--- license: cc-by-4.0 language: - es task_categories: - text-classification task_ids: - natural-language-inference pretty_name: ESNLIR — human-annotated AL evaluation set (1,695 pairs) size_categories: - 1K **Active Learning for Spanish Natural Language Inference on a Heterogeneous Multi-Domain Corpus** > Diego Ortiz, Johan R. Portela, Ruben Manrique — Universidad de los Andes, Bogotá > *Advances in Artificial Intelligence — IBERAMIA 2026* (to appear) Code: [`jd-rodriguezp1234/esnlir-active-learning`](https://github.com/jd-rodriguezp1234/esnlir-active-learning) · Corpus: [`Flaglab/ESNLIR-dataset`](https://huggingface.co/datasets/Flaglab/ESNLIR-dataset) ## Labels Four inference relations. Each instance is a pair of **adjacent sentences from a single document**: the premise precedes a discourse connector, the hypothesis follows it, and the connector is removed so the relation has to be recovered from the two sentences alone. | label | n | share | |---|---|---| | `neutral` | 634 | 37.4% | | `entailment` | 379 | 22.4% | | `reasoning` | 370 | 21.8% | | `contrasting` | 312 | 18.4% | Classes are **uneven by design** — this is a natural sample, not a balanced one. Report **macro F1** rather than accuracy. `reasoning` (cause–effect, e.g. *en consecuencia*, *por consiguiente*) is ESNLIR's departure from the usual three-class schema, and empirically the hardest of the four. ## Genres and domains | genre | n | | genre | n | |---|---|---|---|---| | `theses` | 614 | | `articles` | 132 | | `books` | 315 | | `legal` | 112 | | `comments` | 234 | | `clinical` | 50 | | `news` | 198 | | `talks` | 40 | 24 distinct domains. The five largest: literature (17.2%), web comments (13.8%), Spanish public-domain news (8.0%), encyclopedia (7.8%), engineering theses (7.0%). The set deliberately spans formal registers (legal, clinical) and informal ones (web comments, tweets). ## Fields ```json {"sentence_1": "se pueden retener 10 pasaportes alemanes al mismo tiempo", "sentence_2": "estos pasaportes adicionales son válidos por solo 6 años, ...", "connector": "sin embargo,", "connector_type": "contrasting", "connection_type": "contrasting", "extraction_strategy": "linking_phrase", "distance": 1.0, "sentence_1_paragraph": 1, "sentence_1_position": 55, "sentence_2_paragraph": 1, "sentence_2_position": 56, "id": "esarticles__eswiki__...", "dataset": "esarticles__eswiki", "genre": "articles", "domain": "encyclopedia"} ``` The gold label is **`connection_type`**, the human majority label. `connector_type` is the label derived automatically from the discourse connector, kept for reference. The two are **identical on every row** — see *Two filters, not one* below — so either column can be used. Note `id` identifies the source article, not the pair, and is not unique. Join on `(sentence_1, sentence_2)`. ## Annotation **12 annotators** (undergraduate CS students) worked over **one month**. Each instance was labeled independently by **3 annotators** and the final label assigned by **majority vote**; instances without sufficient agreement were discarded — **151 removed**, leaving the 1,695 released here. Inter-annotator agreement was **Cohen's κ = 0.641** (overlap-weighted mean), conventionally read as *substantial*. Agreement was **lowest for `reasoning`**, consistent with the entailment/reasoning boundary being the main source of ambiguity — the same distinction every model here finds hardest. The written guidelines required annotators to judge **strictly what is written**, without mentally repairing or extending the sentences, and to choose `neutral` when a pair was ambiguous. No synthetic augmentation was used at any stage. ### The retention filter A pair was kept only if its **human majority label matched the connector-derived label**. The 151 discarded instances are exactly those where the two disagreed — which is why `connection_type` and `connector_type` are identical on all 1,695 remaining rows. This makes the set a **reliability-filtered slice**, not a neutral sample: it holds only pairs where automatic and human labelling already coincide. Scores here are correspondingly higher than on the full ESNLIR test split (0.82 vs 0.68 macro F1 for the same XLM-RoBERTa checkpoint), and that gap measures **label reliability rather than task difficulty** — the same effect documented for ESNLIR's own human-validated subset. Do not read it as models being better at these instances. The retention rate is notably high: 1,695 of 1,846 candidates, 91.8%. ESNLIR's own validation exercise retained only ~45% under the same rule, so these candidates — drawn by confidence stratification — were substantially easier to label consistently. ### How candidates were chosen Candidates were sampled by **model confidence** before annotation: a preliminary pass with the released ESNLIR XLM-RoBERTa checkpoint binned them into four confidence strata (high, medium, low, none), concentrating annotation effort on uncertain instances. This has a consequence worth stating plainly. The set is **enriched for instances that checkpoint finds hard**, so that model's own score on it is biased downward. It still ranks highest among all systems evaluated, which is what makes the comparison robust to the selection effect. Note this pulls in the opposite direction to the connector-agreement filter above: uncertainty sampling selects harder instances, agreement filtering keeps easier ones. The net effect is not a simple bias in one direction, which is another reason absolute numbers here are not comparable with numbers on the full ESNLIR test split. **Relative comparisons between systems on this set are the intended use.** ## Reported results Macro F1 on this set, from the active-learning paper: | encoder | method | labels used | macro F1 | |---|---|---|---| | XLM-R | full supervision | 1,000k | **0.822** | | XLM-R | NegE (best, iter 5) | 610k | 0.796 | | XLM-R | LER (final, iter 7) | 800k | 0.789 | | Bertin | full supervision | 1,000k | 0.811 | | Bertin | NegE (best, iter 6) | 710k | 0.764 | | Bertin | LER (final, iter 7) | 800k | 0.754 | Active learning reaches 95.5% of full supervision with 61% of the labels, and NegE and LER are indistinguishable — since LER acquires uniformly at random from a filtered pool, energy-based acquisition shows no measurable advantage over near-random selection. ## Usage ```python from datasets import load_dataset ds = load_dataset("Flaglab/esnlir-al-annotated-test", split="test") print(ds[0]["sentence_1"], "|", ds[0]["connection_type"]) ``` ## Related | | | |---|---| | [`Flaglab/ESNLIR-dataset`](https://huggingface.co/datasets/Flaglab/ESNLIR-dataset) | the corpus this is drawn from | | [`Flaglab/esnlir-al-trajectories`](https://huggingface.co/datasets/Flaglab/esnlir-al-trajectories) | per-round AL metrics and pool indices | | [`Flaglab/ESNLIR-AL-XLM-RoBERTa-NegE`](https://huggingface.co/Flaglab/ESNLIR-AL-XLM-RoBERTa-NegE) | best AL checkpoint | ## Citation ```bibtex @InProceedings{ortiz2026activelearningspanishnli, author = {Ortiz, Diego and Portela, Johan R. and Manrique, Ruben}, title = {Active Learning for Spanish Natural Language Inference on a Heterogeneous Multi-Domain Corpus}, booktitle = {Advances in Artificial Intelligence -- IBERAMIA 2026}, year = {2026}, publisher = {Springer Nature Switzerland}, address = {Cham}, note = {To appear}, } ``` The corpus is ESNLIR ([Portela, Pérez-Terán & Manrique, 2026](https://doi.org/10.1007/978-3-032-07175-0_23)), a separate project with its own code and paper.