---
title: "LoveHeaven at MAHED 2025 — paper by Bảo and Thin (2025)"
description: "The paper describes a text-only system for Sub-task 1 of the MAHED 2025 shared task at ArabicNLP 2025. 4 references, cited by 1 paper here."
authors: ["Nguyễn Thiên Bảo", "Dang Van Thin"]
year: 2025
venue: "Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks"
source: "https://aclanthology.org/2025.arabicnlp-sharedtasks.79/"
doi: "10.18653/v1/2025.arabicnlp-sharedtasks.79"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/bao-2025-loveheaven-mahed-2025-text-based/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bao-2025-loveheaven-mahed-2025-text-based/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/page/15/) / LoveHeaven at MAHED 2025: Text-based Hate and Hope Speech Classification Using AraBERT-Twitter Ensemble

# LoveHeaven at MAHED 2025: Text-based Hate and Hope Speech Classification Using AraBERT-Twitter Ensemble

**Authors:** Nguyễn Thiên Bảo and [Dang Van Thin](https://md.research.elamur.ai/free/en/authors/dang-van-thin/) · **Year:** 2025 · **Venue:** [Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks](https://md.research.elamur.ai/free/en/venues/arabicnlp/) ([ArabicNLP 2025](https://md.research.elamur.ai/free/en/venues/arabicnlp/2025/)) · **Publisher:** [Association for Computational Linguistics](https://md.research.elamur.ai/free/en/publishers/association-for-computational-linguistics/) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2025.arabicnlp-sharedtasks.79/) · [PDF](https://aclanthology.org/2025.arabicnlp-sharedtasks.79.pdf) · [DOI 10.18653/v1/2025.arabicnlp-sharedtasks.79](https://doi.org/10.18653/v1/2025.arabicnlp-sharedtasks.79) · [OpenAlex](https://openalex.org/W4416037638)

**Citations:** 0 citations (OpenAlex, 2026-10-14) · [1](https://md.research.elamur.ai/free/en/papers/bao-2025-loveheaven-mahed-2025-text-based/cited-by/) in our library, of the 149,439 papers whose bibliographies we read

## Summary
The paper describes a text-only system for Sub-task 1 of the MAHED 2025 shared task at ArabicNLP 2025. The task is to label short Arabic social-media posts, in MSA or dialect, as hate, hope, or not_applicable, and systems are scored by macro-F1. The authors fine-tune aubmindlab/bert-base-arabertv02-twitter, an AraBERT variant further pretrained on tweets. Before training, they clean the data: they normalize text with ArabertPreprocessor, strip URLs, mentions and non-Arabic characters, and resolve duplicated training items. They then tune hyperparameters with Optuna and train one model per fold of a 4-fold stratified split. At inference, the four models' logits are averaged. The Twitter-adapted model edges out standard AraBERT on validation and test, and the ensemble beats a single model trained on all the data. The system placed 4th on the leaderboard, roughly 0.02 macro-F1 behind the winner. It ran entirely on free Kaggle hardware. The work shows that careful data hygiene, a domain-matched encoder and modest ensembling get close to the top of a noisy, imbalanced, dialect-heavy classification task.

## Key points
- Data: 6,890 labeled training samples and 1,476 validation samples whose labels were hidden, so scores came only from the leaderboard; about 320 duplicates appeared in the training set.
- Duplicate policy: identical texts with conflicting labels were all dropped, and identical texts with the same label were reduced to a single copy.
- Tuning: Optuna ran 18 trials at max_length 256 and 30 trials at 128, searching learning rate in [1e-6, 1e-5], 2–5 epochs and batch sizes {8, 16, 32}. The chosen setup was max_length 256, learning rate ≈ 9.74e-6, batch 8 and 4 epochs, trained with AdamW, cross-entropy and linear warmup-decay.
- Results: on validation, AraBERT-Twitter scored macro-F1 0.6563 against 0.6403 for AraBERT; on test, it scored 0.7030 against 0.7017. The final ranking was 4th overall, with accuracy and precision in the top 3.
- Compute: a single Tesla P100 16GB on the Kaggle free tier, which limited how widely hyperparameters could be explored.

## Interesting ideas
- Duplicates that disagree on their label are treated as unreliable and discarded entirely, rather than resolved by majority vote, which removes contradictory supervision cheaply
- Fold models are combined by averaging their raw logits rather than voting on final labels, which keeps each model's confidence and smooths out per-fold variance
- The input length limit is chosen from the actual distribution of text lengths and then confirmed experimentally, rather than set to a default
- The encoder is picked to match the register of the data (tweets for informal dialect text), and this alone gave a measurable gain
- Macro-F1 is used as the main metric so that minority classes count as much as the dominant one

## For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

- **I1** (learn): when witness parsers produce identical sentences with conflicting silver trees, drop the item instead of picking a winner, so that only agreed data enters training.
- **I2** (tree): gparse could average arc and label scores from several fold-trained checkpoints before decoding, which should give steadier trees on rare constructions.
- **I3** (tree): set the gparse context window from measured sentence lengths per treebank, so long sentences are not truncated and compute is not wasted on padding.
- **I4** (tokens): pick or adapt the tagger and morphology models to the genre of the input, such as fables or school tests, rather than relying on one generic model.
- **I5** (frames): report macro-F1 over speech-act and irony labels, so that rare acts are not hidden behind frequent assertions.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

📚 Shelves (4): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works

🧭 Topics (1): [Semitic languages](https://md.research.elamur.ai/free/en/topics/semitic-languages/) · 2,908 works

## Cite

Cite as: Nguyễn Thiên Bảo and Dang Van Thin. 2025. LoveHeaven at MAHED 2025: Text-based Hate and Hope Speech Classification Using AraBERT-Twitter Ensemble. Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{bao2025loveheaven,
  title = {{LoveHeaven at MAHED 2025: Text-based Hate and Hope Speech Classification Using AraBERT-Twitter Ensemble}},
  author = {Nguyễn Thiên Bảo and Dang {Van Thin}},
  booktitle = {Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks},
  year = {2025},
  doi = {10.18653/v1/2025.arabicnlp-sharedtasks.79},
  url = {https://doi.org/10.18653/v1/2025.arabicnlp-sharedtasks.79}
}
```

- [← previous Lost in Variation: An Unsupervised Methodology for Mining Lexico-syntactic Patterns in Middle Arabic Texts](https://md.research.elamur.ai/free/en/papers/bezancon-2025-lost-variation-unsupervised-methodology-mining/)
- [next → MarsadLab at AraGenEval Shared Task: LLM-Based Approaches to Arabic Authorship Style Transfer and Identification](https://md.research.elamur.ai/free/en/papers/biswas-2025-marsadlab-arageneval-shared-task-llm/)
- [↑ back to papers of 2025](https://md.research.elamur.ai/free/en/papers/2025/page/15/)

## References

4 references, 3 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Firoj Alam, Md Rafiul Biswas, Uzair Shah, Wajdi Zaghouani, and Georgios Mikros. 2024. [Propaganda to hate: A multimodal analysis of arabic memes with multi-agent llms](https://md.research.elamur.ai/free/en/papers/alam-2024-propaganda-hate-multimodal-analysis-arabic/). In International Conference on Web Information Systems Engineering, pages 380– 390. Springer.
2. Wissam Antoun, Fady Baly, and Hazem Hajj. 2020. [Arabert: Transformer-based model for arabic language understanding](https://md.research.elamur.ai/free/en/papers/antoun-2020-arabert-transformer-based-model-arabic/). arXiv preprint arXiv:2003.00104. [↗](https://arxiv.org/abs/2003.00104)
3. Wajdi Zaghouani and Md Rafiul Biswas. 2025a. [An annotated corpus of arabic tweets for hate speech analysis](https://md.research.elamur.ai/free/en/papers/zaghouani-2025-annotated-corpus-arabic-tweets-hate/). arXiv preprint arXiv:2505.11969. [↗](https://arxiv.org/abs/2505.11969)
4. Wajdi Zaghouani and Md Rafiul Biswas. 2025b. Emohopespeech: An annotated dataset of emotions and [find](https://scholar.google.com/scholar?q=Wajdi+Zaghouani+and+Md+Rafiul+Biswas%2E+2025b%2E+Emohopespeech%3A+An+annotated+dataset+of+emotions+and)

*Updated 31 October 2026*
