Manuscript Offprint
arXiv:2610.17963Better Capturing Interactions Between Products in~Retail: Revisited Negative Sampling for~Basket Choice Modeling
Abstract
Brick-and-mortar retailers face many different challenges that involve understanding thoroughly its products catalog and customer preferences. In particular, assortment optimization - proposing the ideal mix of products - and promotion planning hold a pivotal role in their strategy. By leveraging sales data, retailers can make informed decisions on which products to sell and how to manage inventory, based on customer preferences as well as regional and seasonal trends. It is especially crucial to capture interactions between products, in order to minimize the number of items that cannibalize each other's sales and to ensure that complementary products, which are often purchased together, are conjointly available and sold across all stores. In this paper, we propose a model of shopping basket that learns embeddings to represent interactions between products, prices and stores. Our model is built to uncover sales patterns from very large transaction datasets. In particular, the optimization loss is computed with random negative samples in order to overcome the computational bottlenecks that arise with large number of items. Our experiments on synthetic data show the efficiency of drawing such negative samples based on the actual assortment of available products, with better results than approaches from the literature. We also validate our approach by training and evaluating our model on a dataset composed of millions of transactions from Fortenova Group, one of the leading retail company in Southeast Europe. Our model showcases promising applications in the sector of retail, with enriched interfaces to efficiently support category managers.
1 Introduction
Choosing the optimal combination of products to sell at the right price is a crucial stake for retailers. It is needed to select which products, among the hundreds of thousands offered by various suppliers, should be offered for sale in each store, or should be under promotion. This decision can be taken using insights such as past revenues or current trends.
It is also highly crucial to take into consideration the different products synergies. Indeed, a customer planning to bake a cake should be able to purchase all the necessary ingredients or he may choose to shop at another supermarket. This notion of complementarity between products should be carefully considered, along with cannibalization, where the presence of two similar items lead to a reduction in each other's sales. Historically, this assortment selection has been done manually by the category managers, based on their business experience. With thousands of daily customers in its different stores, a supermarket company typically records hundreds of millions of purchases per year. This data - baskets of co-purchased items - conveys rich patterns, especially compared to assortments which remain relatively stable due to logistical reasons. Gathering statistical insights from these data can greatly help category managers make informed decisions on the assortment selection.
Choice modeling is a common approach that leverages purchase datasets to understand customers' preferences. Each product is assigned a utility, a latent value that reflects its probability to be purchased. Common models use a linear representation of utility [2, 10], while more recent work has shown that incorporating non-linear effects can help in better capturing the heterogeneity in the different customer behaviors. In particular, neural networks [6, 8] have shown promising performances. Besides, estimating and leveraging product interactions is a problem yet to be tackled. Indeed, the exponentially growing number of interactions to take into account leads to difficulties in using classical methods [7, 11] with a large number of products. Another approach, the nested logit model [4], requires the modeler to decide a priori the sets of substitutable items, which is on the contrary what we want the model to learn.
In this paper, we propose a neural-network choice model that learns latent representations of items, shops and baskets, with a structure capable of capturing product interactions from a large dataset of purchase receipts. It enables to interpret the choice probabilities predicted by the model, and has promising applications for enriching interfaces used by category managers. Such interfaces are used to plan promotion campaigns or select the assortment of a shop and would be more informative if the interactions between products were displayed.
Our contributions in this paper are the following. First, we propose a choice model capturing interactions between products, able to be learned on large-scale data with no or few features to describe items, shops or customers. Second, we propose to leverage the assortment of available products in a soft manner within the negative sampling during the training procedure. Last, we present experiments on synthetic data and a real-world retailer dataset, confirming the benefits of our approach when compared to existing models. Our code is publicly available on GitHub .
2.1 Discrete Choice Models
Discrete choice models try to explain or predict choice decisions made by humans from a set of alternatives, called an assortment. They have been widely adopted for a large range of applications, usually involving a customer decision, such as choice of transportation mode or products purchases. The discrete choice framework based on Random Utility Maximization [10] considers that an individual attributes a utility to the different options and chooses the one that maximizes this utility. The objective of discrete choice modeling is to estimate this latent utility function harnessing data with past choices or preferences. The classical conditional logit model [2] formulates a linear utility function leveraging the different available features of the problem. Recent works use more complex functions that introduce nonlinearities, using for example neural networks [3, 5, 6, 35] or tree-based models [31, 34].
Discrete choice models are designed to handle the variations of options availability within the assortment. This is particularly important in a retail context where products might be out of stock or simply not sold in specific locations. However, they are usually built to model a single choice and still face challenges when modeling bundles of options, like we observe in retail. These challenges result in limited methods for estimating interactions between these choices. Interaction terms can be introduced within the utility function [7, 11], but such formulations are typically restricted to a small number of distinct options. Indeed, the number of possible bundles grows exponentially with the number of available items, which can be very high in applications such as retail.
The different Python implementations can be found in the Choice-Learn package at https://github.com/artefactory/choice-learn.
2.2 Representation learning
Object representation in machine learning has significantly evolved with the advent of neural networks [19]. Unlike traditional machine learning methods, which could mainly transform pre-existing features, neural networks can learn continuous representations when the data is categorical and comes with no features [20]. Traditionally, such categorical data is represented using one-hot vectors [21] that have the size of the set of possible values. In comparison, learned embeddings provide a continuous representation that replaces these vectors in a generally much lower dimension. One may note that the term "embedding" sometimes refers to a transformed object's features after multiple operations [15], but in this paper it will only refer to categorical data representation.
One of the primary data structures that have greatly benefited from embeddings is word representation [18]. Traditionally, words were represented using sparse vectors [16], similar to weighted one-hot vectors. [9] proved the efficiency to train a neural network where each word in the vocabulary is associated with a learned dense continuous vector. This training process typically requires large-scale data and is often conducted in a self-supervised manner using natural data [14], i.e. an unlabeled corpus of documents. In this case, negative sampling [17] is commonly employed to complement the positive cases derived from the natural data. This involves randomly sampling words from the vocabulary, under the assumption that they are likely to be implausible outputs.
Embeddings have also found applications beyond words. They can be used for any categorical data, typically the labels of a multiclass classification [22, 23], the nodes of a graph [24], or the rows of tabular data represented as graphs [25]. In a scenario similar to choice modeling, collaborative filtering for recommender systems, matrix factorization or neural networks aim at building embeddings for each user and product [26, 27]. In this case, the model is generally trained on the scores given by users on products, such as movies [28]. To our knowledge, limited research has proposed embedding structures for neural network-based choice models. Among existing work, [8] and [36] embeddings are fed directly into the softmax function and thus do not model any interaction. [37] incorporates interaction terms with respect to the items in the assortments, but focuses solely on single-choice modeling, which does not fully leverage the rich information provided by bundles of items purchased together. [1] presents a closer approach to our work; however, their method requires heavy computing since their neural network is Bayesian and they need to generate all subsets of items within a bundle, both during training and inference.
3 Model
3.1 Context and Objectives
We build a model with the following characteristics in mind:
• Only a few or no features are available to characterize the items other than their price and whether they are on promotion. The main signals come from co-purchase patterns.
• The model should capture complementarity and cannibalization between products — i.e. respectively the tendency for items to be purchased together within a single basket and the reduction of sales when items are both available in the assortment.
• The model is designed to efficiently handle large datasets, both in terms of the number of items considered as well as the volume of purchases.
This setup corresponds to our retail scenario and would apply to other sectors with brick-and-mortar stores.
3.2 Notations
The data we consider consists of a collection of purchases, each representing a basket of items bought by a customer. Additional contextual information includes the store where the purchases took place, the list of items that were available at that time, and their prices. More formally, we write the set of items sold in the set of stores. The observed purchases correspond to a tuple with:
• the basket of purchased items;
• the products assortment available at the time of the purchase (by definition, );
• the store in which the purchase happened;
• p the prices for all the items in A at the time of the purchase. In particular, is the price of item i.
We decide not to consider duplicated items in the basket. This choice reflects our objective of capturing interactions between items of the catalog.
3.3 Conditional definition of the utility
We propose a conditional formulation of the utility. Considering an already chosen basket of items , we write the utility of an additional item as , modeled as two independent contributions:
where represents the intrinsic utility (or "preference") attributed to the item and the interaction utility depends on the other items that will also be purchased. can be understood as the popularity of an item, regardless of the other items for sale. In our case, it would only depend on the item, its price and the store where it is purchased.
Following classical formulations of the utility, we define as an itemwise intercept, a logarithmic contribution of the price and an elasticity that depends on the item and the store:
where denotes the scalar product and variables in bold are vectors. We have and , with the size of the latent representation to be chosen. captures that each store has a different population with its own elasticities. The formulation of can be easily modified to introduce multiple underlying factors governing customer choice.
For the interaction term, we use a formulation inspired by methods such as Word2Vec [9], where, in a similar fashion, the probability that a word matches its surrounding words is estimated. In our case, the context is given by items in the basket , so that is expressed as:
with a learned representation of item and the representation for basket . Different formulations of such basket embedding could be used, we have opted for: . One notes that it would be possible to learn different items embeddings for than the ("encoding-decoding" structure).
We assume that the customer behaves rationally and will maximize their utility during a shopping session. Following Discrete Choice Models formulation, we consider that the final utility U is the sum of the deterministic part V as well as a random contribution, :
from which we can derive probabilities, as described in the following section.
3.4 Purchase probability
The random variable is assumed to be independent across items and to follow a zero-mean Gumbel distribution (generalized type I extreme value). Consequently, the conditional choice probability of choosing an item that is not yet in the basket is a softmax over the remaining items in the assortment :
where is the probability to add the item to the basket at the store with the prices and is estimated with the latent parameters . We set this probability to zero when or .
4 Implementation for large-scale data
Given a large dataset of shopping sessions , our goal is to infer the latent parameters which are the trainable weights of our model. We now describe how to learn the optimal from the dataset.
4.1 Training Procedure
The model parameters are estimated by leveraging all baskets data. To this end, similarly to [11] and [29] (Chapter 12), we aim at maximizing the quantity:
which can be seen as a form of self-supervision similar to text, where the missing word is predicted based on the remaining words of its context sentence. One notes that it differs from [1] where they maximize the probability of the baskets, which is not explicitly defined in our model. Besides, for this purpose they generate all possible sub-baskets , which we believe is not always informative and makes computation exponentially costly as the basket size grows.
One also notes that the formula of (Equation 5) is computationally heavy too, since can be very large. Instead, we normalize over a set of randomly drawn negative samples, formally written (whose size is a hyperparameter). We thus approximate with:
Such negative sampling has also been used in [30] and [9], and can be shown to approximate well the log probabilities of the softmax. This strategy is particularly important in a large-scale environment with thousands of different products.
In practice, we maximize a lower bound of :
which gives us the final loss to be minimized during our training, that is the opposite of the log of the lower bound:
where is the sigmoid function. One notes that this loss corresponds to a binary cross-entropy where the are associated to the positive labels and the negative samples to the negative labels.
This loss is minimized during a stochastic gradient descent. At each batch of baskets, the negative samples are randomly drawn, with a different sampling for each epoch in the case of multiple epochs on the dataset. In the following, we describe our method to randomly sample .
4.2 Negative Sampling
In scenarios involving a fixed set of options, such as the vocabulary in the context of natural language [9], negative samples are uniformly sampled from all other options, excluding the true option. In our choice modeling scenario, however, there are several key differences. First, we exclude items already present in basket , as our context does not allow for duplicated items (see Sections 3.1 and
3.2). Second, we propose to draw negative samples exclusively from items within the available assortment . Formally, we enforce the condition:
Implicitly, the negative samples are generated depending on both and on the data point . It could be explicitly written . Practically, it means that must be provided as information during the training process. In contrast, [1] draws their negative samples from the entire item catalog outside the considered basket, that is to say .
The rationale for the use of the assortment during negative sampling is that it prevents the model from considering that two items are cannibalizing each other just because they are not available both at the same time in the training data. Indeed, when item is drawn as a negative sample of item , then the conditional utility will be reduced during the gradient descent that minimizes the loss (see Equation 6). Imposing item to be in the assortment means that such reduction of a conditional probability during the gradient descent will happen only to items that could have been bought with item but had not, leaving items outside of the assortment untouched and thus enabling the model to learn a difference between items that are in the assortment and items that are not. In other words, drawing a negative sample that is not in assortment amounts to assuming that would have been cannibalizing item if were in assortment , which is not necessarily true.
We consider this method of incorporating assortment in the estimation of to be simple yet sufficient and effective, with significant benefits, as demonstrated in the following section.
5 Experiments
We have conducted several types of experiments that validate the relevance of our approach. First, synthetic experiments let us showcase how it behaves on a smaller and controlled environment. Second, we share results obtained on a large real-world industrial dataset issued from Fortenova Group's supermarkets.
5.1 Synthetic Experiments
5.1.1 Dataset
We build a synthetic dataset for which the catalog has 8 items, , with the following interactions:
• Cannibalization: on the one hand and on the other hand form groups of items cannibalizing each other.
• Complementarity: each of the items in are complementary to each of the items in ;
• Neutral: 7 and 8 are neutral in the sense that they don’t have specific interaction with other items.
As a concrete example, we can consider that items are badminton shuttlecocks, items are badminton rackets while items are a t-shirt and a short. We implemented a routine that, given an assortment , generates a dataset of purchased baskets. These baskets are generated following the interactions described above, without price or shop effect (apart from its assortment). The details of this implementation are in Appendix A . In the left of Figure 1, we illustrate the simulated interactions by computing on baskets generated by our routine for a full assortment . A train dataset and a test dataset , illustrated in Figure 2, are constituted by sampling baskets for the different following assortments:
• Training set :
- Store 1: yields ;
Appendix can be found in the GitHub repository at https://github.com/artefactory/alea-carta-est
-
Store 2: yields ;
-
Store 3: yields ;
• Test set :
-
Store 4: yields ;
-
Full Assortment: , i.e. all items yields .


