transformers safetensors deberta-v2 text-classification translationese classification sea southeast asia en id ms vi th lo km my tl arxiv:2406.10118 license:apache-2.0 autotrain_compatible endpoints_compatible region:us
---
language:
- en
- id
- ms
- vi
- th
- lo
- km
- my
- tl
library_name: transformers
license: apache-2.0
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- translationese
- classification
- sea
- southeast asia
---

<img width="100%" alt="SEACrowd Logo" src="https://github.com/SEACrowd/.github/blob/main/profile/assets/seacrowd-email-banner-without-logo.png?raw=true">

This is our fine-tuned mDeBERTa SEA translationese classifier for the ["SEACrowd: A Multilingual Multimodal Data Hub and Benchmark Suite for Southeast Asian Languages"](https://arxiv.org/pdf/2406.10118) paper.

SEACrowd is a [collaborative initiative](https://github.com/SEACrowd) that consolidates a [comprehensive resource hub](https://seacrowd.github.io/seacrowd-catalogue/) that fills the resource gap by [providing standardized corpora](https://github.com/SEACrowd/seacrowd-datahub) in nearly 1,000 Southeast Asian (SEA) languages across three modalities.

# Model Card for Model ID

To analyze the generation quality of LLMs in SEA languages, we build a text classifier to discriminate between translationese and natural texts. We construct a translationese classification training and testing dataset using 49 and 62 data subsets, respectively, covering approximately 39.9k and 51.5k sentences across 9 SEA languages: English (eng), Indonesian (ind), Khmer (khm), Lao (lao), Burmese (mya), Filipino (fil), Thai (tha), Vietnamese (vie), and Malay (zlm).

> Our translationese vs. natural train/test data is available on [SEACrowd/sea_translationese_resampled](https://huggingface.co/datasets/SEACrowd/sea_translationese_resampled).

To fine-tune the translationese classifier, check out our [experiments repository on GitHub](https://github.com/SEACrowd/seacrowd-experiments). We use a binary label (translationese, i.e., machine-translated or human-translated, or natural, i.e., human-generated) instead of 3 labels (machine-translated, human-translated, human-generated).

## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->

This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.

- **Developed by:** SEACrowd
- **Funded by:** SEACrowd
- **Shared by:** SEACrowd
- **Model type:** Encoder-Only (DebertaV2ForSequenceClassification)
- **Language(s) (NLP):** eng, ind, khm, lao, mya, fil, tha, vie, zsm
- **License:** Apache 2.0
- **Finetuned from model:** microsoft/mdeberta-v3-base

### Model Sources

<!-- Provide the basic links for the model. -->

- **Paper:** https://arxiv.org/abs/2406.10118
- **Experiment:** https://github.com/SEACrowd/seacrowd-experiments
- **Data Hub:** https://github.com/SEACrowd/seacrowd-datahub

## Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->

To discriminate between translationese and natural texts in 9 SEA languages: English (eng), Indonesian (ind), Khmer (khm), Lao (lao), Burmese (mya), Filipino (fil), Thai (tha), Vietnamese (vie), and Malay (zlm).

### Direct Use

<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
The model is developed for detecting whether a text is `human-translated`, `machine-translated`, or `natural`.
The model supports 9 languages: `eng`, `ind`, `khm`, `lao`, `mya`, `fil`, `tha`, `vie`, `zsm`

The label mapping of the model is defined as follows:
```
{0: 'Human-translated', 1: 'Machine-translated', 2: 'Natural'}
```

where both `0` and `1` correspond to translationese and `2` is natural.

### Out-of-Scope Use

<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
- Use in any manner that violates applicable laws or regulations (including trade compliance laws). 
- Use in any other way that is prohibited by the Acceptable Use Policy and Apache 2.0 License. 
- Use in languages other than the 9 supported languages.

## Bias, Risks, and Limitations

<!-- This section is meant to convey both technical and sociotechnical limitations. -->
The model achieves 79.08% accuracy on `translationese` (combining `human-translated` and `machine-translated`) vs `natural` in our evaluation——averaged across the aforementioned SEA languages. 
Users should be aware of the risks that there might be potential error produced by the model.

See [our paper](https://arxiv.org/pdf/2406.10118) for more details.

### Recommendations

<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.

## How to Use the Model

```
tokenizer = AutoTokenizer.from_pretrained('SEACrowd/mdeberta-v3_sea_translationese')
model = AutoModelForSequenceClassification.from_pretrained('SEACrowd/mdeberta-v3_sea_translationese')
inputs = tokenizer('<INPUT_TEXT>', padding='longest', max_length=512, truncation=True)
outputs = model(**inputs)
```

## Citation

<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->

If you are using any resources from SEACrowd, including datasheets, dataloaders, code, etc., please cite [the following publication](https://arxiv.org/pdf/2406.10118):

```
@article{lovenia2024seacrowd,
      title={SEACrowd: A Multilingual Multimodal Data Hub and Benchmark Suite for Southeast Asian Languages}, 
      author={Holy Lovenia and Rahmad Mahendra and Salsabil Maulana Akbar and Lester James V. Miranda and Jennifer Santoso and Elyanah Aco and Akhdan Fadhilah and Jonibek Mansurov and Joseph Marvin Imperial and Onno P. Kampman and Joel Ruben Antony Moniz and Muhammad Ravi Shulthan Habibi and Frederikus Hudi and Railey Montalan and Ryan Ignatius and Joanito Agili Lopo and William Nixon and Börje F. Karlsson and James Jaya and Ryandito Diandaru and Yuze Gao and Patrick Amadeus and Bin Wang and Jan Christian Blaise Cruz and Chenxi Whitehouse and Ivan Halim Parmonangan and Maria Khelli and Wenyu Zhang and Lucky Susanto and Reynard Adha Ryanda and Sonny Lazuardi Hermawan and Dan John Velasco and Muhammad Dehan Al Kautsar and Willy Fitra Hendria and Yasmin Moslem and Noah Flynn and Muhammad Farid Adilazuarda and Haochen Li and Johanes Lee and R. Damanhuri and Shuo Sun and Muhammad Reza Qorib and Amirbek Djanibekov and Wei Qi Leong and Quyet V. Do and Niklas Muennighoff and Tanrada Pansuwan and Ilham Firdausi Putra and Yan Xu and Ngee Chia Tai and Ayu Purwarianti and Sebastian Ruder and William Tjhi and Peerat Limkonchotiwat and Alham Fikri Aji and Sedrick Keh and Genta Indra Winata and Ruochen Zhang and Fajri Koto and Zheng-Xin Yong and Samuel Cahyawijaya},
      year={2024},
      eprint={2406.10118},
      journal={arXiv preprint arXiv: 2406.10118}
}
```