Abstract
Developing empathetic conversational agents in Arabic is significantly hindered by the lack of large-scale dialogue datasets. This paper introduces a BERT2BERT model that leverages transfer learning by warm-starting a Transformer encoder-decoder architecture with pre-trained AraBERT weights. Our approach demonstrates that high-quality, empathetic Arabic text generation is achievable even with limited fine-tuning data, significantly outperforming traditional Sequence-to-Sequence (Seq2Seq) baselines.
Introduction
While Natural Language Understanding (NLU) for Arabic has seen massive leaps, Natural Language Generation (NLG)—specifically for open-domain conversational agents—lags behind. The primary bottleneck is data scarcity; training neural chatbots typically requires massive conversational datasets that do not exist in abundance for Arabic. Standard models trained from scratch on small datasets often produce generic, repetitive, or irrelevant responses.
Methodology
The authors adopt a BERT2BERT architecture, a standard Transformer-based Seq2Seq model. The critical innovation for this low-resource setting is warm-starting: instead of training the encoder and decoder from scratch, both are initialized with the weights of AraBERT, a powerful pre-trained Arabic language model. This allows the model to leverage a deep foundational understanding of Arabic grammar and semantics learned from a 24GB news corpus.
To optimize for the complexities of the Arabic language, several key techniques were employed:
- Morphological Segmentation: Using the Farasa segmenter to break down complex words, reducing the vocabulary size from 47K to 13K tokens and mitigating lexical sparsity.
- Emotion Grouping: Simplifying the task by mapping 32 granular emotion labels into 6 primary categories (Joy, Surprise, Love, Anger, Fear, Sadness).
- Decoding Strategy: Utilizing Top-K sampling to generate more diverse and human-like responses compared to standard beam search.
Datasets and Evaluation
The model was trained on the ArabicEmpatheticDialogues dataset, an Arabic-translated version of the English EmpatheticDialogues corpus, containing 36,628 utterance-response pairs.
Quantitative Results
The BERT2BERT model achieved state-of-the-art performance, crushing previous baselines:
- Perplexity (PPL): 17.0 (vs. 38.6 for Bi-LSTM and 159.8 for uninitialized Transformer).
- BLEU Score: 5.58 (vs. 0.5 for Bi-LSTM and 0.1 for uninitialized Transformer).
Qualitative Results
In a blind human evaluation by 85 native speakers, the model received high marks on a 0-5 scale:
- Empathy: 4.0
- Relevance: 3.59
- Fluency: 4.30
Conclusion and Future Work
This research proves that transfer learning via warm-starting is a vital strategy for low-resource NLG tasks. While the model is highly effective at generating empathetic responses, it tends to over-apply emotional tones to neutral prompts. Future work will focus on developing mechanisms to help the model distinguish when to provide an empathetic response versus a standard, neutral reply.
Summary updated