Simple Sentiment Analysis Ansatz for Sentiment Classification in Quantum Natural Language Processing
Fariska Zakhralativa Ruskanda, Muhammad Rifat Abiwardani, Infall Syafalni, Harashta Tatimma Larasati, Rahmat Mulyawan
Abstract
Sentiment classification is a valuable application of natural language processing that has seen wide usage in optimizing business processes. This paper explores a novel implementation of sentiment analysis using the Variational Quantum Algorithms (VQA) framework. As ansatz choice determines model performance in VQA, this paper proposes an alternative ansatz for the sentiment classification task in quantum representation. Specifically, it builds upon previous work in quantum sentiment classification by proposing an alternative ansatz to the Instantaneous Quantum Polytime ansatz, entitled Simple Sentiment Analysis (SimpleSA) ansatz. A key feature of the SimpleSA ansatz is the decision to neglect noun parameterization. The proposed SimpleSA has less complexity than the other ansätze in terms of number of parameters and number of gates. Moreover, experimental results show that the SimpleSA ansatz with H-CNOT-Rz-H compound block construction outperforms the Instantaneous Quantum Polytime (IQP) ansatz at 85.00% accuracy. Furthermore, SimpleSA optimization converges 20.89% faster than Instantaneous Quantum Polytime (IQP) for the Simultaneous Perturbation Stochastic Approximation (SPSA) method with 130 iterations. The proposed work is useful for applications of quantum computers for sentiment analyses and classifications.