---
title: ReviewGraph for Review Rating Prediction
url: https://www.emergentmind.com/topics/reviewgraph-for-review-rating-prediction-rrp
type: topic
---

# ReviewGraph for Review Rating Prediction

Searching arXiv for the cited ReviewGraph and closely related review-graph recommendation papers to ground the article with current paper metadata.
Search 1: ReviewGraph framework for review rating prediction with sentiment features.
ReviewGraph for Review Rating Prediction (RRP) is a knowledge-graph-based framework for predicting hotel review ratings from review text. It transforms textual customer reviews into knowledge graphs by extracting subject–predicate–object triples, associating sentiment scores with relations, learning graph embeddings with Node2Vec, and combining those embeddings with aggregated sentiment features in a machine-learning classifier to predict 1–5 star ratings [2508.13953]. This positions ReviewGraph within a broader line of review-aware graph formulations in which reviews, users, items, aspects, or review snippets are treated as nodes or feature-enhanced edges for rating prediction and recommendation [1906.01511][2004.11588][2204.12063][2302.00412].

## 1. Problem formulation and conceptual scope

In the ReviewGraph framework, the task is review rating prediction in the hotel and hospitality domain: given the text of a guest’s review, predict the numerical star rating from 1 to 5. The motivation is operational as well as algorithmic. The underlying study states that online reviews influence up to 50% of booking decisions and strongly affect occupancy, RevPAR, guest satisfaction, and brand reputation; it also emphasizes that negative reviews are especially damaging and that identifying which aspects drive low ratings is critical for operational improvements [2508.13953].

The framework is designed against three common comparison points. Bag-of-Words and TF‑IDF represent a review as sparse lexical vectors but ignore word order, syntactic structure, and aspect–sentiment relations. Word2Vec captures semantic similarity at the word level but loses “who did what to what” and requires ad hoc aggregation to review level. Direct LLM-based rating prediction is described as strong at understanding text but expensive, opaque, difficult to run at scale, and not naturally suited to structured, explorable review representations. ReviewGraph addresses these limitations by turning a review into a structured graph of entities and relations with sentiment.

A broader technical reading of “ReviewGraph” extends beyond the specific 2025 framework. Earlier review-based recommendation work already described rating data with reviews as graph-like or explicitly graph-based. HALF maps review rating prediction onto a bipartite user–item graph whose edges carry ratings and reviews, then uses hierarchical attention guided by latent factors [1906.01511]. RGNN constructs a specific review graph for each user or item, with words as nodes and typed edges capturing local order [2004.11588]. RGCL and DGCLR treat the review-aware user–item graph as a message-passing object with review-enhanced edges and contrastive learning [2204.12063][2209.01524]. ReviewGraph differs by making the review text itself the source of a knowledge graph over hotels, reviews, and aspect-like textual nodes.

## 2. Knowledge graph construction from reviews

ReviewGraph begins with a text-to-graph pipeline built around Open Information Extraction rather than an LLM extractor. Reviews are preprocessed with language detection and translation to English via Google Translate API (`googletrans`), contraction expansion, removal of HTML tags, hyphens, apostrophes, and related artifacts, and spacing fixes for sentence segmentation. Triple extraction is then performed with Stanford OpenIE, producing CSV records with `subject`, `predicate`, and `object`. Example triples in the study include ⟨water temperature, keeps, fluctuating dangerously⟩ with sentiment −0.46 and ⟨bed, was comfortable with, excellent linen⟩ with sentiment 0.79 [2508.13953].

The graph schema is heterogeneous but simple. The node set includes one node per hotel, one node per review, and subject/object nodes created from extracted triples. These triple-endpoint nodes are typed as `amenity` if the term belongs to a predefined amenities list and `word` otherwise. Review nodes connect to hotel nodes, and review nodes also connect to the subject/object nodes derived from their triples. Triple relations themselves carry predicates such as `keeps`, `was`, or `is in`, and sentiment may be stored as an edge property.

Before insertion into the graph, ReviewGraph applies aggressive normalization and filtering. Triple components are lowercased, punctuation and special symbols are removed, spaces are replaced with underscores, lemmatization is applied, and synonym mapping is used to collapse variants. Triples in which any of subject, predicate, or object is at least 14 characters are discarded to reduce noise. Construction is first done in NetworkX and then imported into Neo4j for visualization and graph analytics.

| Element | Instances | Role |
|---|---|---|
| Hotel nodes | one per unique hotel | hub for reviews |
| Review nodes | one per review | prediction unit |
| `amenity` / `word` nodes | subjects and objects from triples | aspect-like concepts |
| Triple edges | subject–predicate–object relations | store predicate and sentiment |
| Review connections | review to concept nodes | attach extracted content |
| Hotel connections | review to hotel | attach review to item |

