Paper: Beyond Accuracy: Decision Transformers for Reward-Driven Multi-Objective Recommendations
MODT4R implements a novel multi-objective decision transformer framework for sequential recommendation systems. This work leverages decision transformers to optimize multiple objectives simultaneously, including accuracy, diversity, and novelty in recommendations.
- Training:
MODT4R.py- Train the multi-objective decision transformer - Evaluation:
test_MODT4R.py- Evaluate trained models on test data
- Python 3.8.5
- CUDA 10+ (for GPU support)
- Anaconda/Miniconda
# Create conda environment from yml file
conda env create -f conda_env.yml
conda activate decision-transformer-recpython MODT4R.py --dataset retail_rocketpython test_MODT4R.py --dataset retail_rocketMODT4R_public/
├── models/ # Model architectures
│ ├── MoTrans.py # Multi-objective Decision Transformer (main model)
│ ├── SASRecModules.py # SASRec attention modules (User State Transformer)
│ ├── trajectory_gpt2.py # GPT-2 backbone for trajectory modeling
│ └── model.py # Base model class
│
├── src/ # Core utilities and functions
│ ├── evaluate_mo.py # Multi-objective evaluation functions
│ └── util.py # Data processing and utility functions
│
├── MODT4R.py # 🎯 Main training script
├── test_MODT4R.py # 🧪 Main evaluation script
├── conda_env.yml # Conda environment configuration
└── README.md # This file
The data should contain the following fields:
state: User interaction history (sequence of items)rewards: Reward signals (accuracy, novelty, diversity)len_state: Length of the sequenceaction: Next item to predict
Use MODT4R.py for training the Multi-Objective Decision Transformer:
# Train on RetailRocket dataset
python MODT4R.py \
--dataset retail_rocket \
--hidden_factor 64 \
--num_epochs 100 \
--batch_size 256 \
--lr 0.0001 \
--embed_dim 128 \
--n_layer 1 \
--n_head 1 \
--dropout 0.1 \
--data_path /path/to/data/ \
--models_path /path/to/save/modelsUse test_MODT4R.py to evaluate trained MODT4R models:
# Evaluate model on RetailRocket dataset
python test_MODT4R.py \
--dataset retail_rocket \
--hidden_factor 64 \
--embed_dim 128 \
--n_layer 1 \
--n_head 1 \
--start_step 1 \
--end_step 2# Evaluate on RC15 dataset
python test_MODT4R.py \
--dataset rc15 \
--hidden_factor 64 \
--embed_dim 128The evaluation includes:
- Accuracy Metrics: Hit Rate (HR@K), NDCG@K
- Diversity Metrics: coverage
- Novelty Metrics: long-tail coverage
@article{wang2025beyond,
title={Beyond Accuracy: Decision Transformers for Reward-Driven Multi-Objective Recommendations},
author={Wang, Jie and Karatzoglou, Alexandros and Arapakis, Ioannis and Jose, Joemon M and Ge, Xuri},
journal={IEEE Transactions on Knowledge and Data Engineering},
year={2025},
publisher={IEEE}
}This work builds upon several foundational works:
- Decision Transformer - Offline RL with transformers
This project is released under the MIT License. See LICENSE file for details.