Figure 1: for all item pairs , computed on the synthetic baskets on the left and on the right. Low values correspond to cannibalization and high values to complementarity.
5.1.2 Protocol
We compare several versions of our approach with other state of the art models:
• Shopper [1]: A choice model that iteratively builds the most probable basket. It models the probability to add an item to an already partially built basket with price and interactions effects. The main difference lies in the expression of the basket probability that is computed by summing over all the possible ordered permutations of the basket.
• Basket-MVL [11]: This choice model assumes the utility of a basket to be the additive contributions of the marginal linear utilities of each item within the basket along with a symmetrical interaction term between those items: . Finally, the probability for to be purchased is computed with the softmax function over all possible baskets.
• Translation-Based Recommendation (TBR) [38]: It models a customer next choice as a translation from its previous choices with learned item-item interactions.

Figure 2: Illustration of the synthetic data assortments. The full set of items I is in .

Figure 3: Conditional probabilities for as estimated by the different models on . These probabilities are to be compared with the left of Figure 1.
• Ours: Our model trained on with negative samples drawn following Equation 7.
• Ours : Our model trained on , however any item can be a negative sample as long as it is not in the basket. For this model, .
• Ours : Our model, trained on . This idealistic version of the model has been trained on the true underlying distribution. The two negative sampling strategies are the same for this model since in .
Except for Ours , all models are trained with basket data issued from the three assortment , and , and evaluated on the test dataset . The differences between the models can be easily analyzed by comparing the co-purchase probabilities in Figure 3 with the ground truth on in Figure 1. Similarly, Figure 4 presents a new product combination with assortment , which is not part of the training set. In both cases, we observe that our model, Ours better captures the product interactions. We also evaluate the models with two metrics, the conditional Negative Log-Likelihood NLL and the Mean Reciprocal Rank MRR computed as:
with rank[.] being the ranking function over the available options.
The metrics, reported in Table 1, show that taking well into account the assortment while drawing the negative samples is key to capture the proper patterns. Our proposition of negative sampling Ours better learns the true underlying distribution, and better generalizes on new assortment variations. A first explanation can be found using the conditional probabilities illustrated in Figures 3. Indeed, the difference is particularly visible for some pairs of complementary items, such as items (1, 6) and (2, 6) that have not always been sold at the same time. The models resulting from the naive negative sampling tend to underestimate the complementarity between such items (or equivalently overestimate cannibalization). Except few surprising outliers with high values, Shopper appears to worsen this effect, that we interpret as an impact of its encoding-decoding structure as well as the use

