Introduction
In Natural Language Processing (NLP), attention mechanisms are pivotal for directing neural networks toward the most salient components of a sentence. However, traditional attention models are predominantly statistical, relying on word frequency or local context. These methods often lack a theoretical grounding in human linguistic processing. This paper introduces a "Cognition Based Attention" (CBA) model that leverages human eye-tracking data to guide sentiment analysis, positing that reading time is a direct indicator of semantic importance.
Methodology
The proposed framework operates in two distinct stages:
- Reading Time Prediction: A regression model is trained on eye-tracking corpora (such as GECO, Dundee, and Mishra) to predict the total reading time a human would spend on a word. This model utilizes linguistic features including word length, part-of-speech tags, and syntactic complexity.
- Cognition Based Attention (CBA) Layer: These predicted reading times are integrated into a Long Short-Term Memory (LSTM) network. The relative predicted reading time of a word serves as its attention weight at both the word and sentence levels.
As shown in the visualization above, CBA tends to assign higher weights to content-rich words (e.g., "2stars") compared to standard local attention, which may distribute weights more uniformly across function words.
Experimental Setup
The model was evaluated using several standard sentiment analysis benchmarks: IMDB, Yelp 13, and Yelp 14. These datasets include user and product metadata, allowing for complex attention configurations. Additionally, a plain-text version (IMDB2) was used to assess performance in the absence of metadata.
Results and Discussion
The CBA model demonstrates significant performance gains over traditional attention mechanisms. On the IMDB dataset, the CBA model achieved an accuracy of 0.489, outperforming the standard LSTM (0.443) and the Local Attention model (0.487).
The results in the table above highlight that CBA-based models consistently achieve the highest accuracy (ACC) and lowest Root Mean Square Error (RMSE) across all tested datasets. Notably, the combination of CBA with User-Product Attention (UPA) yielded the best results on the Yelp 14 dataset.
Conclusion
By bridging the gap between cognitive science and machine learning, the CBA model provides a more "human-like" attention mechanism. While the current model relies on total reading time, future iterations could incorporate more granular gaze features like saccades or regressions. Despite limitations regarding domain mismatch between eye-tracking corpora and web reviews, the success of CBA underscores the potential of using human cognitive effort as a supervisor for machine attention.
Summary updated