├── .DS_Store ├── .gitattributes ├── LICENSE ├── README.md ├── data ├── .DS_Store └── ml-100k │ ├── .ipynb_checkpoints │ ├── multicore_0-checkpoint.csv │ └── train_data_org-checkpoint.csv │ ├── item_cost_indicator_28.npy │ ├── item_exposure_28.npy │ ├── multicore_0.csv │ ├── multicore_0_0.csv │ ├── pmf_item_embed.npy │ ├── pmf_user_embed.npy │ ├── test_data.csv │ ├── test_data_org.csv │ ├── train_data.csv │ └── train_data_org.csv ├── data_preprocess ├── .ipynb_checkpoints │ ├── data_preprocess-checkpoint.py │ ├── data_util-checkpoint.py │ ├── multicore-checkpoint.py │ ├── read_write-checkpoint.py │ └── run_data_preprocess-checkpoint.ipynb ├── __pycache__ │ ├── data_preprocess.cpython-37.pyc │ ├── data_util.cpython-37.pyc │ ├── multicore.cpython-37.pyc │ └── read_write.cpython-37.pyc ├── data_preprocess.py ├── data_util.py ├── multicore.py ├── read_write.py └── run_data_preprocess.ipynb ├── fcpo ├── .DS_Store ├── README_CPO-ml-100k.ipynb ├── autoassign.py ├── config.yaml ├── cpo.py ├── cpo_deterministic.py ├── data_util.py ├── environment.py ├── fair_env.py ├── fair_env_simulator.py ├── gini.py ├── memory.py ├── model │ └── tempmodel_ml-1m.pkl ├── models.py ├── optimization_utils │ ├── conjugate_gradient.py │ ├── hvp.py │ └── line_search.py ├── running_stat.py ├── save-dir │ └── fairrec.pt ├── saved-sessions │ └── fairrec.pt ├── simulators.py ├── test_ranking.py ├── torch_utils │ ├── distribution_utils.py │ └── torch_utils.py └── train.py └── org_data ├── .DS_Store └── ml-100k ├── .DS_Store ├── .ipynb_checkpoints ├── train-checkpoint.csv └── u-checkpoint.data ├── README ├── allbut.pl ├── mku.sh ├── u.data ├── u.genre ├── u.info ├── u.item ├── u.occupation ├── u.user ├── u1.base ├── u1.test ├── u2.base ├── u2.test ├── u3.base ├── u3.test ├── u4.base ├── u4.test ├── u5.base ├── u5.test ├── ua.base ├── ua.test ├── ub.base └── ub.test /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/.gitattributes -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FCPO 2 | code for [Towards Long-term Fairness in Recommendation](https://arxiv.org/abs/2101.03584) 3 | -------------------------------------------------------------------------------- /data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/.DS_Store -------------------------------------------------------------------------------- /data/ml-100k/.ipynb_checkpoints/multicore_0-checkpoint.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/.ipynb_checkpoints/multicore_0-checkpoint.csv -------------------------------------------------------------------------------- /data/ml-100k/.ipynb_checkpoints/train_data_org-checkpoint.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/.ipynb_checkpoints/train_data_org-checkpoint.csv -------------------------------------------------------------------------------- /data/ml-100k/item_cost_indicator_28.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/item_cost_indicator_28.npy -------------------------------------------------------------------------------- /data/ml-100k/item_exposure_28.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/item_exposure_28.npy -------------------------------------------------------------------------------- /data/ml-100k/multicore_0.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/multicore_0.csv -------------------------------------------------------------------------------- /data/ml-100k/multicore_0_0.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/multicore_0_0.csv -------------------------------------------------------------------------------- /data/ml-100k/pmf_item_embed.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/pmf_item_embed.npy -------------------------------------------------------------------------------- /data/ml-100k/pmf_user_embed.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/pmf_user_embed.npy -------------------------------------------------------------------------------- /data/ml-100k/test_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/test_data.csv -------------------------------------------------------------------------------- /data/ml-100k/test_data_org.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/test_data_org.csv -------------------------------------------------------------------------------- /data/ml-100k/train_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/train_data.csv -------------------------------------------------------------------------------- /data/ml-100k/train_data_org.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data/ml-100k/train_data_org.csv -------------------------------------------------------------------------------- /data_preprocess/.ipynb_checkpoints/data_preprocess-checkpoint.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/.ipynb_checkpoints/data_preprocess-checkpoint.py -------------------------------------------------------------------------------- /data_preprocess/.ipynb_checkpoints/data_util-checkpoint.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/.ipynb_checkpoints/data_util-checkpoint.py -------------------------------------------------------------------------------- /data_preprocess/.ipynb_checkpoints/multicore-checkpoint.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/.ipynb_checkpoints/multicore-checkpoint.py -------------------------------------------------------------------------------- /data_preprocess/.ipynb_checkpoints/read_write-checkpoint.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/.ipynb_checkpoints/read_write-checkpoint.py -------------------------------------------------------------------------------- /data_preprocess/.ipynb_checkpoints/run_data_preprocess-checkpoint.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/.ipynb_checkpoints/run_data_preprocess-checkpoint.ipynb -------------------------------------------------------------------------------- /data_preprocess/__pycache__/data_preprocess.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/__pycache__/data_preprocess.cpython-37.pyc -------------------------------------------------------------------------------- /data_preprocess/__pycache__/data_util.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/__pycache__/data_util.cpython-37.pyc -------------------------------------------------------------------------------- /data_preprocess/__pycache__/multicore.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/__pycache__/multicore.cpython-37.pyc -------------------------------------------------------------------------------- /data_preprocess/__pycache__/read_write.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/__pycache__/read_write.cpython-37.pyc -------------------------------------------------------------------------------- /data_preprocess/data_preprocess.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/data_preprocess.py -------------------------------------------------------------------------------- /data_preprocess/data_util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/data_util.py -------------------------------------------------------------------------------- /data_preprocess/multicore.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/multicore.py -------------------------------------------------------------------------------- /data_preprocess/read_write.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/read_write.py -------------------------------------------------------------------------------- /data_preprocess/run_data_preprocess.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/data_preprocess/run_data_preprocess.ipynb -------------------------------------------------------------------------------- /fcpo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/.DS_Store -------------------------------------------------------------------------------- /fcpo/README_CPO-ml-100k.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/README_CPO-ml-100k.ipynb -------------------------------------------------------------------------------- /fcpo/autoassign.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/autoassign.py -------------------------------------------------------------------------------- /fcpo/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/config.yaml -------------------------------------------------------------------------------- /fcpo/cpo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/cpo.py -------------------------------------------------------------------------------- /fcpo/cpo_deterministic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/cpo_deterministic.py -------------------------------------------------------------------------------- /fcpo/data_util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/data_util.py -------------------------------------------------------------------------------- /fcpo/environment.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/environment.py -------------------------------------------------------------------------------- /fcpo/fair_env.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/fair_env.py -------------------------------------------------------------------------------- /fcpo/fair_env_simulator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/fair_env_simulator.py -------------------------------------------------------------------------------- /fcpo/gini.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/gini.py -------------------------------------------------------------------------------- /fcpo/memory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/memory.py -------------------------------------------------------------------------------- /fcpo/model/tempmodel_ml-1m.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/model/tempmodel_ml-1m.pkl -------------------------------------------------------------------------------- /fcpo/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/models.py -------------------------------------------------------------------------------- /fcpo/optimization_utils/conjugate_gradient.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/optimization_utils/conjugate_gradient.py -------------------------------------------------------------------------------- /fcpo/optimization_utils/hvp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/optimization_utils/hvp.py -------------------------------------------------------------------------------- /fcpo/optimization_utils/line_search.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/optimization_utils/line_search.py -------------------------------------------------------------------------------- /fcpo/running_stat.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/running_stat.py -------------------------------------------------------------------------------- /fcpo/save-dir/fairrec.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/save-dir/fairrec.pt -------------------------------------------------------------------------------- /fcpo/saved-sessions/fairrec.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/saved-sessions/fairrec.pt -------------------------------------------------------------------------------- /fcpo/simulators.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/simulators.py -------------------------------------------------------------------------------- /fcpo/test_ranking.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/test_ranking.py -------------------------------------------------------------------------------- /fcpo/torch_utils/distribution_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/torch_utils/distribution_utils.py -------------------------------------------------------------------------------- /fcpo/torch_utils/torch_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/torch_utils/torch_utils.py -------------------------------------------------------------------------------- /fcpo/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/fcpo/train.py -------------------------------------------------------------------------------- /org_data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/.DS_Store -------------------------------------------------------------------------------- /org_data/ml-100k/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/.DS_Store -------------------------------------------------------------------------------- /org_data/ml-100k/.ipynb_checkpoints/train-checkpoint.csv: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /org_data/ml-100k/.ipynb_checkpoints/u-checkpoint.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/.ipynb_checkpoints/u-checkpoint.data -------------------------------------------------------------------------------- /org_data/ml-100k/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/README -------------------------------------------------------------------------------- /org_data/ml-100k/allbut.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/allbut.pl -------------------------------------------------------------------------------- /org_data/ml-100k/mku.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/mku.sh -------------------------------------------------------------------------------- /org_data/ml-100k/u.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u.data -------------------------------------------------------------------------------- /org_data/ml-100k/u.genre: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u.genre -------------------------------------------------------------------------------- /org_data/ml-100k/u.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u.info -------------------------------------------------------------------------------- /org_data/ml-100k/u.item: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u.item -------------------------------------------------------------------------------- /org_data/ml-100k/u.occupation: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u.occupation -------------------------------------------------------------------------------- /org_data/ml-100k/u.user: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u.user -------------------------------------------------------------------------------- /org_data/ml-100k/u1.base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u1.base -------------------------------------------------------------------------------- /org_data/ml-100k/u1.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u1.test -------------------------------------------------------------------------------- /org_data/ml-100k/u2.base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u2.base -------------------------------------------------------------------------------- /org_data/ml-100k/u2.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u2.test -------------------------------------------------------------------------------- /org_data/ml-100k/u3.base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u3.base -------------------------------------------------------------------------------- /org_data/ml-100k/u3.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u3.test -------------------------------------------------------------------------------- /org_data/ml-100k/u4.base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u4.base -------------------------------------------------------------------------------- /org_data/ml-100k/u4.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u4.test -------------------------------------------------------------------------------- /org_data/ml-100k/u5.base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u5.base -------------------------------------------------------------------------------- /org_data/ml-100k/u5.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/u5.test -------------------------------------------------------------------------------- /org_data/ml-100k/ua.base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/ua.base -------------------------------------------------------------------------------- /org_data/ml-100k/ua.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/ua.test -------------------------------------------------------------------------------- /org_data/ml-100k/ub.base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/ub.base -------------------------------------------------------------------------------- /org_data/ml-100k/ub.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TobyGE/FCPO/HEAD/org_data/ml-100k/ub.test --------------------------------------------------------------------------------