A key modeling choice is that sentiment is an edge-level property rather than a node-level property. The framework explicitly argues that “bed” is not inherently positive or negative; sentiment depends on the specific predicate and context. This matters because the graph is intended to preserve aspect–relation–sentiment structure rather than collapse polarity into isolated tokens.

## 3. Embeddings, sentiment features, and prediction pipeline

After graph construction, ReviewGraph computes two feature families for each review node: a low-dimensional structural embedding and three sentiment aggregates. Node2Vec is run in Neo4j Graph Data Science with embedding dimension tested in \(\{5,10,25,100\}\), with 5 dimensions chosen as best. The main configuration uses walk length 80, window size 10, number of iterations 1, return parameter \(p=1\), in–out parameter \(q=1\), relationship type `Any`, orientation `Any`, and no edge weights. Only embeddings for nodes labeled `review` are used for prediction [2508.13953].

Sentiment is computed with VADER at the triple level, giving \(s(t)\in[-1,1]\) for each triple. For each review node \(r\), the framework aggregates the non-zero sentiment values connected to the review into three features:

\[
\text{avgSent}(r),\quad \text{minSent}(r),\quad \text{maxSent}(r).
\]

These summarize overall tone, strongest criticism, and strongest praise. The final review feature vector is

\[
\mathbf{x}_r = [f(r)_1,\dots,f(r)_d,\text{avgSent}(r),\text{minSent}(r),\text{maxSent}(r)],
\]

where \(f(r)\) is the Node2Vec embedding and \(d=5\) in the best configuration, yielding an 8-dimensional feature vector. The study also evaluates ablations using only Node2Vec and only sentiment.

The prediction task is treated as multi-class classification over the five TripAdvisor star ratings. ReviewGraph uses Random Forest, Logistic Regression with maximum-entropy multi-class loss, Multi-Layer Perceptron, and a dummy most-frequent classifier. Feature scaling is used for Logistic Regression and MLP, not for Random Forest. Because the rating distribution is highly imbalanced, three sampling strategies are evaluated: no sampling, oversampling minority classes, and undersampling the majority class. The reported best ReviewGraph configuration combines 5-dimensional Node2Vec, all three sentiment aggregates, Random Forest, and oversampling [2508.13953].

This architecture is intentionally lightweight. The feature vector per review is only \(5+3=8\) dimensions, compared with thousands for TF‑IDF or hundreds for typical BERT embeddings. The framework therefore treats graph structure and sentiment aggregation as a substitute for very high-dimensional lexical encodings rather than as an auxiliary layer on top of them.

## 4. Evaluation, baselines, and empirical position

The experiments use 10,000 HotelRec reviews covering 59 hotels. The average rating is 4.162 with standard deviation 1.08, and the average review length is 133 characters. ReviewGraph is evaluated with Accuracy, MAE, RMSE, and Cohen’s \(\kappa\), both on a single train–test split and with 10-fold cross-validation [2508.13953].

The strongest classical baseline is approximately TF‑IDF with Logistic Regression, which in 10-fold cross-validation achieves Accuracy \(\approx 0.64\), \(\kappa \approx 0.40\), MAE \(\approx 0.45\), and RMSE \(\approx 0.69\). The LLM baseline uses GPT‑4o in a self-programming setting, with the model choosing to build a TF‑IDF vectorizer plus Logistic Regression. With \(n=2000\) labeled examples, this LLM-built pipeline achieves Accuracy 0.59, MAE 0.58, RMSE 1.06, and \(\kappa=0.28\). The dummy most-frequent classifier reaches Accuracy \(\approx 0.51\) but \(\kappa=0.00\), illustrating the distortion induced by class imbalance.

The best ReviewGraph configuration yields, on the train–test split, Accuracy \(=0.5404\), MAE \(=0.6301\), RMSE \(=1.0896\), and Cohen’s \(\kappa=0.2829\). In 10-fold cross-validation it reports Accuracy \(\approx 0.52\), MAE \(\approx 0.64\), RMSE \(\approx 1.06\), and \(\kappa \approx 0.26\). The empirical position is therefore specific rather than universal: raw accuracy is below the best TF‑IDF baseline, while agreement-based performance is comparable to the LLM-built pipeline and substantially above trivial baselines [2508.13953].

A common misconception is that the graph formulation dominates classical text baselines on every metric. The reported results do not support that claim. The framework’s comparative strength lies in agreement-oriented evaluation, dimensional efficiency, and interpretability rather than in maximizing headline accuracy. Another misconception is that the LLM baseline is intrinsically different in kind; in this study GPT‑4o chose a TF‑IDF plus Logistic Regression pipeline, and its performance was not better than the human-engineered TF‑IDF baseline.

The authors explicitly summarize the trade-off by stating that the proposed model performs similar to the best performing model in the literature but with lower computational cost, without ensemble. Within the supplied results, that statement is most defensible when computational footprint and interpretability are weighted alongside accuracy.

## 5. Interpretability, visualization, and downstream uses

