Empathetic BERT2BERT Conversational Model: Learning Arabic Language Generation with Little Data

Tarek Naous, Wissam Antoun, Reem A. Mahmoud, Hazem M. Hajj

TL;DR

This paper introduces BERT2BERT, a transformer-based conversational model for generating empathetic responses in Arabic. By leveraging the pre-trained AraBERT model for initialization, it overcomes the challenge of limited Arabic data for Natural Language Generation (NLG) and achieves state-of-the-art performance in empathetic dialogue.

What Problem Does This Paper Address?

Building human-like conversational agents requires them to exhibit empathy, understanding and responding to user emotions. While Natural Language Understanding (NLU) for Arabic has seen progress with models like AraBERT, Natural Language Generation (NLG) for Arabic, especially in empathetic dialogue, remains a significant challenge. This is largely due to a scarcity of suitable Arabic datasets for training NLG models, particularly for open-domain conversational agents. Existing approaches often struggle with low-resource languages like Arabic, and previous attempts at empathetic Arabic chatbots have relied on less sophisticated retrieval or rule-based methods, limiting their flexibility and performance in open-ended conversations.

Methods

The core of this work is the BERT2BERT model, a transformer-based encoder-decoder architecture. The key innovation is warm-starting both the encoder and decoder with pre-trained weights from AraBERT (Antoun et al., 2020). This transfer learning approach allows the model to leverage the extensive linguistic knowledge captured by AraBERT, mitigating the need for massive amounts of task-specific Arabic data. The encoder-decoder attention mechanisms are randomly initialized. For generating responses, the model employs Top-K Sampling, a strategy that randomly selects from the K most likely word candidates at each step, aiming for more diverse and less repetitive outputs compared to traditional beam search.

Datasets

The primary dataset used is ArabicEmpatheticDialogues (Naous et al., 2020). This dataset was created by translating the English EmpatheticDialogues dataset (Rashkin et al., 2019) and contains approximately 36,628 samples of speaker utterances paired with empathetic responses, each labeled with an emotion. To address the complexity of Arabic and reduce vocabulary size, utterances were segmented using the Farasa segmenter (Abdelali et al., 2016). The dataset was partitioned into 90% training, 5% validation, and 5% testing sets.

Key Insights and Ideas

  • Transfer Learning is Crucial for Low-Resource NLG: The paper strongly demonstrates that initializing an NLG model with a powerful pre-trained language model (AraBERT) can significantly boost performance, even with limited task-specific data. This is a critical insight for developing advanced NLP applications in languages with fewer resources.
  • AraBERT's Power Extends to Generation: While AraBERT is primarily known for NLU tasks, this work shows its effectiveness in initializing an encoder-decoder for NLG, highlighting the versatility of large pre-trained models.
  • Empathy Requires More Than Just Emotion Labels: The model's success in generating empathetic responses suggests that learning from actual empathetic dialogues, rather than just appending emotion labels, is key to capturing nuanced emotional communication.
  • Neutral Chit-Chat is a Blind Spot: A notable finding is the model's struggle with neutral, non-emotional utterances. This suggests that models trained solely on emotionally charged data may not generalize well to everyday conversational contexts.

Key Results

  • Numerical Performance: The proposed BERT2BERT model achieved a low perplexity (PPL) of 17.0 and a BLEU score of 5.58. This represents a significant improvement over the baseline Bi-LSTM model (PPL 38.6, BLEU 0.5) and the EmoPrepend model (PPL 24.1, BLEU 3.16).
  • Human Evaluation: 85 native Arabic speakers rated the BERT2BERT model highly, with an average score of 4.3/5.0 across Empathy, Relevance, and Fluency. This significantly outperformed the Baseline (2.04 Empathy, 1.68 Relevance) and EmoPrepend (2.81 Empathy, 2.18 Relevance) models.
  • BERT2BERT-UN Performance: An uninitialized BERT2BERT model (BERT2BERT-UN) performed poorly (PPL 158.9, BLEU 0.1), underscoring the importance of AraBERT initialization.

Limitations and Future Work

The authors acknowledge a key limitation: the model struggles with neutral emotional states and tends to generate empathetic responses even for simple greetings like "Hey, how are you?". This is attributed to the fine-tuning dataset consisting primarily of emotionally charged utterances. Future work should focus on developing strategies to help the model determine when an empathetic response is appropriate and when a more standard conversational reply is needed.

Summary updated

BibTeX
@inproceedings{naous2021empathetic,
  author = {Tarek Naous and Wissam Antoun and Reem A. Mahmoud and Hazem M. Hajj},
  title = {{Empathetic BERT2BERT Conversational Model: Learning Arabic Language Generation with Little Data}},
  booktitle = {WANLP},
  year = {2021},
  url = {https://openreview.net/forum?id=QTMVi4qnqd},
}
Figure