A Hormone-Inspired Emotion Layer for Transformer Language Models (HELT)

Eslam Reda, Sara El-Metwally · 2026

Read A Hormone-Inspired Emotion Layer for Transformer Language Models (HELT) by Eslam Reda, Sara El-Metwally (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-13858.txt.

Introduction

Eslam Reda and Sara El-Metwally introduce HormoneT5, a shifter word model boosted with a Hormone Emotion Block copying the human gland system's role in feeling handling. These hormone values transform into a feeling code tuning encoder hidden states, enabling feeling-fitting response making. Tests on a picked emotion-tagged data show HormoneT5 reaches over 85 percent per-hormone hits within a 0.15 slack threshold. Hormone spread ranges exceed 0.85 across all six hormones between opposed feeling tones.

Catalog record

CREATOREslam Reda, Sara El-Metwally
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE77664
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.13858

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

A Hormone-Inspired Emotion Layer for Transformer Language Models (HELT) Eslam Reda, Sara El-Metwally Abstract Large Language Models (LLMs) have demonstrated remarkable capabilities in generating contextually relevant and grammatically correct text. However, they fundamentally lack the ability to process and respond to emotional context in a manner analogous to human emotional cognition. Current approaches to emotion modeling in NLP systems rely primarily on discrete emotion classification or simplistic sentiment analysis, which fail to capture the continuous, multi-dimensional nature of human emotional states. In this paper, we introduce HormoneT5 , a novel architecture that augments transformer language models with a biologically-inspired Hormone Emotion Block that simulates the human endocrine system’s role in emotional processing. Our approach computes six continuous hormone-like values (dopamine, serotonin, cortisol, oxytocin, adrenaline, and endorphins) through specialized per-hormone attention heads, each with orthogonally initialized learnable queries, temperature-scaled attention mechanisms, and deep output projections. These hormone values are then transformed into an emotional embedding that modulates the encoder hidden states, enabling emotionally-appropriate response generation. We propose a multi-objective training framework combining sequence-to-sequence loss, hormone prediction loss with margin penalties, and diversity regularization to prevent attention collapse. Experimental results on our curated emotion-labeled dataset demonstrate that HormoneT5 achieves 85%+ per-hormone accuracy within a 0.15 tolerance threshold, with hormone differentiation ranges exceeding 0.85 across all six hormones between contrasting emotional tones. Human evaluation studies show significant preference ( p < 0.01 p<0.01 ) for HormoneT5-generated responses in terms of emotional appropriateness and empathetic quality compared to baseline T5 outputs. Our work opens new directions for biologically-grounded affective computing and emotionally intelligent conversational agents. K eywords Emotion Modeling \cdot Transformer Language Models \cdot Attention Mechanisms \cdot Bio-Inspired Computing \cdot Affective Computing \cdot Natural Language Processing 1 Introduction Modern Large Language Models (LLMs) have achieved unprecedented success in natural language understanding and generation. Foundational models such as GPT [ 9 ] , T5 [ 58 ] , and BERT [ 15 ] demonstrate remarkable proficiency in tasks ranging from translation and summarization to question answering and open-ended dialogue. Despite these advanced linguistic capabilities, LLMs remain fundamentally constrained. Their processing is rooted in statistical pattern recognition, and lacks genuine comprehension of emotional context [ 38 ] . Consequently, while often technically correct, their responses are frequently emotionally flat. They fail to reflect the enthusiasm of positive inputs, defuse contentious exchanges effectively, or extend authentic empathy toward expressions of sadness [ 6 , 68 , 62 , 32 ] . This shortcoming originates in their underlying architecture, as standard transformer-based models lack any mechanism for modeling emotional states as dynamic, continuous, and interacting signals. Current approaches to emotion modeling in NLP largely treat emotion as a classification problem rather than as a continuous, multi-dimensional signal processing challenge [ 41 , 65 , 21 ] . This fundamentally differs from human emotional processing, which involves complex, simultaneous neurochemical interactions that shape mood, behavior, and social responses [ 19 , 25 ] . Existing methodologies can be broadly grouped into four categories, each with distinct limitations. The first category is binary sentiment analysis, which classifies text as simply positive or negative [ 33 , 71 , 26 ] . Its primary limitation is its excessive coarseness; it operates at a resolution too limited to represent the textured reality of emotional expression. The second approach is discrete emotion classification, which assigns text to predefined categorical labels such as happy, sad, or angry [ 13 , 73 ] . This method’s key shortcoming is its inherent assumption that emotions are discrete and mutually exclusive, ignoring their continuous, blended, and fluid nature in human experience. The third category operates within an arousal-valence representation, modeling emotions in a two-dimensional space of arousal (intensity) and valence (positivity/negativity) [ 49 , 52 ] . While more expressive than binary or discrete models, this framework still limits emotional expressiveness by constraining the rich spectrum of affect to just two primary axes. The fourth methodology is emotion token prepending, where explicit emotion labels (e.g., "[sad]") are added to the input text [ 23 , 17 ] . A significant drawback of this technique is that these tokens are static and lack learned, contextual emotional representations. Furthermore, they lack temporal dynamics, as the prepended token is processed in a single forward pass without modeling how emotional states evolve or interact over time. Consequently, the approach remains entirely dependent on explicit, often costly, manual labeling and cannot infer or generate emotional understanding dynamically. Each of these established paradigms fails to capture the dynamic, continuous, and interactive nature of emotional signals as they operate in human communication and neurobiological systems [ 81 , 75 ] . This paper proposes a fundamentally different, biologically-inspired approach to emotional modeling in NLP. Moving beyond discrete classification, we represent emotional states as six continuous hormonal signals, analogous to key neurochemicals in the human endocrine system [ 69 , 3 , 24 ] . Our framework models the influence of dopamine (motivation/reward), serotonin (mood stability), cortisol (stress/alertness), oxytocin (social bonding/empathy), norepinephrine (arousal/energy), and endorphins (joy/euphoria). The core of our architecture is the Hormone Emotion Block , which computes these continuous values via specialized attention mechanisms and uses them to dynamically modulate the transformer’s hidden representations. This innovation enables the model to transition from static text generation to generating contextually and emotionally-modulated responses. This paper makes the following contributions: 1. A Novel Hormone Emotion Block Architecture : The proposed model introduces a per-hormone attention mechanism with learnable orthogonally-initialized queries, temperature-scaled attention, and deep output projections to compute six continuous hormone values from encoder hidden states. 2. Transfer Learning from Pre-trained Attention : The results demonstrated that initializing Key/Value projections from T5’s pre-trained self-attention weights significantly improves hormone prediction accuracy and training stability. 3. Multi-Objective Training Framework : A combined loss function is proposed, incorporating sequence-to-sequence loss, hormone MSE with margin penalties, and diversity regularization to prevent attention collapse while maintaining generation quality. 4. Comprehensive Evaluation : Extensive automatic and human evaluation demonstrates significant improvements in emotional appropriateness, with 85%+ per-hormone accuracy and statistically significant human preference for HormoneT5 outputs. 5. Open-Source Implementation : The complete implementation, including model code, training scripts, the dataset, and pre-trained weights, is released to ensure reproducibility and facilitate further research. The code is available at: https://github.com/eslam-reda-div/HELT The remainder of this paper is organized as follows: Section 2 reviews related work in emotion modeling, controllable generation, and bio-inspired machine learning. Section 3 presents the biological motivation for the proposed hormone-based approach. Section 4 details the proposed model architecture, including the Hormone Attention Head, Hormone Emotion Block, and integration with T5. Section 5 describes the dataset and annotation methodology. Section 6 presents training details and implementation specifications. Section 7 reports experimental results including assessment metrics and human evaluation. Section 8 provides ablation studies and analysis. Section 9 discusses limitations and ethical considerations. Section 11 concludes the paper with future directions. 2 Related Work A paradigm of affective computing has been introduced to bridge the gap between human emotions and machines, aiming to build and study systems capable of simulating human affective states using Natural Language Processing (NLP) [ 70 , 1 ] . Picard [ 57 ] pioneered this field by arguing for machines that can recognize, express, and respond to emotion.

Read the complete text