Skip to content

Source code for LOX-CDR: Towards Logically Explainable Cross-Domain Recommendation

Notifications You must be signed in to change notification settings

bjtu-lucas-nlp/LOX-CDR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LOX-CDR

Source code for LOX-CDR: Towards Logically Explainable Cross-Domain Recommendation

LOX-CDR: Towards Logically Explainable Cross-Domain Recommendation

Figure 2

πŸ“– Overview

LOX-CDR is a novel framework for cross-domain recommendation that leverages logical reasoning and large language models to provide explainable recommendations across different domains. This work addresses the cold-start problem in recommender systems by transferring knowledge between domains while maintaining interpretability through logical explanations.

🌟 Key Features

  • Logical Explainability: Provides transparent reasoning for cross-domain recommendations using logic-based approaches
  • LLM Integration: Leverages the power of large language models for enhanced understanding of user preferences across domains

πŸš€ Quick Start

Prerequisites

# Python 3.8 or higher required
python --version

# Install required packages
pip install -r requirements.txt

Installation

# Clone the repository
git clone https://github.com/bjtu-lucas-nlp/LOX-CDR.git
cd LOX-CDR

# Install dependencies
pip install -e .

πŸ“Š Datasets

Our experiments use the Amazon Review Dataset with the following domain pairs:

Domain Pair Source β†’ Target Description
Pair 1 Books β†’ Movies Related domains with similar user interests, Book->Movie
Pair 2 Books β†’ CDs Related domains with similar user interests, Book->CDs
Pair 3 Movies β†’ CDs Related domains with similar user interests, Movie->CDs

Data Preparation

# Download and preprocessed datasets

πŸ—οΈ Architecture

LOX-CDR consists of two main components:

  1. Cross-domain sentiment-aware paradigm: a cross-domain sentiment-aware paradigm to link aspects from user review feedback and associate preferences across domains
  2. A logically-interpretable generator: explicitly captures cross-domain reasoning paths.

πŸ”¬ Experiments

Running Experiments

# With custom parameters
nohup python3 lox_cdr_main.py \
    --model_name=Mixtral2-ncf-prefix-GAN-Tune \
    --factor_num=128 \
    --ncf_layer_num=3 \
    --base_model=../../Mistral-7B-Instruct-v0.2 \
    --batch_size=48 \
    --num_epochs=4 \
    --data_path=Data/Amazon/Bk2CD \
    --output_dir=Model/book2cd/model \
    --training_output=Model/book2cd/sft \
    > training_log_Bk2CD.txt 2>&1 &
...

Evaluation Metrics

  • Rating Prediction: MAE, RMSE
  • Explainability: Explanation Quality Score

Made by Kezhi Lu at AAII of the University of Technology Sydney, Prof. Jie Lu Lab

About

Source code for LOX-CDR: Towards Logically Explainable Cross-Domain Recommendation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages