For reinformance-based recommendation system, please refer to https://github.com/NGYeung/RL-playground/tree/main
This repository provides an implementation of a user-based CF rating prediction algorithm using and KAN based autoencoder.
Pretrained model can be downloaded at here
The Implementation of KAN: FastKan
Repository Structure:
.
├── Train_Validate_1M.ipynb (The notebook for training. Example usage.)
├── AutoRec_KAN.py (containing the main model)
├── model
│ ├── AutoEncoders.py (Implementations of denoised autoencoders)
| ├── ml1m_CV.json (All training results in json)
├── MovieLens4Colab.py (Dataset classes)
├── MovieLens100K.yaml (configuration file for ML-100K)
└── MovieLens1M.yaml (configuration file for ML-1M)
Here is a brief introduction to everything touched in this repository... The article is in production, but here is a preview...
Collaborative Filtering is a subset of recommender systems that suggests items to users based on the similarities among the users and items. In other words, it predicts a user's interest in an item given previous user-item interactions. It's widely applied in e-commerce and social media recommendations.
AutoRec is proposed by S Sedhain et al. in 2015. It directly takes the documented ratings as the input and uses autoencoders' great ability at learning the latent representations to predict users' preference (ratings) of uncountered items.
The problem statement:
Suppose we have
The autoencoder receives known ratings as the input, encodes them as a low-dimensional representation, and recovers the rating through a decoder structure. Let's denote the reconstruction of rating
Here, the map
MLPs are awesome approximators of functions, and neural Networks as huge black boxes work on the assumption that the gazillion of parameters will successfully model the latent relations among observations.
Kolmogorov-Arnold Network, proposed by Z liu et al. is an alternative neural network structure to MLPs based on the Kolmogorov-Arnold representation theorem in mathematical analysis. KAN replaces the linear weights and fixed activation functions in MLPs with non-linear learnable activations.
Let's put this in mathematical terms. A function
where
Depending on the implementation,
AutoRec aims to map the partial observations to the full rating matrix, and the intuition is to equip the architecture with stronger approximator of functions. That is, the KAN layers. Let
Thus, the optimization problem to solve becomes
Our model includes an encoder layer, a bottleneck, a dropout layer (0.1), and a decoder layer.
Gaussian noise is added into the input, making it a denoising autoencoder. Detailded chose of parameters can be found in the configaruation files in the repository.
In this section, we provide experiment results and present how KAN can potentially contribute to the interpretability.
Dataset 1: MovieLens1M RMSE: 0.8093 (10-fold CV) MAE: 0.6387 (10-fold CV)
The dataset contain 1,000,209 anonymous ratings of approximately 3,900 movies made by 6,040 MovieLens users who joined MovieLens in 2000.
Train-test split: 9:1, 10-fold cross-validatoin for ML-1M, and the RMSE is calculated as


