# Torch-Choice: A PyTorch Package for Large-Scale Choice Modeling with Python

arXiv: https://arxiv.org/abs/2304.01906 · HTML: https://mlsanity.com/paper/2304.01906/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 5 of its 48 references that are in the map.
- First posted on arXiv 4 Apr 2023.

## Builds on (most cited first, 5 of 5)

- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [SHOPPER: A Probabilistic Model of Consumer Choice with Substitutes and Complements](https://mlsanity.com/paper/1711.03560/) (2017)
- [Structured Embedding Models for Grouped Data](https://mlsanity.com/paper/1709.10367/) (2017)
- [Counterfactual Inference for Consumer Choice Across Many Product Categories](https://mlsanity.com/paper/1906.02635/) (2019)
- [Estimating Heterogeneous Consumer Preferences for Restaurants and Travel Time Using Mobile Location Data](https://mlsanity.com/paper/1801.07826/) (2018)

## Built on by (most cited first, 1 of 1)

- [Better Capturing Interactions Between Products in~Retail: Revisited Negative Sampling for~Basket Choice Modeling](https://mlsanity.com/paper/2610.17963/) (2026)

## Abstract (arXiv)

The texttttorch-choice is an open-source library for flexible, fast choice modeling with Python and PyTorch. texttttorch-choice provides a textttChoiceDataset data structure to manage databases flexibly and memory-efficiently. The paper demonstrates constructing a textttChoiceDataset from databases of various formats and functionalities of textttChoiceDataset. The package implements two widely used models, namely the multinomial logit and nested logit models, and supports regularization during model estimation. The package incorporates the option to take advantage of GPUs for estimation, allowing it to scale to massive datasets while being computationally efficient. Models can be initialized using either R-style formula strings or Python dictionaries. We conclude with a comparison of the computational efficiencies of texttttorch-choice and textttmlogit in R as (1) the number of observations increases, (2) the number of covariates increases, and (3) the expansion of item sets. Finally, we demonstrate the scalability of texttttorch-choice on large-scale datasets.
