Online restaurant platforms feature many customer reviews that discuss various aspects of the dining experience, such as food quality, service, ambiance, and price. It can be hard to draw clear conclusions from these reviews because a single review might express mixed opinions on several aspects. Traditional sentiment analysis often misses these details. This study proposes an Aspect-Based Sentiment Analysis (ABSA) framework that uses transformer-based models to identify sentiment for each aspect in restaurant reviews. A custom dataset was created by collecting restaurant reviews and manually labelling aspect-sentiment pairs as positive, neutral, or negative. For training, aspect terms were combined with the review text in the format \"Aspect: Review\" to help the model focus on the link between the aspect and its sentiment. This approach was tested using transformer models, specifically BERT and DeBERTa. The results show that DeBERTa outperforms BERT in detecting context and recognizing sentiment in some cases. These results highlight the effectiveness of contextual transformer models for detailed sentiment analysis of restaurant reviews.
Introduction
With the rise of digital platforms, user-generated content such as online restaurant reviews has grown significantly. Reviews on platforms like Google Maps influence customer decisions and shape restaurant reputations. They commonly address aspects such as food quality, service, ambiance, price, cleanliness, and wait times. Due to the large volume and unstructured nature of reviews, automated analysis is required.
Sentiment analysis classifies text as positive, neutral, or negative, but traditional approaches assign a single label per review, overlooking nuanced opinions. Aspect-Based Sentiment Analysis (ABSA) addresses this by identifying specific aspects in a review and assigning sentiment to each, providing actionable insights for restaurant management. ABSA is challenging due to informal language, implicit opinions, negation, sarcasm, and context-dependent meanings.
Recent advances in transformer-based models, such as BERT and DeBERTa, have improved ABSA by capturing long-range dependencies and contextual relationships. BERT serves as a strong baseline, while DeBERTa’s disentangled attention separates semantic and positional information, enhancing context comprehension. Effective sentiment analysis also requires high-quality datasets, careful labeling, and appropriate evaluation metrics. Despite progress, research gaps remain in restaurant-specific ABSA, including systematic comparisons of baseline and advanced transformer models.
This study aims to develop a context-aware ABSA framework for restaurant reviews, comparing DeBERTa against a BERT baseline. The framework uses an aspect-aware input format (Aspect: Review Text) to predict sentiment at the aspect level, enabling separate predictions for food, service, ambiance, price, and cleanliness. Reviews are tokenized and processed through transformer encoders, followed by a classifier predicting positive, neutral, or negative sentiment. Model performance is evaluated using Accuracy, Macro-Precision, Macro-Recall, and Macro-F1, addressing class imbalance and emphasizing precise aspect-level sentiment classification.
Conclusion
This study proposed a context-sensitive Aspect-Based Sentiment Analysis (ABSA) system to analyze restaurant reviews. It used transformer-based models for this purpose. The structure included generating aspect-aware input and applying contextual modelling for multi-class sentiment classification with Positive, Neutral, and Negative classes.
The research compared two transformer models: BERT, which served as the baseline model, and DeBERTa, the proposed model. Both models underwent fine-tuning under the same test conditions. They were evaluated based on Accuracy, Macro-Precision, Macro-Recall, and Macro-F1 score to ensure a fair comparison.
The results indicated that DeBERTa outperformed BERT in most evaluation metrics. It achieved an accuracy of 94.97 and a higher Macro-F1 score of 0.6989. The improved Macro-Recall and Macro-F1 scores suggest that DeBERTa provides a more balanced classification across sentiment categories. This is especially true when dealing with minor classes in the imbalanced dataset.
The better performance of DeBERTa likely stems from its disentangled attention mechanism. This mechanism enables more effective contextual representation by modelling content and positional information independently. This feature is particularly beneficial in restaurant reviews, where sentiment often depends on context, such as negation, contrasting conjunctions, and intensity modifiers.
References
[1] Maroof, S. Wasi, S. I. Jami, and M. S. Siddiqui, \"Aspect-Based Sentiment Analysis for Service Industry,\" IEEE Access, vol. 12, pp. 109702–109713, 2024, doi: 10.1109/ACCESS.2024.3440357.
[2] V. Gupta and P. Rattan, \"Enhancing Sentiment Analysis in Restaurant Reviews: A Hybrid Approach Integrating Lexicon-Based Features and LSTM Networks,\" International Journal of Intelligent Systems and Applications in Engineering, vol. 12, pp. 185–198, 2024.
[3] L. Davoodi, J. Mezei, and M. Heikkilä, \"Aspect-based sentiment classification of user reviews to understand customer satisfaction of e-commerce platforms,\" Electronic Commerce Research, Springer US, 2025, pp. 1-43, doi: 10.1007/s10660-025-09948-4.
[4] D. Jeong, D. Kim, J. Yan, and J. Li, \"Effect of Aspect-Level Emotion Expression of Online Restaurant Reviews on Perceived Helpfulness: An Aspect-Based Sentiment Analysis Perspective,\" SAGE Open, vol. 15, no. 2, pp. 1–22, 2025, doi: 10.1177/21582440251337195.
[5] I. Perikos and A. Diamantopoulos, \"Explainable Aspect-Based Sentiment Analysis Using Transformer Models,\" Big Data and Cognitive Computing, vol. 8, no. 11, 2024, doi: 10.3390/bdcc8110141.
[6] A. G. Prabhune, V. R. Shri Hari, and N. K. Sethiya, \"Adaptation of a BERT Model to the India Restaurant Data Using Rule-based Approach for Aspect-based Sentiment Analysis,\" In 2023 2nd International Conference on Smart Technologies for Smart Nation, SmartTechCon 2023, pp. 457–461, 2023, doi: 10.1109/SmartTechCon57526.2023.10391510.
[7] D. Jayakody et al., \"Aspect-based Sentiment Analysis Techniques: A Comparative Study,\" in Proceedings Moratuwa Engineering Research Conference (MERCon 2024), pp. 205–210, 2024, doi: 10.1109/MERCon63886.2024.10688631.
[8] L. A. A. Rahim, K. A. F. A. Samah, N. H. I. Teo, and A. A. Shari, \"Enhance Fake Review Detection: a Hybrid Approach of Implicit Absa and Imbalanced Dataset Handling,\" Journal of Theoretical and Applied Information Technology, vol. 103, no. 13, pp. 4631–4649, 2025.
[9] A. Rahman et al., \"Multilingual sentiment analysis in restaurant reviews using aspect-focused learning,\" Scientific Reports, vol. 15, no. 1, pp. 1–22, 2025, doi: 10.1038/s41598-025-12464-y.
[10] I. C. Sahin and C. Eyupoglu, \"Aspect-Based Sentiment Analysis for Hospitality Industry Applications: A Systematic Literature Review,\" Applied Computer Systems, vol. 30, no. 1, pp. 53–67, 2025, doi: 10.2478/acss-2025-0007.
[11] P. Carrasco and S. Dias, \"Enhancing Restaurant Management through Aspect-Based Sentiment Analysis and NLP Techniques,\" Procedia Computer Science, vol. 237, pp. 129–137, 2024, doi: 10.1016/j.procs.2024.05.088
[12] N. C. Hellwig, J. Fehle, M. Bink, and C. Wolff, \"GERestaurant: A German Dataset of Annotated Restaurant Reviews for Aspect-Based Sentiment Analysis,\" in 20th Conference on Natural Language Processing, KONVENS 2024 - Proceedings of the Conference, pp. 123–133, 2024.
[13] S. U. S. Chebolu, F. Dernoncourt, N. Lipka, and T. Solorio, \"OATS: A Challenge Dataset for Opinion Aspect Target Sentiment Joint Detection for Aspect-Based Sentiment Analysis,\" in Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pp. 12336–12347, 2024.
[14] J. Šmíd, P. P?ibá?, O. Pražák, and P. Král, \"Czech Dataset for Complex Aspect-Based Sentiment Analysis Tasks,\" in 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation, LREC-COLING 2024 - Main Conference Proceedings, pp. 4299–4310, 2024.
[15] N. M. S. Iswari and N. Afriliana, \"Enhancing Aspect-Based Sentiment Analysis in Tourism Reviews Through Hybrid Data Augmentation,\" Journal of Applied Data Science, vol. 6, no. 3, pp. 2192–2206, 2025, doi: 10.47738/jads.v6i3.842.
[16] D. Wu, L. Wen, C. Chen, and Z. Shi, \"A Novel Counterfactual Data Augmentation Method for Aspect-Based Sentiment Analysis,\" Proceedings of Machine Learning Research, pp. 1479–1493, 2024.
[17] O. Silcenco, M. R. Machad, W. C. Ugulino, and D. Braun, \"A Retail-Corpus for Aspect-Based Sentiment Analysis with Large Language Models,\" Proceedings of the 8th International Conference on Natural Language and Speech Processing (ICNLSP-2025), 2025.
[18] P. He, X. Liu, J. Gao, and W. Chen, \"DeBERTa: Decoding-enhanced BERT with Disentangled Attention,\" in International Conference on Learning Representations (ICLR), 2021.
[19] X. Liu, R. Li, S. Ye, G. Zhang, and X. Wang, \"Multimodal Aspect-Based Sentiment Analysis under Conditional Relation,\" Proceedings - International Conference on Computational Linguistics, COLING, pp. 313–323, 2025.
[20] J. Yang, Y. Xiao, and X. Du, \"Enhancing aspect-based sentiment analysis with multiple-knowledge promotion and multi-perspective noise filtering,\" Complex & Intelligent Systems, vol. 11, no. 9, 2025, doi: 10.1007/s40747-025-02034-0.
[21] H. N. Chaudhry, F. Kulsoom, and Z. U. Khan, \"TASCI?: transformers for aspect-based sentiment analysis with contextual intent integration,\" PeerJ Computer Science pp. 1–27, 2025, doi: 10.7717/peerj-cs.2760.
[22] G. Venkateswari, K. Meghamala, B. Devika, and D. Sujitha, \"Voice-Based Sentimental Analysis for Restaurant Review,\" International Advanced Research Journal in Science, Engineering and Technology, vol. 12, no. 4, pp. 459–463, 2025, doi: 10.17148/iarjset. 2025.12470.
[23] Outscraper, \"Google Maps Review Scraper,\" Outscraper. [Online]. Available: https://outscraper.com/google-maps-reviews-scraper/.