mutacon / README.md
agentlans's picture
Upload 3 files
86538fa verified
|
Raw
History Blame Contribute Delete
5.84 kB
metadata
license: mit
task_categories:
  - text-classification
  - zero-shot-classification
tags:
  - nlp
  - contradiction-detection
  - nli
  - robustness
  - data-augmentation
  - adversarial-nlp

MutaCon: A Mutation-Based Contradiction Dataset

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).

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.

Dataset Structure

Data Fields

Field Name Type Description
text string The original, high-quality source sentence.
mutant string The programmatically perturbed version of the original sentence.
strategy string The specific linguistic mutation rule applied (1 of 13 categories).
contradiction_score float Continuous confidence score of the contradiction ($[0, 1]$ scale).

Example Instance

{
  "text": "Frederick Dent bought the two story farmhouse and surrounding land located southwest of St. Louis in 1820.",
  "mutant": "Frederick Dent sold the two story farmhouse and surrounding land located southwest of St. Louis in 1820.",
  "strategy": "verb_flip",
  "contradiction_score": 0.999
}

Technical Generation Taxonomy

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:

Strategy Rule Description Example Transformation
word_flip Token-level antonym substitution using a static mapping lookup. best $\rightarrow$ worst
state_flip Inverts the semantic status of adjectives or conditions. open $\rightarrow$ closed
phrase_flip Multi-word substring substitutions to flip clause polarity. Idiomatic/multi-token expressions
verb_flip Replaces active verbs with their functional or legal antonyms. bought $\rightarrow$ sold
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
direction_flip Swaps positional/directional parameters matching a strict from X to Y pattern. from X to Y $\rightarrow$ from Y to X
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
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
modality_shift Shifts qualifiers governing certainty, frequency, or obligation. most frequently $\rightarrow$ most rarely
quantifier_shift Targets determiners and logical quantifiers to alter set scopes. few $\rightarrow$ none / most $\rightarrow$ all
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
temporal_aspect_flip Mutates aspect/tense markers affecting timeline placement. Tense aspect shifting
preposition_tweak Alters true prepositional dependencies (dep_ == "prep") to distort spatial or contextual relations. Case-preserving swaps

Curation Pipeline & Quality Control

To ensure high data fidelity, MutaCon implements a rigourous three-stage filtration pipeline:

[Baseline Source] ──> [Linguistic Mutation] ──> [Grammar Filtering] ──> [Contradiction Scoring] ──> [Final Dataset]

1. Baseline Text Sourcing

All source sentences are extracted from the curated agentlans/high-quality-english-sentences dataset to guarantee syntactic variance and exceptional grammatical hygiene prior to mutation.

2. Grammatical Validation

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. Unstable or ungrammatical mutants are automatically discarded.

3. Contradiction Filtering & Scoring

Contradictions are empirically validated downstream using 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.

Intended Uses

  • 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).
  • Adversarial Robustness Evaluation: Benchmark the boundary vulnerabilities of frontier LLMs against minor, single-token logical and numerical flips.
  • Contradiction Intensity Modeling: Utilize the continuous contradiction_score to train regression-based semantic divergence and logical mismatch metrics.

Licensing

This dataset is distributed under the permissive MIT License.