The GRU Paradigm: Innovating Emotional Intelligence in Neural Networks
Arman Kalra, Kanwarpartap Singh Gill · 2024
This research investigates emotion analysis in natural language processing (NLP) by employing bidirectional gated recurrent units (GRUs). Unlike conventional models that analyze data in one direction, bidirectional GRUs effectively capture dependencies from both the past and future within sequential data. This dual-direction capability is essential for tasks like emotion analysis, where context is significant. The model is constructed using a sequential architecture. First, an embedding layer transforms word indices into dense vectors for effective text processing. To prevent overfitting, a dropout layer with a 0.5 rate is incorporated. This is followed by two bidirectional GRU layers that return sequences and capture intricate temporal dependencies. A batch normalization layer is included to enhance training stability and speed. An additional bidirectional GRU layer with six units and a softmax activation function is used to classify emotions into six categories. The final layer is a dense layer, with the model employing the Adam optimizer and sparse categorical cross-entropy as the loss function. The model’s performance is assessed using accuracy, achieving a 94% success rate. This impressive result highlights the model’s capability in emotion prediction by revealing complex relationships within sequential data. The model summary provides insights into the parameters and choices that contribute to these outcomes.