TBR

Shopper

Basket - MVL

Ours

Ours

Ours
Figure 4: Conditional probabilities for as estimated by the different models on the test data . These probabilities are to be compared with the right of Figure 1.
Table 1: Negative Log-Likelihood NLL (lower is better) and Mean Reciprocal Rank MRR (higher is better) for the different models on the test set.
| Model | Shopper | Basket-MVL | TBR | Oursfull | OursI | Ours |
|---|---|---|---|---|---|---|
| NLL() | 1.75 | 1.69 | 1.82 | 1.25 | 1.43 | 1.26 |
| NLL() | 1.49 | 1.41 | 1.55 | 0.97 | 1.07 | 0.95 |
| MRR() | 0.32 | 0.41 | 0.28 | 0.42 | 0.39 | 0.41 |
| MRR() | 0.45 | 0.60 | 0.45 | 0.62 | 0.59 | 0.61 |
of all sub-baskets during its training. Taking into account the assortment is thus beneficial to capture well the different product interactions. While this notion might not be necessary for settings such as language [9] or online retail [1], it definitely should not be overlooked for brick-and-mortar retailers.
5.2 Large scale experiments: Computation time and memory usage
Computation time and memory usage are critical when dealing with basket choice models, particularly in real-world applications where models need to process large-scale sales data efficiently. While some open-source packages offer optimized processes for data storage and discrete choice models estimation [12, 13], it is still a challenge when considering bundles of products.
For this experiment, we compare the processing time for a single epoch of training with a dataset of one million purchases, with respectively 100 and 1,000 items considered. We compare our approach implemented in Python with TensorFlow [32] with the two other models. Shopper [1], has a C++ codebase publicly available. Additionally, we have re-implemented in Python a deterministic version of the model , reproducing the training procedure for a non-Bayesian neural network. We also use our own Python implementation for the basket-MVL model, whose estimation uses a composite conditional likelihood function described in [11], and the Translation-Based Recommendation [38]. The experiment is conducted on a single AMD Ryzen PRO 5955WX CPU and 250GB of RAM.
The code for the experiments can be found at https://github.com/artefactory/alea-carta-est.
Table 2: Comparison of computation time and RAM usage for different models
| 100 Items | 1000 Items | |||
|---|---|---|---|---|
| Process Time | Fits in RAM | Process Time | Fits in RAM | |
| Shopper | 100s | ✓ | - | ✕ |
| Python-Shopper | 110s | ✓ | 620s | ✓ |
| Basket-MVL | 3,000s | ✓ | - | ✕ |
| TBR | 550s | ✓ | 1020s | ✓ |
| Ours | 80 s | ✓ | 360s | ✓ |
Table 3: Description of our retail dataset. Numbers are rounded for confidentiality reasons.
| #Referenced Items | #Shops | #Baskets | #Assortments | Avg Basket Size |
|---|---|---|---|---|
| 6,000+ | 600+ | 100,000,000+ | 10,000+ | 12.4 |
The results are reported in Table 2. First, we can observe that our approach as well as our Python implementation of Shopper scale way better in terms of dataset size, while it is competitive with the C++ implementation in terms of training speed. Our approach is also faster than the Shopper re-implementation, mainly because it does not need to consider permutations of the basket. Following these results, we discarded Shopper and Basket-MVL models for our large scale real-world dataset, with experiments described below.
5.3 Experiments on real-world retail data
We consider a dataset of purchases collected through hundreds of different supermarkets of the European retail company Fortenova Group during four years, from 2017 to 2021 that we describe in Table 3. Restraining the dataset to food related products that have been sold at least 1,000 times, we count more than 6,000 different products purchased. We consider a train/test temporal split to evaluate our model. The train data covers purchases from 2017 to 2020 and test data covers year 2021. In Table 4 we share some metrics results, stressing again the need for a negative sampling adapted to the assortment. The results were obtained with the same latent size for all embeddings and negative samples. We share more details of the implementation in Appendix B.
In Figure 5, we provide a T-SNE [33] projection of a subset of the learned embeddings of our model, colored according to product 's category. We observe that while the model is not provided with any type of information about the different products beside their price, it successfully creates clusters that correspond to products categories. It showcases that the model is able to learn a logical hierarchy of the products using the basket information.
5.4 Application: Highlighting complementary products
The main purpose of such models is to assist a category manager when planning the future assortment or promotion campaign for different stores. One basic experiment is to infer for each product a short list of the most complementary items. With such knowledge provided, the category manager can decide to make sure that complementary items are integrated within the same assortments. We propose to measure the following quantity in order to rank the items according to their complementarity with item :
which is symmetrical w.r.t and . The top 10 products in terms of values are shown in Table 5, for 4 examples of products . In the case of tomato sauce and vanilla powder, the model outlines products that do appear highly complementary. We obtain respectively pasta, bread and pizza dough with tomato sauce and diverse ingredients to bake a cake with the vanilla powder, thus recovering meaningful ingredients together. The example of the soda bottles is also particularly interesting. Indeed, the model has understood packaging size interactions. The large soda bottle has

