A Comprehensive Solution to Predict Short-term and Long-term user Intention with Environmental Context

Hang Zhang2023 · DOI

Abstract

Predicting user intention is a critical task for modern business intelligence and e-commerce optimization. This research proposes a dual-framework approach that distinguishes between short-term intention (first-time purchase) and long-term intention (repurchase). For short-term prediction, we introduce a solution based on user sequence behavior and environmental context—such as browsing velocity and interest scores—integrated into a Transformer architecture. For long-term intention, we utilize unsupervised topic modeling to extract specific product aspects from user reviews, which are then processed through Heterogeneous Graph Neural Networks (HGNN) and Relational Graph Convolutional Networks (RGCN). Our results demonstrate that incorporating environmental context and aspect-level sentiment significantly outperforms baseline models in predicting user behavior.

Introduction

In the competitive landscape of e-commerce, understanding a user's next move is essential. However, traditional models often treat user intention as a static variable, failing to account for the evolving nature of consumer behavior. This research addresses two primary gaps: the neglect of "environmental context" in short-term browsing sessions and the over-reliance on generic sentiment analysis for long-term repurchase predictions. By bifurcating the problem into short-term and long-term scenarios, we provide a more granular and accurate prediction engine suitable for real-world applications where labeled data may be scarce.

Methodology

1. Short-term Intention: The Transformer and Environmental Context

Short-term intention is modeled as a sequence prediction task. We utilize an encoder-only Transformer architecture enhanced by dynamic features that capture the "environmental context" of a user's session:

  • Visiting Velocity: The average speed of user actions, serving as a proxy for urgency or engagement level.
  • Visiting Coherence: A metric measuring the consistency of a user's focus on specific item categories.
  • Interest Score Unit: A probabilistic graph model using Directed Acyclic Graphs (DAG) and Conditional Probability Distributions (CPD) to weight explicit interests (purchases) against implicit interests (favorites or clicks).

2. Long-term Intention: Aspect-Based Graph Neural Networks

To predict repurchases, the model moves beyond simple binary sentiment. We employ a combined topic modeling approach using Latent Dirichlet Allocation (LDA) and BERTopic for unsupervised aspect extraction. These aspects (e.g., price, quality, battery life) are used as nodes in a Heterogeneous Graph Neural Network (HGNN) and a Relational Graph Convolutional Network (RGCN). This structure allows the model to map the complex interplay between user sentiment shifts and specific product features over time.

Experimental Setup and Datasets

The framework was validated using a diverse array of datasets to ensure robustness:

  • Alibaba Tianchi Platform: Utilized the "Repeat Buyer" and "Ad Clicking" datasets for large-scale behavioral analysis.
  • Amazon Electronic Product Reviews (2014): Used for long-term sentiment and aspect extraction tasks.
  • Custom Recipe-Sharing Site: A controlled environment built on WordPress, using Smartlook to capture granular telemetry (clicks, pins, prints) for short-term model testing.
  • Twitter Dataset: Real-world social media data regarding Netflix’s Stranger Things release to validate how social interactions correlate with long-term interest.

Key Insights and Results

Short-term Performance

The Transformer-based model achieved an AUC of 0.7101, significantly outperforming established baselines such as Deep Interest Network (DIN, 0.662) and Behavior Sequence Transformer (BST, 0.625). A key finding was the "memory sweet spot": a sequence length of 8 actions provided the highest accuracy, suggesting that excessive historical data can introduce noise that degrades immediate intention prediction.

Long-term Performance

The GNN-based model, which integrates sentiment polarity with specific product aspects, reached an accuracy of 0.8278 and an F1-score of 0.8571. In the Twitter case study, the inclusion of aspect extraction raised prediction accuracy from 0.8647 to 0.9176, proving that why a user feels a certain way is as important as how they feel.

Conclusion and Future Work

This research demonstrates that environmental context and aspect-level sentiment are vital components of user intention modeling. While the current framework shows strong performance, it is limited by the extraction of only a single primary aspect per review and the high computational cost of Transformer training. Future work will focus on multi-aspect extraction to capture the multifaceted nature of user reviews and the implementation of cloud-based training solutions to improve scalability.

Summary updated

Abstract

Prediction of user intention is an important task in business intelligence and analysis. Our research divides user intention into short-term and long-term, corresponding to the first purchase and repurchase scenarios respectively. To model short-term user consumption intention prediction, we present a comprehensive solution based on extracting user sequence behavior features and computing user different types of interest scores. At the same time, we take environmental context into consideration to explore the occurrence environment of user behavior. To detect long-term intention, we use a combined topic modeling method to extract aspects from user reviews with an unsupervised method. Our research builds a HGNN and RGCN using sentiment polarity, aspects, and items as nodes and edges of the graph neural network. This method entirely considers the close relation between user sentiment polarity change and item features, and the solution shows good performance when compared with the baseline model in the experiments.
BibTeX
@misc{zhang2023comprehensive,
  author = {Hang Zhang},
  title = {{A Comprehensive Solution to Predict Short-term and Long-term user Intention with Environmental Context}},
  year = {2023},
  doi = {10.22215/etd/2023-15412},
}
Figure