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
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.
- 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
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
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.
Create a virtual environment (Python ≥ 3.9 recommended) and install the required dependencies:
python3.9 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txtconda create -n atrs python=3.9
conda activate atrs
pip install -r requirements.txtPlace 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.
Edit src/config.yaml to configure training, data paths, and model hyperparameters before running the experiment.
Run the training and evaluation script:
python main.pyATRS 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.306 | 2.640 | 1.625 | 35.034 | 1.220 | 2.407 | 1.551 | 33.948 | 1.276 | 2.803 | 1.674 | 38.330 |
| NCF | 1.174 | 1.705 | 1.306 | 35.401 | 0.948 | 1.331 | 1.154 | 35.032 | 1.085 | 1.674 | 1.294 | 39.320 |
| DeepCoNN | 0.786 | 1.137 | 1.067 | 29.931 | 0.847 | 1.263 | 1.124 | 32.850 | 0.937 | 1.381 | 1.175 | 38.276 |
| NARRE | 0.767 | 0.993 | 0.997 | 29.459 | 0.776 | 1.173 | 1.083 | 30.518 | 0.886 | 1.212 | 1.101 | 36.724 |
| AENAR | 0.665 | 0.970 | 0.985 | 27.193 | 0.693 | 1.002 | 1.001 | 28.039 | 0.845 | 1.177 | 1.085 | 35.605 |
| SAFMR | 0.705 | 0.975 | 0.987 | 28.388 | 0.711 | 1.033 | 1.016 | 30.016 | 0.881 | 1.229 | 1.109 | 36.076 |
| MFNR | 0.708 | 0.965 | 0.982 | 26.922 | 0.730 | 0.980 | 0.990 | 27.863 | 0.855 | 1.174 | 1.084 | 33.923 |
| ATRS (Proposed) | 0.640 | 0.933 | 0.966 | 26.638 | 0.646 | 0.970 | 0.985 | 27.537 | 0.832 | 1.163 | 1.078 | 34.917 |
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}
}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