Figure 5: T-SNE projection of the learned embeddings
Table 4: Conditional Negative Log-Likelihood (lower is better) and Mean Reciprocal Rank (higher is better) on the retail test set.
| Model | Ours | Ours |
|---|---|---|
| NLL() | 3.03 | 2.48 |
| MRR() | 0.015 | 0.018 |
other large bottles as complementary items, while the small soda bottles has smaller formats as top complementary products and also a single portion, to-go ice cream. It may correspond to two types of purchasing behaviors, one optimizing the price/quantity ratio with larger packages and the other one corresponding to instant consumption.
Following these promising results, we are currently conducting a survey with the company's category managers in order to confirm the relevancy of our top complementary items. They are asked to give feedback on different lists of items inferred by our model. Following these feedbacks, we plan to deploy the model as an API that would be called by several user interfaces used by category managers in their daily work. The model would regularly be trained on the sales data in order to keep up-to-date patterns.
6 Conclusion
In this work, we introduced a machine learning model for basket choice modeling that learns embeddings of items in order to capture interactions between them. By leveraging negative sampling techniques, we addressed the computational challenges posed by large transaction datasets, ensuring efficient and scalable learning. Our experiments on synthetic data demonstrated the added value of our model and of its negative sampling method that better captures interactions between products in retail. The large-scale evaluation on more than one million transactions from a leading European retailer validated the practical applicability of our approach, with notably very promising top complementary items. Besides, our approach shows competitive predictive performances and computing scalability, in particular when compared to the models from the literature.
Table 5: Examples of top-10 complementary products according to our model, ranked w.r.t (Equation 10) for the product displayed on top. The products are referenced by their nature and brand names, replaced by a letter for anonymity. For each product displayed on top, the first-ranked complementary product is on the top left and the tenth-ranked complementary product is on the bottom right.
| Soda A 0.5L | Soda A 2L | ||
|---|---|---|---|
| Water A 0.5L | Water B 1L | Soda B 2L | Soda C 2L |
| Soda B 0.5L | Water C 0.5L | Water A 1.5L | Sweets A 500g |
| Soda C 0.5L | Energy Drink 0.5L | Soda D 1.5L | Water B 1L |
| Soda D 0.5L | Strong Alcohol 0.1L | Light Alcohol 0.5L | Soda E 2L |
| Water D 0.5L | Ice Cream 0.16L | Sweets B 100g | Soda F 2L |
| Tomato sauce A | Vanilla powder A | ||
| Pasta A | Pasta B | Margarin A | Chocolate A |
| Bread A | Pizza Dough A | Chocolate B | Chocolate C |
| Pasta C | Other Sauce A | Baking Powder A | Sugar A |
| Toasts A | Other Sauce B | Baking Powder B | Margarin B |
| Bread B | Other Sauce C | Whipped Cream A | Margarin C |
The results confirm the potential of our model to enhance retail decision-making, particularly in helping category managers with assortment optimization and promotion campaign planning. Beyond the direct applications by enriching user interfaces in retail, our model can be extended to other domains involving large-scale consumer choice modeling. Future work will explore the integration of additional features, such as spatial proximity between products in the store shelves and personalized customer profiles. The former will enable the identification of product interactions with respect to their distance in store, while the latter will reveal how these interactions vary across different customer segments.
References
[1] Ruiz, Francisco J.R. and Athey, Susan and Blei, David M.: SHOPPER: A Probabilistic Model of Consumer Choice with Substitutes and Complements. The Annals of Applied Statistics 14(1), 1–27, JSTOR (2020)
[2] McFadden, D.: Conditional Logit Analysis of Qualitative Choice Behavior. Frontiers in Econometrics, 105–142, Academic press (1974)
[3] Wang, S. and Mo, B. and Zhao, J.: Deep neural networks for choice analysis: Architecture design with alternative-specific utility functions. Transportation Research Part C: Emerging Technologies 112, 234–251, Elsevier (2020)
[4] McFadden, Daniel et al.: Modelling the choice of residential location. Institute of Transportation Studies, University of California California (1978)
[5] Han, Y. and Pereira, F. C. and Ben-Akiva, M. and Zegras, C.: A neural-embedded discrete choice model: Learning taste representation with strengthened interpretability. Transportation Research Part B: Methodological 163, 166–186 (2022)
[6] Aouad, Ali and Désir, Antoine: Representing random utility choice models with neural networks. arXiv preprint arXiv:2207.12877 (2022)
[7] Sobolewski, Maciej and Kopczewski, Tomasz: Estimating demand for fixed-line telecommunication bundles. Telecommunications Policy 41(4), 227–241, Elsevier (2017)
[8] Arkoudi, Ioanna and Krueger, Rico and Azevedo, Carlos Lima and Pereira, Francisco C.: Combining discrete choice models and neural networks through embeddings: Formulation, interpretability and performance. Transportation research part B: methodological 175, 102783, Elsevier (2023)
[9] Mikolov, Tomas and Sutskever, Ilya and Chen, Kai and Corrado, Greg S and Dean, Jeff: Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems 26 (2013)
[10] Daniel McFadden and Kenneth Train: Mixed MNL Models for Discrete Response. Journal of Applied Econometrics 15(5), 99–110, Wiley (2000)
[11] Vincenzina Caputo and Jayson L. Lusk: The Basket-Based Choice Experiment: A Method for Food Demand Policy Analysis. Food Policy 109, 102252 (2022)
[12] Auriau, Vincent and Aouad, Ali and Désir, Antoine and Malherbe, Emmanuel: Choice-learn: large-scale choice modeling for operational contexts through the lens of machine learning. Journal of Open Source Software 9(101), 6899, The Open Journal (2024)
[13] Tianyu Du and Ayush Kanodia and Susan Athey: Torch-Choice: A PyTorch Package for Large-Scale Choice Modelling with Python. arXiv preprint arXiv:2304.01906 (2023)
[14] Balestriero, Randall and Ibrahim, Mark and Sobal, Vlad and Morcos, Ari and Shekhar, Shashank and Goldstein, Tom and Bordes, Florian and Bardes, Adrien and Mialon, Gregoire and Tian, Yuandong and others: A cookbook of self-supervised learning. arXiv preprint arXiv:2304.12210 (2023)
[15] Gong, Yunchao and Ke, Qifa and Isard, Michael and Lazebnik, Svetlana: A multi-view embedding space for modeling internet images, tags, and their semantics. International journal of computer vision 106, 210–233, Springer (2014)
[16] Liu, Cai-zhi and Sheng, Yan-xiu and Wei, Zhi-qiang and Yang, Yong-Quan: Research of text classification based on improved TF-IDF algorithm. IEEE international conference of intelligent robotic and control engineering (IRCE), 218–222 (2018)
[17] Yang, Zhen and Ding, Ming and Huang, Tinglin and Cen, Yukuo and Song, Junshuai and Xu, Bin and Dong, Yuxiao and Tang, Jie: Does negative sampling matter? a review with insights into its theory and applications. IEEE Transactions on Pattern Analysis and Machine Intelligence (2024)
[18] Pilehvar, Mohammad Taher and Camacho-Collados, Jose: Embeddings in natural language processing: Theory and advances in vector representations of meaning. Morgan & Claypool Publishers (2020)
[19] LeCun, Yann and Bengio, Yoshua and Hinton, Geoffrey: Deep learning. Nature 521, 436–444, Nature Publishing Group UK London (2015)
[20] Guo, Cheng and Berkhahn, Felix: Entity embeddings of categorical variables. arXiv preprint arXiv:1604.06737 (2016)
[21] Seger, Cedric: An investigation of categorical variable encoding techniques in machine learning: binary versus one-hot and feature hashing (2018)
[22] Rodríguez, Pau and Bautista, Miguel A and Gonzalez, Jordi and Escalera, Sergio: Beyond one-hot encoding: Lower dimensional target embedding. Image and Vision Computing 75, Elsevier (2018)
[23] Akata, Zeynep and Perronnin, Florent and Harchaoui, Zaid and Schmid, Cordelia: Label-embedding for image classification. IEEE transactions on pattern analysis and machine intelligence 38(7), 1425–1438 (2015)
[24] Xu, Mengjia: Understanding graph embedding methods and their applications. SIAM Review 63(4), 825–853 (2021)
[25] Kim, Myung Jun and Grinsztajn, Léo and Varoquaux, Gaël: CARTE: pretraining and transfer for tabular learning. arXiv preprint arXiv:2402.16785 (2024)
[26] Koren, Yehuda and Rendle, Steffen and Bell, Robert: Advances in collaborative filtering. Recommender systems handbook, 91–142, Springer (2021)
[27] Li, Shiwei and Guo, Huifeng and Tang, Xing and Tang, Ruiming and Hou, Lu and Li, Ruixuan and Zhang, Rui: mbedding compression in recommender systems: A survey. ACM Computing Surveys 56(5), 1–21, ACM New York (2024)
[28] ACM Transactions on Management Information Systems (TMIS): The netflix recommender system: Algorithms, business value, and innovation. ACM Transactions on Management Information Systems (TMIS) 6(4), 1–19, ACM New York (2015)
[29] Molenberghs, Geert and Verbeke, Geert et al.: Models for discrete longitudinal data. Springer 22 (2005)
[30] Gutmann, Michael U and Hyvärinen, Aapo: Noise-contrastive estimation of unnormalized statistical models, with applications to natural image statistics. The journal of machine learning research 13(1), 307–361, JMLR (2012)
[31] Salvadé, Nicolas and Hillel, Tim: RUMBoost: Gradient boosted random utility models. Transportation Research Part C: Emerging Technologies 170, 104897, Elsevier (2025)
[32] Abadi, Martín and Agarwal, Ashish and Barham, Paul and Brevdo, Eugene and Chen, Zhifeng and Citro, Craig and Corrado, Greg S and Davis, Andy and Dean, Jeffrey and Devin, Matthieu et al.: Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467 (2016)
[33] Van der Maaten, Laurens and Hinton, Geoffrey: Visualizing data using t-SNE. Journal of machine learning research 9(11) (2008)
[34] Aouad, Ali and Elmachtoub, Adam N and Ferreira, Kris J and McNellis, Ryan: Market segmentation trees. Manufacturing & Service Operations Management 25(2), 648–667, INFORMS (2023)
[35] Sifringer, Brian and Lurkin, Virginie and Alahi, Alexandre: Enhancing discrete choice models with neural networks. 18th Swiss Transport Research Conference, 1–3 (2018)
[36] Pereira, Francisco C.: Rethinking travel behavior modeling representations through embeddings. arXiv preprint arXiv:1909.00154 (2019)
[37] Ko, Joohwan and Li, Andrew A.: Modeling Choice via Self-Attention. arXiv preprint arXiv:2311.07607 (2023)
[38] Ruining He, Wang-Cheng Kang, and Julian McAuley.: Translation-based Recommendation. In Proceedings of the Eleventh ACM Conference on Recommender Systems (2017)
A Synthetic Data Generation
We describe the iterative algorithm used for the experiments in Section 5.1 to obtain synthetic data. From an assortment A, we sample the purchased baskets as follows:
- Selection of the first item We consider that the following sets can be chosen with the same probability:
• the ensemble of available shuttlecocks
• the ensemble of available rackets
• the ensemble of available shorts
• the ensemble of available t-shirts
One item is then chosen among the selected set, all items also having the same probability.
-
Basket Completion Once the first item is chosen, one item by remaining nest can be added to the basket. Probabilities equal to 0.7 for nest with complementary items and 0.15 for neutral items. Once a nest is selected, one item among the nest is finally selected, all having the same probability.
-
Adding some random noise With a probability one of the items of the assortment, not already in the basket, may also be added.

-
Choice of a single nest
-
Choice of a single item
-
Random sampling of nests to complete the basket
-
Choice of a single item by nest for completion
-
Random additions
Resulting basket
Figure 6: Successive steps for synthetic data sampling from an assortment. In this example, the racket nest is selected during the first step, with the green racket finally being selected. During the step 2, the grey shuttlecock and the t-shirt are added. Finally a second racket is added to the basket during step 3.
B Experiments on real-world retail data
For the experiments on real-world data, we used the following hyperparameters:
• , latent size: 12
• latent size: 128
• Number of negative samples:
• Optimizer: Adamax with a learning rate of 0.001
• Batch size: 256
• Number of epochs: 20