Abstract
CogAlign is a novel framework designed to enhance Natural Language Processing (NLP) models by aligning their internal text representations with human cognitive signals, such as eye-tracking and EEG data. By utilizing adversarial learning and a "text-aware" attention mechanism, CogAlign effectively bridges the modality gap between discrete text and continuous biological signals. The framework learns to filter noise from cognitive data and can transfer this "cognitive knowledge" to standard datasets where no brain signals are available, leading to significant performance gains across multiple NLP tasks.
Introduction
Recent advancements in NLP have sought to incorporate human cognitive data—signals recorded while humans read—to capture nuances like cognitive load or surprise that raw text may lack. However, integrating these signals poses two primary challenges: the modality gap between word embeddings and biological data, and the high noise levels inherent in signals like EEG. CogAlign addresses these by moving beyond simple feature concatenation toward deep, adversarial alignment.
The CogAlign Framework
The CogAlign architecture consists of three core components designed to harmonize disparate data types:
- Text-Aware Attention: This mechanism computes a compatibility matrix between text and cognitive signals. It filters out task-irrelevant noise by assigning higher weights to signals that correlate with the specific word and task (e.g., Named Entity Recognition).
- Adversarial Alignment: At the heart of the model is a shared encoder paired with a modality discriminator. Through adversarial training using a Gradient Reversal Layer, the encoder is forced to produce representations where the discriminator cannot distinguish between text and cognitive modalities.
- Private vs. Shared Encoders: The model employs private encoders to retain modality-specific features while the shared encoder focuses on the common semantic space.
A significant advantage of this approach is the Inference Trick: during test time, the model does not require cognitive signals. The shared encoder, having been "cognitively-augmented" during training, generates high-quality representations from text alone.
Experimental Results
The researchers evaluated CogAlign on three tasks: Named Entity Recognition (NER), Sentiment Analysis (SA), and Relation Extraction (RE), primarily using the Zurich Cognitive Language Processing Corpus (ZuCo).
Performance Gains
CogAlign consistently outperformed state-of-the-art baselines:
- NER: Achieved an F1 score of 86.79% (vs. 83.48% baseline).
- Sentiment Analysis: Improved F1 from 58.27% to 65.40%.
- Relation Extraction: Improved F1 from 75.25% to 78.93%.
Visualizing Alignment
The effectiveness of the adversarial training is evident in the latent space. Without adversarial alignment, the text and cognitive representations remain clustered separately. With the adversarial loss, the distributions overlap, indicating a successful bridge across the modality gap.
Transfer Learning
CogAlign demonstrates strong transferability. When trained on ZuCo and tested on the Wikigold dataset (which lacks cognitive signals), it achieved an F1 of 77.76%, significantly higher than the text-only baseline of 75.19%. This suggests that small, high-quality cognitive datasets can be used to pre-train more effective general-purpose text encoders.
Conclusion
CogAlign represents a step forward in biologically-inspired NLP. By treating cognitive signals as a complementary modality to be aligned rather than just appended, the model achieves superior performance and robust transferability. While EEG data remains challenging due to its low signal-to-noise ratio, the framework's ability to "denoise" and align these signals opens new avenues for creating machine learning models that more closely mirror human language processing.
Summary updated