Abstract
Text sentiment analysis is one of the most important tasks in the field of public opinion monitoring, service evaluation and satisfaction analysis under network environments. Compared with the traditional Natural Language Processing analysis tools, convolution neural networks can automatically learn useful features from sentences and improve the performance of the affective analysis model. However, the original convolution neural network model ignores sentence structure information which is very important for text sentiment analysis. In this paper, we add piece-wise pooling to the convolution neural network, which allows the model to obtain the sentence structure. And the main features of different sentences are extracted to analyze the emotional tendencies of the text. At the same time, the user’s feedback involves many different fields, and there is less labeled data. In order to alleviate the sparsity of the data, this paper also uses the generative adversarial network to make common feature extractions, so that the model can obtain the common features associated with emotions in different fields, and improves the model’s Generalization ability with less training data. Experiments on different datasets demonstrate the effectiveness of this method.
Introduction
While Convolutional Neural Networks (CNNs) have revolutionized feature extraction in Natural Language Processing, they often suffer from a "structural blind spot." Standard CNN architectures typically employ global max-pooling, which identifies the most salient feature in a sentence but discards its relative position and grammatical context. In sentiment analysis, the relationship between a subject, predicate, and object is vital for determining the true emotional valence of a statement.
Furthermore, sentiment analysis is highly domain-dependent. A word like "unpredictable" might be a compliment for a thriller movie but a severe criticism for a hotel's service. Collecting sufficient labeled data for every niche domain is impractical. This research addresses these challenges by introducing a hybrid architecture combining Piecewise Convolutional Neural Networks (PCNN) to preserve structure and Generative Adversarial Networks (GAN) to extract domain-invariant features.
Proposed Methodology
Piecewise Convolutional Neural Networks (PCNN)
The core innovation to address structural loss is the implementation of piecewise pooling. Instead of a single max-pooling operation over the entire feature map, the PCNN divides the convoluted feature vector into $m$ segments based on the sentence's grammatical structure (e.g., subject, predicate, and object).
By performing max-pooling on each segment separately, the model captures features specific to different parts of the sentence. This preserves the "internal logic" of the text that standard CNNs often flatten into a single value.
Adversarial Feature Extraction
To handle data sparsity across different domains (e.g., hotels vs. entertainment), the model integrates a GAN framework to separate features into "shared" and "private" spaces:
- Shared Space: Captures common emotional indicators universal across domains.
- Private Space: Captures domain-specific nuances.
- Adversarial Training: A shared CNN extracts features while a discriminator attempts to identify the source domain. The CNN is trained to "fool" the discriminator, ensuring the shared representation is domain-invariant and robust for cross-domain generalization.
Experimental Evaluation
The model was evaluated on three distinct benchmarks: the Ctrip Hotel dataset (Chinese), the Stanford Sentiment Treebank (SST, English), and a multi-domain Dianping dataset.
Key results include:
- Precision: On the SST dataset, the PCNN achieved 85.4% precision for binary classification, significantly outperforming standard CNNs (81.9%).
- Multi-Domain Robustness: On the sparse Dianping dataset, the fusion of PCNN and GAN reached a recall of 80.1%, compared to 74.9% for a standalone PCNN.
- Fine-Grained Analysis: The model showed superior performance in five-level sentiment classification (Very Negative to Very Positive), where capturing subtle structural cues is critical.
Conclusion
By integrating piecewise pooling and adversarial training, this method effectively captures sentence structure and improves generalization across domains with limited labeled data. While the performance is sensitive to the segmentation parameter $t$, the approach consistently outperforms traditional baselines and standard deep learning models. Future work will explore automating the segmentation process using dynamic dependency parsing to better adapt to various linguistic structures.
Summary updated