Skip to content

PRISM-AILAB/ATRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATRS

Official implementation of:

Lim, H., Li, X., Park, S., Li, Q., & Kim, J. (2026). Reducing contextual noise in review-based recommendation via aspect term extraction and attention modeling. Information Sciences, 735, 123078. Paper

Overview

This repository provides the official implementation of ATRS (Aspect Term-aware Recommender System), a review-based recommendation model that enhances preference modeling by increasing the informational density of user reviews. ATRS addresses the limitation of existing methods that indiscriminately process entire reviews, where aspect-relevant content is often diluted by contextual noise. To mitigate this issue, ATRS employs a BERT-based aspect term extraction (ATE) module to identify product-related terms and filter irrelevant information from reviews. The extracted aspect terms are then encoded using a convolutional neural network and aggregated through a self-attention mechanism to construct aspect-aware user and item representations. Experiments conducted on Amazon and Yelp datasets demonstrate that ATRS consistently outperforms representative baselines, achieving average improvements of 19.54% in MAE and 11.89% in RMSE. These results highlight the effectiveness of aspect-level refinement in review-based recommender systems.

Requirements

  • python>=3.9
  • torch>=2.5.1
  • torchvision>=0.20.1
  • numpy==1.26.4
  • pandas>=2.0.0
  • gensim==4.3.3
  • pyarrow>=12.0.0
  • scikit-learn>=1.5.0
  • tqdm>=4.66.0
  • PyYAML>=6.0.0
  • sentencepiece==0.2.1
  • transformers==4.29.2
  • tokenizers==0.13.3
  • pyabsa==2.4.3
  • nltk>=3.9.0
  • seqeval>=1.2.0
  • termcolor>=2.0.0

Repository Structure

Below is the project structure for quick reference.

├── data/                        # Dataset directory
│   ├── raw/                     # Original (unprocessed) datasets
│   └── processed/               # Preprocessed data for training and evaluation
│
├── model/                       # Model definitions and checkpoints
│   └── proposed.py              # ATRS model architecture and training utilities
│
├── src/                         # Core source code
│   ├── data.py                  # Data preprocessing module
│   ├── ate.py                   # Aspect term extraction module
│   ├── config.yaml              # Model and training configuration file
│   ├── path.py                  # Path and directory management utilities
│   └── utils.py                 # Helper functions (data loading, metrics, etc.)
│
├── main.py                      # Entry point for model training and evaluation
│
├── requirements.txt             # Python package dependencies
│
├── README.md                    # Project documentation
│
└── .gitignore                   # Git ignore configuration

Model Description

ATRS (Aspect Term-aware Recommender System) is a review-based recommendation model designed to reduce contextual noise and enhance preference modeling through aspect-level refinement of textual representations. Instead of processing entire reviews indiscriminately, ATRS explicitly focuses on item-relevant aspect information.

The model consists of two main modules:

  • ATE (Aspect Term Extraction) Module: Identifies product-related aspect terms from review text.
  • RS (Recommender System) Module: Constructs aspect-aware user and item representations and predicts ratings.

In the ATE module, a Transformer-based encoder processes tokenized review text to capture contextual semantics. A Local Context Focus (LCF) mechanism further refines token-level representations, and a BIO tagging scheme is applied to extract salient aspect terms.

In the RS module, the extracted aspect terms are embedded using a convolutional neural network and integrated with user and item latent embeddings. A self-attention mechanism models the relative importance within each representation. The refined user and item representations are then combined and passed to a rating prediction network for final score estimation.

ATRS model Architecture

How to Run

Environment Setup

Create a virtual environment (Python ≥ 3.9 recommended) and install the required dependencies:

Option A: Using venv

python3.9 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

Option B: Using Conda

conda create -n atrs python=3.9
conda activate atrs
pip install -r requirements.txt

Data Preparation

Place your dataset under data/raw/ and ensure that its format matches the preprocessing pipeline defined in src/data.py.

Preprocessed data will be stored under data/processed/ after feature extraction.

Configuration

Edit src/config.yaml to configure training, data paths, and model hyperparameters before running the experiment.

Train and Evaluate the Model

Run the training and evaluation script:

python main.py

Experimental Results

ATRS was evaluated on three real-world review datasets: Musical Instruments, Video Games, and Yelp (Pennsylvania). The results demonstrate that ATRS consistently outperforms representative baselines across all evaluation metrics, achieving average improvements of 19.54% in MAE and 11.89% in RMSE.

Model Musical Instruments Video Games Yelp
MAE MSE RMSE MAPE MAE MSE RMSE MAPE MAE MSE RMSE MAPE
PMF 1.3062.6401.62535.034 1.2202.4071.55133.948 1.2762.8031.67438.330
NCF 1.1741.7051.30635.401 0.9481.3311.15435.032 1.0851.6741.29439.320
DeepCoNN 0.7861.1371.06729.931 0.8471.2631.12432.850 0.9371.3811.17538.276
NARRE 0.7670.9930.99729.459 0.7761.1731.08330.518 0.8861.2121.10136.724
AENAR 0.6650.9700.98527.193 0.6931.0021.00128.039 0.8451.1771.08535.605
SAFMR 0.7050.9750.98728.388 0.7111.0331.01630.016 0.8811.2291.10936.076
MFNR 0.7080.9650.98226.922 0.7300.9800.99027.863 0.8551.1741.08433.923
ATRS (Proposed) 0.6400.9330.96626.638 0.6460.9700.98527.537 0.8321.1631.07834.917

Citation

If you use this repository in your research, please cite:

@article{LIM2026123078,
  title = {Reducing contextual noise in review-based recommendation via aspect term extraction and attention modeling},
  author = {Heena Lim and Xinzhe Li and Seonu Park and Qinglong Li and Jaekyeong Kim},
  journal = {Information Sciences},
  volume = {735},
  pages = {123078},
  year = {2026},
  doi = {10.1016/j.ins.2026.123078}  
}

Contact

For research inquiries or collaborations, please contact:

Seonu Park
Ph.D. Student, Department of Big Data Analytics
Kyung Hee University
Email: sunu0087@khu.ac.kr

Qinglong Li
Assistant Professor, Division of Computer Engineering
Hansung University
Email: leecy@hansung.ac.kr

Last updated: March 2026

About

About Official implementation of "Reducing contextual noise in review-based recommendation via aspect term extraction and attention modeling" (Information Sciences, 2026)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages