Affective Prompt-Tuning-Based Language Model for Semantic-Based Emotional Text Generation

Affective Prompt-Tuning-Based Language Model for Semantic-Based Emotional Text Generation

Zhaodong Gu, Kejing He
Copyright: © 2024 |Pages: 19
DOI: 10.4018/IJSWIS.339187
Article PDF Download
Open access articles are freely available for download

Abstract

The large language models based on transformers have shown strong text generation ability. However, due to the need for significant computing resources, little work has been done to generate emotional text using language models such as GPT-2. To address this issue, the authors proposed an affective prompt-tuning-based language model (APT-LM) equipped with an affective decoding (AD) method, aiming to enhance emotional text generation with limited computing resources. In detail, the proposed model incorporates the emotional attributes into the soft prompt by using the NRC emotion intensity lexicon and updates the additional parameters while freezing the language model. Then, it steers the generation toward a given emotion by calculating the cosine distance between the affective soft prompt and the candidate tokens generated by the language model. Experimental results show that the proposed APT-LM model significantly improves emotional text generation and achieves competitive performance on sentence fluency compared to baseline models across automatic evaluation and human evaluation.
Article Preview
Top

Introduction

Artificial intelligence (AI) has numerous applications in various fields, including cloud computing (Bisht & Vampugani, 2022; Ilyas et al., 2022), intelligent systems (Casillo et al., 2022; Deveci et al., 2023), digital transformation (Gupta et al., 2023; Li et al., 2023), text detection (Yen et al., 2021; Zhang et al., 2023), and more. However, AI generally lacks the ability to express human emotions. Emotional intelligence is an important branch of artificial intelligence, which has been widely studied and explored in the field of natural language processing (NLP) (Barbosa et al., 2022; Chopra et al., 2022; Ismail et al., 2022). Emotional text generation, in particular, holds great potential for a variety of applications. Research shows that systems that can express emotions significantly improve user satisfaction (Prendinger & Ishizuka, 2005; Abo-Hammour et al., 2013; Arqub & Abo-Hammour, 2014). In the field of dialogue systems, some studies have improved the generated responses by endowing the dialogue system with increased empathy towards human users (Colombo et al., 2019; Abo-Hammour et al., 2014; Abu Arqub et al., 2012). The controlled emotional text generation model not only enables a more meaningful dialogue between AI agents and humans, but also aims to establish emotional connections with readers. This model proves beneficial for conversation therapy robots, as it can produce suitable emotional responses according to the user's psychological state (Sarivougioukas & Vagelatos, 2022).

Despite the diverse range of applications for emotional text generation, how to better integrate emotions into the generation model is still a difficult problem. Conventional methods for emotional text generation primarily rely on discourse templates and manual rules, frequently demonstrating limitations in addressing complex situations. Deep learning based methods have gained widespread usage in NLP tasks since the proposal of the recurrent neural network (RNN) Encoder-Decoder model by Cho et al. (2014). Vaswani et al. (2017) proposed the transformer architecture, which has significantly advanced NLP tasks by enabling large-scale language model training on massive datasets (Radford et al., 2019). Although deep learning-based methods have made significant progress in classification tasks (Chen et al., 2022), generating emotional text remains a challenging task, in contrast to the success achieved in sentiment classification (Yang et al., 2019). In particular, generation models based on transformer architecture can leverage a significant amount of unlabeled data for training. Nevertheless, this approach makes it challenging to change the attributes of the generated text without either modifying the model's architecture or utilizing specific attribute data for fine-tuning (Keskar et al., 2019; Zhang et al., 2018). Therefore, it becomes more difficult to incorporate emotional attributes into the pretrained model. However, most of the emotional text generation models today are still based on the Seq2Seq model of the RNN architecture, failing to take advantage of the latest pretrained transformer models such as GPT.

Complete Article List

Search this Journal:
Reset
Volume 20: 1 Issue (2024)
Volume 19: 1 Issue (2023)
Volume 18: 4 Issues (2022): 2 Released, 2 Forthcoming
Volume 17: 4 Issues (2021)
Volume 16: 4 Issues (2020)
Volume 15: 4 Issues (2019)
Volume 14: 4 Issues (2018)
Volume 13: 4 Issues (2017)
Volume 12: 4 Issues (2016)
Volume 11: 4 Issues (2015)
Volume 10: 4 Issues (2014)
Volume 9: 4 Issues (2013)
Volume 8: 4 Issues (2012)
Volume 7: 4 Issues (2011)
Volume 6: 4 Issues (2010)
Volume 5: 4 Issues (2009)
Volume 4: 4 Issues (2008)
Volume 3: 4 Issues (2007)
Volume 2: 4 Issues (2006)
Volume 1: 4 Issues (2005)
View Complete Journal Contents Listing