This repository contains the implementation code for experiments with synthetic data in the paper "MODE: Mutual Optimality in Direct Effects of Reciprocal Recommendations in Matching Markets" by Yoji Tomita (CyberAgent, AI Lab), RecSys'26.
If you can use uv, you can set up the environment with:
uv syncOtherwise, you need following packages:
- Python 3.12
- Numpy 2.4.4
- CVXPY 1.8.2
- PyTorch 2.11.0
You can run the main experiment script with uv:
uv run main.py --n 10 --exam_type inv --pref_lambda 0.8 --seed 0or with your own python environment:
python main.py --n 10 --exam_type inv --pref_lambda 0.8 --seed 0The options are:
--nor-n: Number of jobs. Number of candidates is set to 1.5*n. Default is 10.--exam_typeor-e: Type of examination probability vectors. Choices are "log", "inv", and "exp". Default is "inv".--pref_lambdaor-l: Lambda parameter for preference generation. Default is 0.8.--seedor-s: Random seed for preference generation. Default is 0.--nonverboseor-nv: Disable verbose output. By default, verbose output is enabled.--result_file_pathor-r: Path to save the result JSON file. If not provided, the result will be saved to a default file name based on the parameters.
main.py: Main script to run the experiment.market.py: Contains theMarketclass which defines the matching market.naive.py: Contains the implementation of the Naive method.reciprocal.py: Contains the implementation of the Reciprocal method.tu.py: Contains the implementation of the TU method.approx_sw.py: Contains the implementation of the ApproxSW method.direct_sw.py: Contains the implementation of the DirectSW method.mode.py: Contains the implementation of the MODE method.
If you find our work useful in your research, please consider citing:
@inproceedings{tomita2026mode,
title={MODE: Mutual Optimality in Direct Effects of Reciprocal Recommendations in Matching Markets},
author={Yoji Tomita},
booktitle={Proceedings of the 20th ACM Conference on Recommender Systems},
year={2026}
}This repository is licensed under the MIT License.