Interpretability is central to the ReviewGraph design. Because each review is decomposed into explicit entities and relations, the graph can be inspected directly. In Neo4j, hotels appear as hubs connected to reviews, which are in turn connected to `amenity` or `word` nodes through sentiment-bearing edges. The study notes that positive sentiment edges can be color-coded green and negative sentiment edges red, enabling visual identification of recurring problems such as bathroom, WiFi, or service issues around low-rated reviews [2508.13953].

At the prediction level, the feature design supports simple backtracking. The review embedding captures structural position in the graph, while \(\text{minSent}(r)\) and \(\text{maxSent}(r)\) isolate the strongest negative and positive evidence linked to that review. This makes it possible to explain a predicted rating in terms of the most negative triple, the most positive triple, and the neighborhood of concept nodes attached to the review. Relative to BoW, TF‑IDF, or direct LLM scoring, this is a materially different explanation substrate because it preserves explicit subject–predicate–object structure.

The framework also supports visual exploration and retrieval-oriented applications. The authors explicitly mention GraphRAG and RAG integration: the knowledge graph can serve as a structured retrieval index for questions such as “What do guests say about the bathrooms at Hotel X?”, retrieving a subgraph centered on the hotel and the relevant aspect nodes. Node2Vec embeddings of review nodes can also be used as retrieval embeddings. Additional applications proposed in the study include hotel recommendation, explanation or breakdown of ratings, hotel benchmarking across aspects such as cleanliness and breakfast quality, and what-if analysis that would examine predicted ratings before and after removing certain negative nodes or edges.

These uses are not equivalent to better rating prediction in the narrow sense, but they explain why a graph representation may remain attractive even when a sparse lexical baseline attains higher accuracy. ReviewGraph trades some predictive efficiency for structured post hoc analysis, visual inspection, and system integration.

## 6. Precedents, neighboring methods, and prospective extensions

ReviewGraph is best understood as one realization of a broader progression in review-aware graph modeling. HALF, or Hierarchical Attentions model integrating Latent Factor model, formulates review rating prediction on a user–item bipartite graph where each edge carries a rating and a review. It uses word-level attention within reviews and review-level attention guided by latent factor vectors to build user and item text representations, then fuses them with matrix-factorization embeddings for prediction [1906.01511]. This suggests an early graph-shaped architecture in which latent node embeddings guide attention over incident textual edges.

RGNN moves closer to an explicit textual graph by building a specific review graph for each individual user or item, using keywords as nodes, typed forward/backward/self-loop edges, type-aware graph attention, and personalized graph pooling to learn hierarchical review graph representations for rating prediction [2004.11588]. RGCL then recasts review-based recommendation as a review-aware user–item graph with feature-enhanced edges and adds self-supervised node and edge discrimination tasks over that graph [2204.12063]. DGCLR further separates user–item interactions into latent factors, forming factor graphs from both semantic information in reviews and structural information in the interaction graph, and combines factorized message passing with factor-wise contrastive learning [2209.01524].

A different but related trajectory appears in semantic-snippet graphs. “KNNs of Semantic Encodings for Rating Prediction” represents user preferences as a graph of review sentences connected by semantic similarity, then derives user similarity from sentence-level graph structure for memory-based rating prediction and explanation [2302.00412]. ASAP, although not graph-based, is also relevant because it couples review-level star ratings with aspect-category sentiment annotations for 18 predefined aspects, showing that fine-grained aspect sentiment prediction improves overall rating prediction in joint learning [2103.06605]. That dataset design suggests a natural ReviewGraph variant with review nodes, aspect nodes, and sentiment-bearing edges.

Against this background, the explicit ReviewGraph framework of 2025 shifts the graph granularity from user–item interactions or keyword co-occurrence toward knowledge-graph triples extracted from individual reviews. Its main limitations, as stated in the study, are the quality of Stanford OpenIE triples, the use of static Node2Vec rather than graph neural networks, the absence of richer graph structures such as user nodes or time, and the dependence on simple edge-level sentiment aggregation [2508.13953]. The authors therefore outline several extensions: GraphSAGE, GCN, or GAT over the constructed graph; improved triple extraction through fine-tuned LLMs; alternate graph structures that include property_dict aspects, user nodes, or time; alternate embedding algorithms such as DeepWalk or LINE; and user studies evaluating whether graph visualization helps hoteliers detect issues.

In that sense, ReviewGraph for RRP is both a concrete hospitality-domain method and a generic design pattern. The concrete method is a pipeline from reviews to triples, from triples to a Neo4j knowledge graph, from graph structure and sentiment to an 8-dimensional review representation, and from that representation to a 1–5 star classifier. The broader design pattern is the use of explicit graph structure to mediate between local textual evidence and global rating prediction, with interpretability and relational analysis treated as first-class outputs rather than incidental by-products.

Source: https://www.emergentmind.com/topics/reviewgraph-for-review-rating-prediction-rrp