Model Card for RoBERTaSense-FACIL
RoBERTaSense-FACIL (RoBERTa Fine-tuned for Accessible Comprehension In Language) is a Spanish RoBERTa model fine-tuned to assess meaning preservation in Easy-to-Read (E2R) adaptations. Given a pair of texts {original, adapted}, it predicts whether the adaptation preserves the meaning of the original.
The model is based on IsGarrido/roberta-base-bne, which preserves the Spanish RoBERTa-base-bne weights used as the base architecture for RoBERTaSense-FACIL.
🚀 How to Use
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
repo = "oeg/RoBERTaSense-FACIL"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo)
model.eval()
# Example pair
original = "Juan llegó tarde ya que perdió el autobús."
adapted = "Juan perdió el autobús. Por eso, Juan llegó tarde."
# Tokenization
inputs = tokenizer(
original,
adapted,
return_tensors="pt",
truncation=True,
max_length=512
)
# Inference
with torch.no_grad():
logits = model(**inputs).logits
probs = torch.softmax(logits, dim=-1)
# Meaning-preservation score
meaning_score = probs[0, 1].item()
# Binary prediction using the evaluation threshold
predicted_class = (
"PRESERVES_MEANING"
if meaning_score >= 0.5
else "DOES_NOT_PRESERVE"
)
print("Meaning Preservation Score:", meaning_score)
print("Predicted Class:", predicted_class)
The score assigned to PRESERVES_MEANING reflects the model's confidence in assigning the pair to the meaning-preserving class.
⚠️ The score is not a calibrated probability and should not be interpreted as the percentage of meaning preserved.
A decision threshold of 0.5 was used in the reported binary evaluation:
score >= 0.5→PRESERVES_MEANINGscore < 0.5→DOES_NOT_PRESERVE
Model Description
- Developed by: Ontology Engineering Group (UPM) / Authors: Isam Diab Lozano and Mari Carmen Suárez-Figueroa
- Funded by: "Ayudas para la contratación de personal investigador predoctoral en formación para el año 2022" (Reference: PIPF-2022/COM-25762) by Comunidad de Madrid (Spain)
- Model type: Encoder-only Transformer (RoBERTa) with a classification head
- Language: Spanish (es)
- License: Apache-2.0
- Parameters: approximately 125M
- Task: Binary meaning-preservation classification
- Labels:
1 = PRESERVES_MEANING,0 = DOES_NOT_PRESERVE - Fine-tuned from:
IsGarrido/roberta-base-bne, revision3d54a71
Uses
Direct Use
- Automatic assessment of meaning preservation in Spanish Easy-to-Read adaptations.
- Evaluation of original-adapted text pairs generated by automatic adaptation systems.
- As a meaning-preservation signal in accessibility and text-adaptation evaluation pipelines.
- Identification of adaptations that may require additional human inspection.
- As one component of a broader multi-dimensional evaluation of Easy-to-Read adaptations.
Out-of-Scope Use
- Measuring readability or ease of understanding.
- Assessing complete compliance with Easy-to-Read guidelines.
- Determining whether a text is accessible to a particular reader.
- Interpreting the score as a percentage of meaning preserved.
- Clinical, legal, or other high-stakes decisions without human expert oversight.
- Non-Spanish or substantially out-of-domain texts without prior validation or re-training.
Bias, Risks, and Limitations
- Domain limitation: the model was developed for Spanish E2R adaptation; performance may degrade on other genres, domains, languages, or forms of rewriting.
- Binary labels: meaning preservation is modelled as a binary distinction, although semantic equivalence may be gradual or ambiguous.
- Synthetic negatives: the negative examples were generated using a controlled set of hard-negative strategies and do not cover every possible semantic error found in real automatic adaptations.
- Model confidence: the output score is not calibrated and should not be interpreted as a probability or as a percentage of preserved meaning.
- Human validation: validation against human judgements involved 36 text pairs and general native speakers of Spanish and therefore does not constitute exhaustive validation for all adaptation scenarios.
- Easy-to-Read quality: a high meaning-preservation score does not imply compliance with Easy-to-Read guidelines or greater ease of understanding.
Recommendations
- Use the model primarily with Spanish original-adaptation text pairs.
- Use a threshold of
0.5when reproducing the reported binary evaluation. - Interpret the output as model-based evidence rather than as a percentage of meaning preserved.
- Keep a human-in-the-loop for borderline or critical cases.
- Combine meaning-preservation assessment with expert- and user-based evaluation when assessing overall Easy-to-Read adaptation quality.
- Validate performance before applying the model to substantially different domains or genres.
How to Get Started with the Model
See How to Use above. For pairwise inputs, encode the original and adapted texts as a sentence pair:
inputs = tokenizer(
text_original,
text_adapted,
return_tensors="pt",
truncation=True,
max_length=512
)
Training Details
Training Data
Positive examples were obtained from ClearSim, a Spanish parallel corpus containing original texts and expert-validated Easy-to-Read adaptations.
An initial subset of 2,400 meaning-preserving original-adapted text pairs was selected from the corpus. Each source text was assigned to a source-text group so that all examples derived from the same original text could be kept in the same data partition.
Since the corpus provided expert-validated positive examples but no equivalent set of meaning-altering pairs, hard negatives were automatically generated.
- Columns:
text1(original),text2(candidate adaptation),Label(0/1),neg_type. - Labels:
1 = PRESERVES_MEANING,0 = DOES_NOT_PRESERVE. - Negative types:
shuffle,dropout,mismatch,paraphrase, andnli_contradiction.
Five strategies were used:
- Sentence Shuffle: sentences in an adaptation are reordered.
- Sentence Dropout: one or more sentences are removed from an adaptation.
- Mismatch: an original text is paired with an adaptation from a different source-text group.
- Paraphrase: fluent candidate adaptations containing controlled semantic alterations are generated.
- NLI Contradiction: candidate adaptations containing contradictions with respect to the original text are identified through Natural Language Inference.
Candidates retained as NLI contradictions were excluded from the generic paraphrase pool so that these categories remained mutually exclusive in the model-development dataset.
After dataset construction and quality controls, the final model-development dataset contained 4,436 text pairs:
| Class | Pairs |
|---|---|
| Meaning-preserving | 2,366 |
| Meaning-altering | 2,070 |
| Total | 4,436 |
The negative examples comprised:
| Negative type | Pairs |
|---|---|
| Sentence Shuffle | 472 |
| Sentence Dropout | 472 |
| Mismatch | 472 |
| Paraphrase | 472 |
| NLI contradiction | 182 |
| Total | 2,070 |
Data Partitioning
The dataset was partitioned at source-text-group level. No original text, adaptation, or negative example derived from the same source text occurred in more than one partition.
| Partition | Pairs |
|---|---|
| Training | 3,096 |
| Validation | 666 |
| Independent test | 674 |
| Total | 4,436 |
The approximate distribution was 70/15/15.
There was no source-text-group overlap among the training, validation, and test partitions.
A separate human-validation subset containing 36 original-candidate pairs from 34 source-text groups was excluded from model development.
All random operations used a fixed seed of 42.
Training Procedure
Preprocessing
Pair tokenization was performed with truncation at 512 tokens:
tokenizer(
text1,
text2,
truncation=True,
max_length=512
)
Training Hyperparameters
- Arguments:
num_train_epochs=5per_device_train_batch_size=32per_device_eval_batch_size=16learning_rate=2e-5weight_decay=0.01warmup_ratio=0.1evaluation_strategy="epoch"save_strategy="epoch"load_best_model_at_end=Truemetric_for_best_model="roc_auc"
- Random seed:
42 - Loss: CrossEntropy (2 logits)
Model checkpoints were evaluated on the validation partition after each epoch. The checkpoint with the highest ROC-AUC was selected.
The independent test partition was held out from both model training and model selection and was used only for final evaluation of the selected checkpoint.
Model Selection
Three Transformer-based approaches were compared as candidate model-based metrics:
- MeaningBERT
- RoBERTa-base-bne, trained as a binary classifier
- RoBERTa-base-bne (regression), trained using an MSE objective
Their results on the independent test partition were:
| Model | Accuracy | F1 Negative | F1 Positive | ROC-AUC |
|---|---|---|---|---|
| MeaningBERT | 0.641 | 0.498 | 0.721 | 0.657 |
| RoBERTa-base-bne | 0.923 | 0.913 | 0.931 | 0.977 |
| RoBERTa-base-bne (regression) | 0.696 | 0.527 | 0.776 | 0.972 |
The binary RoBERTa-base-bne model achieved the strongest overall discriminative performance and was selected as RoBERTaSense-FACIL.
For the regression formulation, the reported binary Accuracy and F1 values were obtained by applying a threshold of 0.5 to the sigmoid-transformed regression output.
Evaluation
Testing Data, Factors & Metrics
Testing Data
The final model was evaluated on an independent test partition containing 674 text pairs.
The test set comprised:
- 356 meaning-preserving pairs.
- 318 meaning-altering pairs.
Source-text groups represented in this partition were excluded from training and model selection.
Factors
The independent test set contains examples derived from the five negative-generation strategies:
- sentence shuffle;
- sentence dropout;
- mismatch;
- paraphrase;
- NLI contradiction.
Metrics
- Accuracy
- F1 for the negative class
- F1 for the positive class
- ROC-AUC
Results
RoBERTaSense-FACIL obtained:
- Accuracy:
0.923 - F1, negative class:
0.913 - F1, positive class:
0.931 - ROC-AUC:
0.977
The model correctly classified:
- 273 of 318 meaning-altering pairs;
- 349 of 356 meaning-preserving pairs.
Binary predictions were obtained using a fixed decision threshold of 0.5.
Human Validation
RoBERTaSense-FACIL was additionally validated against human judgements of meaning preservation.
The human-validation material comprised 36 original-candidate text pairs representing 34 source-text groups. These groups were excluded from the training, validation, and test partitions.
Respondents assessed the extent to which each pair conveyed the same information using a scale from 0 to 10. Pair-level mean scores were subsequently normalised to the [0,1] interval.
Complete Human-Validation Set
For the complete set of 36 pairs, RoBERTaSense-FACIL scores showed a statistically significant association with aggregated human judgements:
| Correlation | Value | p-value |
|---|---|---|
| Pearson | 0.443 | 0.0068 |
| Spearman | 0.507 | 0.0016 |
Complementary Analysis
Manual verification identified five cases in which the intended negative transformation had not been successfully instantiated:
- four pairs assigned to the
Mismatchcategory corresponded to valid original-adaptation pairs; - one pair assigned to the
Shufflecategory did not modify the sentence order.
These cases were retained in the primary analysis because human respondents evaluated the semantic relationship between the texts independently of their automatically assigned transformation category.
A complementary analysis excluding these five cases contained 31 pairs:
| Correlation | Value | p-value |
|---|---|---|
| Pearson | 0.695 | <0.001 |
| Spearman | 0.709 | <0.001 |
The stronger correlations obtained in this complementary analysis indicate that the quality of automatically generated evaluation examples can substantially affect estimates of human-model alignment.
Interpretation of the Score
RoBERTaSense-FACIL produces a softmax score associated with the PRESERVES_MEANING class.
For example:
Meaning Preservation Score: 0.93
means that the model assigns high confidence to the meaning-preserving class.
It does not mean that:
93% of the original meaning was preserved.
The score should therefore be interpreted as model-based evidence of meaning preservation, not as a calibrated probability or as a direct quantitative measure of semantic retention.
Meaning preservation constitutes only one dimension of adaptation quality. For Easy-to-Read evaluation, RoBERTaSense-FACIL scores should ideally be considered together with expert-based assessment of adaptation compliance and user-based assessment of perceived ease of understanding.
Technical Specifications
Model Architecture and Objective
- Encoder-only RoBERTa architecture with a classification head (
Linear(hidden → 2)). - Hidden size:
768. - Transformer layers:
12. - Attention heads:
12. - Vocabulary size:
50,262. - Objective: supervised cross-entropy over two classes.
Label Mapping
{
"id2label": {
"0": "DOES_NOT_PRESERVE",
"1": "PRESERVES_MEANING"
},
"label2id": {
"DOES_NOT_PRESERVE": 0,
"PRESERVES_MEANING": 1
}
}
Citation
BibTeX:
@software{robertasense_facil_2025,
title = {RoBERTaSense-FACIL: Meaning Preservation for Easy-to-Read in Spanish},
author = {Diab-Lozano, Isam and Suárez-Figueroa, Mari Carmen},
year = {2025},
url = {https://huggingface.co/oeg/RoBERTaSense-FACIL}
}
APA:
Diab-Lozano, Isam, & Suárez-Figueroa, Mari Carmen. (2025). RoBERTaSense-FACIL: Meaning Preservation for Easy-to-Read in Spanish. Hugging Face. https://huggingface.co/oeg/RoBERTaSense-FACIL