Modeling Adaptive Inter-Task Feature Interactions via Sentiment-Aware Contrastive Learning for Joint Aspect-Sentiment Prediction

Wei Chen, Yuxuan Liu, Zhao Zhang, Fuzhen Zhuang, Jiang Zhong

Introduction

In Aspect-Level Sentiment Analysis (ALSA), the objective is to identify specific aspects (e.g., "Windows 7") and their corresponding sentiments (e.g., "Negative"). While these tasks are inherently linked, traditional models often apply a uniform interaction strategy across all inputs. However, the relationship between an aspect and its sentiment is not static; it varies significantly depending on the context of the sentence.

Examples of varying correlation strength between aspects and sentiments in different contexts.

For instance, a sentence like "The food is delicious" exhibits a strong, direct link between the aspect ("food") and the sentiment ("positive"). Conversely, a neutral statement like "I asked for seltzer with lime" has a much weaker correlation. Forcing a strong correlation in the latter case can lead to "negative transfer," where the model incorrectly predicts sentiment based on global biases rather than local context. Existing models using fixed interaction strategies often fail to account for this nuance.

The AIFI Framework

To address these challenges, researchers developed the Adaptive Inter-task Feature Interaction (AIFI) framework. AIFI moves away from "one-size-fits-all" modeling by dynamically adjusting the interaction between aspect and sentiment prediction tasks based on the "sentiment density" of each sentence.

The AIFI architecture featuring the Expert Layer, Correlation Prediction sub-network, and Contrastive Learning alignment.

The architecture consists of three primary components:

  1. Encoder & Expert Network: A pre-trained BERT model generates initial representations, which are then processed by an expert network to bifurcate features into aspect-specific and sentiment-specific branches.
  2. Contrastive Learning Alignment: The model employs a contrastive loss (InfoNCE) to align aspect and sentiment features. It pulls features from the same sentence closer in the latent space while pushing those from different sentences apart.
  3. Feature Correlation Network: This novel sub-network predicts the correlation strength of a sentence by analyzing the presence of emotional words. It outputs a value that adaptively sets the temperature parameter ($\tau$) for the contrastive loss. A low $\tau$ enforces strict alignment for sentiment-rich sentences, while a high $\tau$ allows for more flexibility in neutral contexts to prevent forced, incorrect associations.

Experimental Results

AIFI was evaluated on three benchmark datasets: Restaurant ($\mathbb{D}_R$), Laptop ($\mathbb{D}_L$), and Twitter ($\mathbb{D}_T$). The framework achieved new state-of-the-art (SOTA) performance across all metrics, notably outperforming large-scale general-purpose models like ChatGPT on these specialized NLU tasks.

  • Superior Performance: On the $\mathbb{D}_R$ dataset, AIFI reached an F1 score of 79.91%, a 1.12% improvement over previous benchmarks like HI-ASA.
  • Sentiment Accuracy: Significant gains were observed in sentiment prediction, particularly on the Twitter dataset, with accuracy increases of up to 1.67%.
  • Adaptive Advantage: Ablation studies confirmed that the adaptive temperature mechanism is crucial. Removing this component led to a measurable performance drop, validating the hypothesis that dynamic correlation is key to avoiding negative transfer.

Conclusion and Future Directions

AIFI demonstrates that modeling the nuance of inter-task relationships is vital for complex multi-task learning problems. By using sentiment as a proxy for correlation strength, the model effectively balances task alignment and independence. While the model excels in context-rich environments, it still faces challenges in short-context scenarios (like Twitter) and with implicit sentiments where explicit emotional keywords are absent. Future work will focus on refining how the model handles these implicit cues and exploring the application of adaptive contrastive learning to other multi-task domains.

Summary updated

BibTeX
@inproceedings{chen2024modeling,
  author = {Wei Chen and Yuxuan Liu and Zhao Zhang and Fuzhen Zhuang and Jiang Zhong},
  title = {{Modeling Adaptive Inter-Task Feature Interactions via Sentiment-Aware Contrastive Learning for Joint Aspect-Sentiment Prediction}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i16.29731},
}
Figure