Skip to content

Latest commit

 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code for LORE: Jointly Learning the Intrinsic Dimensionality and Relative Similarity Structure From Ordinal Data

By Vivek Anand, Alec Helbling, Mark A. Davenport, Gordon J Berman, Sankaraleengam Alagapan and Christopher J Rozell

Paper: https://arxiv.org/abs/2602.04192

Environment Setup

We use conda to install and manage our environment.

  1. Install the lore_env environment with the command conda env create -f env/environment.yml.

  2. Activate the environment with the command conda activate lore_env

  3. Install the modified cblearn package from source (included in the repo) with the command pip install -e env/cblearn

Note. We highly recommend that you run our code with access to a GPU. We have lightly tested our code with CPU backends without it breaking but cannot guarantee that it will work in all cases.

Repository Structure

For a detailed breakdown of the repository's directories and files, please refer to our Repository Structure Documentation.

How to use LORE

The lore/ folder contains the helper functions necessary to train using LORE. Specifically, it contains three important components.

  • lore.f - which contains LogisticTripletLoss which defines the our modified triplet loss.
  • lore.g - which contains the definitions for the various possible rank regularizations Linear and SchattenPUnnormed which are the nuclear norm and the Schatten-$p$-norm respectively.
  • lore.triplet_algorithm which contains the training algorithm for LORE given an f and g. Our python implementation is heavily inspired by this matlab implementation.

A full working demo of LORE compared to other OE baselines can be seen in demo.ipynb. Eventually, we will integrate LORE as a new embedding method into cblearn.

How to reproduce our results

Our Crown Jewel Plot

Run and step through crown_jewel.ipynb.

Artificial Perceptual Experiment

If you seek to re-run our experiments for the artificial perceptual experiment please do the following. (This script requires a GPU to run tractably)

  1. Run python src/run_artificial_perceptual_experiment.py, this should create a pkl files in results/artificial_perceptual_experiment/.
  2. Step through the src/plot_artificial_perceptual_experiment.ipynb notebook to obtain the plots in our paper..

Crowdsourced Datasets

If you seek to re-run our experiments for the Crowdsourced Datasets please do the following. (This script requires a GPU to run tractably). The three datasets are cars, food100 and musicians.

  1. Run python src/run_{dataset}.py, this should create a csv file in results/dataset/.
  2. Step through the src/plot_{dataset}.ipynb notebook to obtain the summary statistics used in the table.

For the interpretability plots for food100, step through plot_food100_interpretability.ipynb using the embedding learned in the crowdsourced experiment.

Convergence and Scaling

Please run python src/run_scaling.py and python src/run_convergence.py to obtain the results for the convergence and scaling experiments. Step through the src/plot_scaling.ipynb and src/plot_convergence.ipynb notebooks to obtain the plots in our paper.

Interpretability Plots

After running the crowdsourced experiments, you can generate the interpretability plots by running the src/plot_food100_interpretability.ipynb notebook.

The Effects of different p

Please run python src/run_p_experiment.py to obtain the results for the effects of different p (we run additional gridsearches compared to the ones just described here). A GPU and a CPU with multiple cores will be necessary to run through tractably. Then step through the src/plot_different_p.ipynb notebook to obtain the plots in our paper.

Other figures

We do not include code for the other figures in our paper as they are involve complex grid searches that need to be parallelized across multiple GPUs. However, as we have detailed in our appendix, all one needs to do is run over all parameter combinations for intrinsic rank, number of percepts, noise, fraction of queries used, lambda for LORE and embedding dimension for all other OEs. The procedure to run each individual parameter combination is identical to the one included in demo.ipynb and very similar to that in src/run_different_p.py. For further operational details, we direct the reader to our paper.

Citation

If you found our work interesting and use our code, please cite us with the following.

@inproceedings{anand2026lore,
  title={LORE: Jointly Learning The Intrinsic Dimensionality and Relative Similarity Structure from Ordinal Data},
  author={Anand, Vivek and Helbling, Alec and Davenport, Mark A. and Berman, Gordon J and Alagapan, Sankaraleengam and Rozell, Christopher J},
  paper_url = {https://arxiv.org/abs/2602.04192},
  booktitle={International Conference on Learning Representations (ICLR)},
  month        = {April},
  address      = {Rio de Janeiro, Brazil},
  year={2026}
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages