agentlans commited on
Commit
86538fa
·
verified ·
1 Parent(s): 88e17bd

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +92 -0
  2. test.jsonl.zst +3 -0
  3. train.jsonl.zst +3 -0
README.md CHANGED
@@ -1,3 +1,95 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ task_categories:
4
+ - text-classification
5
+ - zero-shot-classification
6
+ tags:
7
+ - nlp
8
+ - contradiction-detection
9
+ - nli
10
+ - robustness
11
+ - data-augmentation
12
+ - adversarial-nlp
13
  ---
14
+ # MutaCon: A Mutation-Based Contradiction Dataset
15
+
16
+ MutaCon (Mutation-Based Contradiction Dataset) is a specialized benchmark corpus designed to evaluate the sensitivity, robustness, and semantic boundaries of Natural Language Inference (NLI) models and Large Language Models (LLMs).
17
+
18
+ The dataset pairs high-quality baseline English sentences with systematically engineered "mutant" variants. Each mutant is generated via deterministic syntactic, lexical, or structural transformations and features a continuous validation score quantifying its semantic divergence.
19
+
20
+ ## Dataset Structure
21
+
22
+ ### Data Fields
23
+
24
+ | Field Name | Type | Description |
25
+ | :--- | :--- | :--- |
26
+ | `text` | `string` | The original, high-quality source sentence. |
27
+ | `mutant` | `string` | The programmatically perturbed version of the original sentence. |
28
+ | `strategy` | `string` | The specific linguistic mutation rule applied (1 of 13 categories). |
29
+ | `contradiction_score` | `float` | Continuous confidence score of the contradiction ($[0, 1]$ scale). |
30
+
31
+ ### Example Instance
32
+
33
+ ```json
34
+ {
35
+ "text": "Frederick Dent bought the two story farmhouse and surrounding land located southwest of St. Louis in 1820.",
36
+ "mutant": "Frederick Dent sold the two story farmhouse and surrounding land located southwest of St. Louis in 1820.",
37
+ "strategy": "verb_flip",
38
+ "contradiction_score": 0.999
39
+ }
40
+
41
+ ```
42
+
43
+ ## Technical Generation Taxonomy
44
+
45
+ MutaCon utilizes `spaCy` dependency parsing and regex-based span manipulation to execute exactly **13 algorithmic mutation strategies**. These strategies isolate specific linguistic and logical vulnerabilities:
46
+
47
+ | Strategy | Rule Description | Example Transformation |
48
+ | --- | --- | --- |
49
+ | `word_flip` | Token-level antonym substitution using a static mapping lookup. | *best* $\rightarrow$ *worst* |
50
+ | `state_flip` | Inverts the semantic status of adjectives or conditions. | *open* $\rightarrow$ *closed* |
51
+ | `phrase_flip` | Multi-word substring substitutions to flip clause polarity. | Idiomatic/multi-token expressions |
52
+ | `verb_flip` | Replaces active verbs with their functional or legal antonyms. | *bought* $\rightarrow$ *sold* |
53
+ | `role_swap` | Extracts the `ROOT` verb, then swaps the noun chunks representing the subject (`nsubj`/`nsubjpass`) and object (`obj`/`dobj`/`pobj`). | *A bit B* $\rightarrow$ *B bit A* |
54
+ | `direction_flip` | Swaps positional/directional parameters matching a strict `from X to Y` pattern. | *from X to Y* $\rightarrow$ *from Y to X* |
55
+ | `comparative_swap` | Splits a sentence at the token *than*, reversing the left and right context strings. | *X greater than Y* $\rightarrow$ *Y greater than X* |
56
+ | `number_change` | Extracts numerical entities (`CARDINAL`, `QUANTITY`, `MONEY`, `PERCENT`, `DATE`), updating values by scalar steps ($\pm 1$) or percentage scaling ($\times 1.1$). | *1 GeV/n* $\rightarrow$ *3 GeV/n* |
57
+ | `modality_shift` | Shifts qualifiers governing certainty, frequency, or obligation. | *most frequently* $\rightarrow$ *most rarely* |
58
+ | `quantifier_shift` | Targets determiners and logical quantifiers to alter set scopes. | *few* $\rightarrow$ *none* / *most* $\rightarrow$ *all* |
59
+ | `passive_agent_blind_swap` | Strips the passive helper/agent structure (`was/were/is/are + verb + by`), disrupting thematic role processing. | *was broken by* $\rightarrow$ *broken* |
60
+ | `temporal_aspect_flip` | Mutates aspect/tense markers affecting timeline placement. | Tense aspect shifting |
61
+ | `preposition_tweak` | Alters true prepositional dependencies (`dep_ == "prep"`) to distort spatial or contextual relations. | Case-preserving swaps |
62
+
63
+ ---
64
+
65
+ ## Curation Pipeline & Quality Control
66
+
67
+ To ensure high data fidelity, MutaCon implements a rigourous three-stage filtration pipeline:
68
+
69
+ ```
70
+ [Baseline Source] ──> [Linguistic Mutation] ──> [Grammar Filtering] ──> [Contradiction Scoring] ──> [Final Dataset]
71
+
72
+ ```
73
+
74
+ ### 1. Baseline Text Sourcing
75
+
76
+ All source sentences are extracted from the curated [`agentlans/high-quality-english-sentences`](https://huggingface.co/datasets/agentlans/high-quality-english-sentences) dataset to guarantee syntactic variance and exceptional grammatical hygiene prior to mutation.
77
+
78
+ ### 2. Grammatical Validation
79
+
80
+ Programmatic swaps (especially structural transformations like `role_swap`) can occasionally yield unnatural or fragmented phrasing. To prevent artificial artifacts, all generated mutants are cross-evaluated using the [`agentlans/snowflake-arctic-xs-grammar-classifier`](https://huggingface.co/agentlans/snowflake-arctic-xs-grammar-classifier). Unstable or ungrammatical mutants are automatically discarded.
81
+
82
+ ### 3. Contradiction Filtering & Scoring
83
+
84
+ Contradictions are empirically validated downstream using [`roberta-large-mnli`](FacebookAI/roberta-large-mnli). The final `contradiction_score` represents the model's explicit confidence in the `contradiction` class prediction. This continuous metric effectively separates benign stylistic adjustments from true semantic contradictions.
85
+
86
+ ## Intended Uses
87
+
88
+ * **NLI Stress Testing:** Assess whether NLI models genuinely parse semantic relationships or merely rely on shallow word-overlap heuristics (particularly effective when testing against structural changes like `role_swap` and `comparative_swap`).
89
+ * **Adversarial Robustness Evaluation:** Benchmark the boundary vulnerabilities of frontier LLMs against minor, single-token logical and numerical flips.
90
+ * **Contradiction Intensity Modeling:** Utilize the continuous `contradiction_score` to train regression-based semantic divergence and logical mismatch metrics.
91
+
92
+ ## Licensing
93
+
94
+ This dataset is distributed under the permissive **MIT License**.
95
+
test.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f76f106935ad7288803b190e9416409b2a43c86d323737166ba7d8d6e91895e2
3
+ size 1485353
train.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3721c7beffb7e95846449b687aaa8aa41b08350ed0c41fd181a778ff75ab078
3
+ size 5743268