Abstract
Code-mixing—the fluid blending of multiple languages within a single conversation—is a prevalent linguistic phenomenon that poses significant challenges for Natural Language Processing (NLP). Current dialogue models often adopt a generic approach to response generation, failing to account for the individual personality traits that dictate linguistic style and tone. This paper introduces a novel framework designed to generate personality-aware responses in Hindi-English code-mixed dialogues. By utilizing an unsupervised personality identification method based on the "Big Five" traits and a specialized fusion mechanism called Personality-Aware Axial Attention (PA3), the proposed model achieves substantial improvements in response relevance, coherence, and character consistency.
Introduction
In multilingual societies, speakers frequently alternate between languages, a practice known as code-mixing. While common in daily life, this linguistic complexity is difficult for AI models to navigate, especially when trying to maintain a consistent persona. Most existing dialogue systems generate responses based solely on conversational context, ignoring the psychological profile of the speaker. However, a speaker's personality—whether they are extroverted, neurotic, or conscientious—profoundly influences their choice of words and code-mixing patterns.
This research addresses the gap between personality and code-mixed dialogue generation. The authors propose that by infusing models with personality-specific information, AI can generate responses that are not only grammatically correct in a code-mixed setting but also stylistically aligned with a specific persona.
Methodology
The researchers developed a two-phase approach to integrate personality into the response generation pipeline without requiring manually labeled personality data.
1. Unsupervised Personality Identification
Because datasets with explicit personality labels are scarce, the team employed a "pseudo-task" approach. Using a RoBERTa-base model, they classified speakers into the "Big Five" personality traits: Openness, Conscientiousness, Extraversion, Agreeableness, and Neuroticism. This classification was based on the speaker's historical dialogue within the dataset.
To make this information useful for a generative model, the identified traits were mapped to "templatic definitions." Instead of using a simple categorical label (e.g., "Extraversion"), the model was provided with a descriptive sentence (e.g., "The speaker thrives in social settings and is often enthusiastic"). This provides the transformer model with richer semantic context than a one-hot encoded tag.
2. Personality-Aware Axial Attention (PA3)
The core technical innovation of this work is the PA3 mechanism, designed to fuse dialogue history with personality definitions effectively. PA3 operates through two primary steps:
- Context-Aware Attention: This step learns to infuse personality-specific information directly into the "key" and "value" vectors of the dialogue representation, ensuring the model prioritizes personality-relevant context.
- Axial Attention: Borrowing a concept from computer vision, axial attention allows the model to explore relationships across different dimensions of the data—such as the sequence of words versus the specific attributes of the personality—without collapsing the original structure of the conversation.
Experimental Setup and Dataset
The study utilized the MaSaC dataset, which consists of multi-party, multi-turn Hindi-English code-mixed conversations. The data is derived from the Indian television show Sarabhai v/s Sarabhai. This dataset is uniquely suited for personality research because the characters possess distinct, exaggerated personas—ranging from the sophisticated and elitist Maya to the middle-class and practical Monisha. These well-defined characters provide a rigorous testing ground for whether a model can successfully adopt a specific "voice."
Results and Discussion
The PA3 framework was tested against several baseline architectures, including standard Transformers, T5, and BART.
Quantitative Performance
The inclusion of personality traits led to a significant leap in performance metrics. For the BART-based model, ROUGE-1 scores increased by 13% to 21%, while BLEU-1 scores saw improvements between 12% and 38%. These gains suggest that personality context helps the model narrow down the likely vocabulary and phrasing in a code-mixed environment.
Human Evaluation and Qualitative Analysis
In a blind study involving 25 human evaluators, the personality-infused model (BART-PA3) consistently outperformed standard models in fluency, coherence, and relevancy. Qualitatively, the model demonstrated a superior ability to mimic character-specific nuances. For example, when prompted with a scenario involving a social conflict, the model adjusted its code-mixing frequency and word choice to match the character's established persona, whereas baseline models produced generic, personality-neutral responses.
Conclusion
This research demonstrates that personality is a vital component of naturalistic code-mixed dialogue. By moving beyond simple labels and using templatic definitions combined with axial attention, the PA3 framework allows for more nuanced and human-like AI interactions.
While the study is currently limited by the use of a single, scripted dataset (MaSaC), it opens the door for future work in more diverse linguistic pairs and real-world conversational settings. The success of the "pseudo-task" approach for personality identification also suggests that high-quality, persona-driven dialogue systems can be built even in the absence of expensive, human-annotated psychological data.
Summary updated