Edit model card

Model objective

Spanish is a beautiful language and it has many ways of referring to people, neutralizing the genders and using some of the resources inside the language. One would say Todas las personas asistentes instead of Todos los asistentes and it would end in a more inclusive way for talking about people. The purpose of this collaboratively trained model is to create a solution that reinforces the UN objective of the gender equality.

Given any input, our model will generate a gender neutral sentence, correcting any non-inclusive expressions or words. It's a straightforward and fast solution that creates a positive impact in the contemporary social panorama.

By using gender inclusive models we can help reducing gender bias in a language corpus by, for instance, adding data augmentation and creating different examples

Training and evaluation data

The data used for the model training has been created form a compilation of sources, obtained from a series of guidelines and manuals issued by Spanish Ministry of Health, Social Services and Equality in the matter of the usage of non-sexist language, stipulated in this linked document::

Compiled sources

Guía para un discurso igualitario en la universidad de alicante

Guía UC de Comunicación en Igualdad

Buenas prácticas para el tratamiento del lenguaje en igualdad

Guía del lenguaje no sexista de la Universidad de Castilla-La Mancha

Guía de Lenguaje Para el Ámbito Educativo

Guía para un uso igualitario y no sexista del lenguaje y dela imagen en la Universidad de Jaén

Guía de uso no sexista del vocabulario español

Guía para el uso no sexista de la lengua castellana y de imágnes en la UPV/EHV

Guía de lenguaje no sexista UNED

COMUNICACIÓN AMBIENTAL CON PERSPECTIVA DE GÉNERO

Recomendaciones para la utilización de lenguaje no sexista

Estudio sobre lenguaje y contenido sexista en la Web

Nombra.en.red. En femenino y en masculino

Model specs

This model is a fine-tuned version of spanish-t5-small on the data described below. It achieves the following results on the evaluation set:

  • 'eval_bleu': 93.8347,
  • 'eval_f1': 0.9904,

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 1e-04
  • train_batch_size: 32
  • seed: 42
  • num_epochs: 10
  • weight_decay: 0,01

Metrics

For training, we used both Blue (sacrebleu implementation in HF) and BertScore. The first one, a standard in Machine Translation processes, has been added for ensuring robustness of the newly generated data, while the second one is kept for keeping the expected semantic similarity.

However, given the actual use case, we expect generated segments to be very close to input segments and to label segments in training. As an example, we can take the following:

inputSegment = 'De acuerdo con las informaciones anteriores , las alumnas se han quejado de la actitud de los profesores en los exámenes finales. Los representantes estudiantiles son los alumnos Juanju y Javi.' expectedOutput (label) = 'De acuerdo con las informaciones anteriores, el alumnado se ha quejado de la actitud del profesorado en los exámenes finales. Los representantes estudiantiles son los alumnos Juanju y Javi.' actualOutput = 'De acuerdo con las informaciones anteriores, el alumnado se ha quejado de la actitud del profesorado en los exámenes finales. Los representantes estudiantiles son el alumnado Juanju y Javi.'

As you can see, segments are pretty similar. So, instead of measuring Bleu or BertScore here, we propose an alternate metric that would be DiffBleu:

DiffBleu=BLEU(actualOutputinputSegment,labelsinputSegment)DiffBleu = BLEU(actualOutput - inputSegment, labels - inputSegment)

Where the minuses as in set notation. This way, we also evaluate DiffBleu after the model has been trained.

Team Members

Enjoy!

Downloads last month
8
Safetensors
Model size
60.5M params
Tensor type
F32
·
Invalid base_model specified in model card metadata. Needs to be a model id from hf.co/models.

Dataset used to train somosnlp-hackathon-2022/es_text_neutralizer

Spaces using somosnlp-hackathon-2022/es_text_neutralizer 3

Collections including somosnlp-hackathon-2022/es_text_neutralizer

Evaluation results