Abstract
Emotion detection in text typically relies on supervised learning, which is constrained by the need for large labeled datasets and susceptibility to domain shift. We present ESTeR (Emotion-Sensitive TextRank), an unsupervised framework that leverages large-scale word co-occurrence graphs and emotion lexicons. By modeling emotion detection as a graph-based ranking problem using a random-walk algorithm, ESTeR achieves state-of-the-art unsupervised performance across diverse datasets, including tweets and literature, while maintaining computational efficiency and interpretability.
Introduction
Detecting emotions like anger, joy, or sadness in user-generated content is critical for applications ranging from sentiment analysis to public health monitoring. Traditional deep learning approaches, while effective, require massive amounts of manually labeled data. This poses significant challenges: labeling is resource-intensive, and models often fail when applied to new domains (e.g., transitioning from movie reviews to pandemic-related tweets). Unsupervised methods, such as lexicon matching or word embeddings, often suffer from data sparsity or lack transparency. ESTeR addresses these issues by bridging the gap between input text and emotion lexicons through a robust graph-based framework.
Methods
ESTeR treats emotion detection as a graph-based ranking problem. The framework constructs a word graph where nodes represent words and edges denote co-occurrence frequencies in a large general corpus, such as Wikipedia or Twitter.
Using a "Random Walk with Restarts" (Personalized PageRank) algorithm, the model calculates the probability that a walker starting from words in the input sentence will land on a word associated with a specific emotion in a curated lexicon, such as EmoLex. This approach effectively handles sparsity; even if a sentence lacks direct lexicon matches, the graph identifies latent connections through intermediate co-occurring terms. Computationally, the system is optimized by solving a linear system of equations at the dataset level, enabling the processing of thousands of documents in minutes.
Results and Discussion
Evaluation across five public datasets (SemEval2018, SSEC, DENS, TEC, and CrowdFlower) demonstrates that ESTeR consistently outperforms unsupervised baselines, including emotion-enriched embeddings like emo2vec. For instance, on the SemEval2018 dataset, ESTeR achieved an F1@2 score of 0.403, surpassing the best embedding-based baseline of 0.379.
Ablation studies revealed that the choice of co-occurrence graph and lexicon significantly impacts performance. Domain-specific graphs (e.g., Twitter-based graphs for tweet datasets) generally yield better results. Furthermore, high-quality, human-curated lexicons like EmoLex proved more effective than larger, automatically generated ones.
Case Study: COVID-19 Sentiment Tracking
To demonstrate real-world utility, ESTeR was applied to an unlabeled dataset of 17,000 tweets from March 2020. The model successfully identified macro-level emotional trends associated with specific hashtags. For example, #quarantine and #yemen were strongly associated with fear, while #trump was associated with surprise, and #NHS with trust and joy, reflecting public gratitude toward healthcare workers.
Conclusion
ESTeR provides a powerful, unsupervised alternative for emotion detection that is both domain-robust and interpretable. By combining the structural information of word co-occurrence graphs with the semantic precision of emotion lexicons, it overcomes the limitations of data sparsity and the high costs of supervised learning. Future work will explore more complex graph centrality measures and the application of this framework to other nuanced text classification tasks.
Summary updated