CoolFace
Modelpublic

krotima1/AlignScoreCS

sourceHugging Facecc-by-4.0updated 2y agoView on Hugging Face
2likes19downloads
Model Card

AlignScoreCS

A MultiTask multilingual model is developed to assess factual consistency in context-claim pairs across various Natural Language Understanding (NLU) tasks, including Summarization, Question Answering (QA), Semantic Textual Similarity (STS), Paraphrase, Fact Verification (FV), and Natural Language Inference (NLI). AlignScoreCS is fine-tuned on a vast multi-task dataset consisting of 7 million documents, encompassing these NLU tasks in both Czech and English languages. Its multilingual pre-training enables its potential utilization in various other languages. The architecture is capable of processing tasks using regression, binary classification, or ternary classification, although for evaluation purposes, we recommend employing the AlignScore function.

This work is influenced by its English counterpart AlignScore: Evaluating Factual Consistency with a Unified Alignment Function. However, we employed homogeneous batches instead of heterogeneous ones during training and utilized three distinct architectures sharing a single encoder. This setup allows for the independent use of each architecture with its classification head.

Evaluation

As in the paper AlignScore, we use their AlignScore function which chunk context into roughly 350 tokens and splits claim into sentences each context chunk is evaluated against each claim sentence and aggregated one consistency score

AlignScoreCS model is built on three XLM-RoBERTa architectures sharing one encoder

MultiTask multilingual model for assessing facticity in various NLU tasks in Czech and English language. We followed the initial paper AlignScore https://arxiv.org/abs/2305.16739. We trained a model using a shared architecture of checkpoint xlm-roberta-large xlm-roberta with three linear layers for regression, binary classification and ternary classification.

Usage

python
  # Assuming you copied the attached Files_and_versions/AlignScore.py file for ease of use in transformers.
  from AlignScoreCS import AlignScoreCS
  alignScoreCS = AlignScoreCS.from_pretrained("krotima1/AlignScoreCS")
  # put the model to cuda to accelerate
  print(alignScoreCS.score(context="This is context", claim="This is claim"))

Results

Training datasets

The following table shows datasets that has been utilized for training the model. We translated these english datasets to Czech using seamLessM4t.

NLP TaskDatasetTraining TaskContext (n words)Claim (n words)Sample Count
NLISNLI3-way1013Cs: 500k
En: 550k
MultiNLI3-way1620Cs: 393k
En: 393k
Adversarial NLI3-way4854Cs: 163k
En: 163k
DocNLI2-way97285Cs: 200k
En: 942k
Fact VerificationNLI-style FEVER3-way4850Cs: 208k
En: 208k
Vitamin C3-way2325Cs: 371k
En: 371k
ParaphraseQQP2-way911Cs: 162k
En: 364k
PAWS2-way-18Cs: -
En: 707k
PAWS labeled2-way18-Cs: 49k
En: -
PAWS unlabeled2-way18-Cs: 487k
En: -
STSSICKreg-10Cs: -
En: 4k
STS Benchmarkreg-10Cs: -
En: 6k
Free-N1reg18-Cs: 20k
En: -
QASQuAD v22-way105119Cs: 130k
En: 130k
RACE2-way266273Cs: 200k
En: 351k
Information RetrievalMS MARCO2-way4956Cs: 200k
En: 5M
SummarizationWikiHow2-way434508Cs: 157k
En: 157k
SumAug2-way--Cs: -
En: -