Talk to our team
Menu

Better Capturing Interactions between products in Retail: Revisited Negative Sampling for Basket Choice Modeling

Authors
  • Jules Désir
  • Vincent Auriau
  • Martin Mozina
  • Emmanuel Malherbe
Affiliations
  • Artefact Research Center
  • MICS, CentraleSupélec, Université Paris-Saclay
  • Fortenova Group
Accepted at
ECML PKDD 2025
Date
arXiv
2610.17963

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.

Cite this paper

@inproceedings{dsir2025better,
  title = {Better Capturing Interactions between products in Retail: Revisited Negative Sampling for Basket Choice Modeling},
  author = {Jules Désir and Vincent Auriau and Martin Mozina and Emmanuel Malherbe},
  booktitle = {European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML PKDD 2025)},
  year = {2025},
  doi = {10.1007/978-3-032-06118-8_8},
  url = {https://doi.org/10.1007/978-3-032-06118-8_8}
}

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 [11, 7] 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 (The different Python implementations can be found in the Choice-Learn package at https://github.com/artefactory/choice-learn).

Related Work

Our paper relates to two strands of the literature: discrete choice models and representation learning, with similarities with word embeddings.

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 [6, 5, 35, 3] or tree-based models [34, 31].

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 [11, 7], 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.

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 [23, 22], 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.

Model

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.

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 I the set of items sold in the set S of stores. The observed purchases correspond to a tuple (B,A,s,p) with:

B⊆I the basket of purchased items;

A⊆I the products assortment available at the time of the purchase (by definition, B⊆A);

s∈S the store in which the purchase happened;

p the prices for all the items in A at the time of the purchase. In particular, pi 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.

Conditional definition of the utility

We propose a conditional formulation of the utility. Considering an already chosen basket of items B, we write the utility of an additional item as V(i|B,s,p), modeled as two independent contributions:

V(i|ℬ,s,p)=Vpref(i|s,p)+Vinter(i|ℬ)

where Vpref represents the intrinsic utility (or "preference") attributed to the item and the interaction utility Vinter depends on the other items that will also be purchased. Vpref 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 Vpref as an itemwise intercept, a logarithmic contribution of the price and an elasticity that depends on the item and the store:

Vpref(i|s,p)=αi+βi⋅δslog⁡pi

where ⋅ denotes the scalar product and variables in bold are vectors. We have αi∈ℝ and 𝜷i,𝜹s∈ℝK, with K∈ℕ∗ the size of the latent representation to be chosen. 𝜹s captures that each store has a different population with its own elasticities. The formulation of Vpref(i|s,p) 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 B, so that Vinter is expressed as:

Vinter(i|ℬ)=γi⋅Eℬ

with γi ∈ ℝK a learned representation of item i and 𝑬B the representation for basket B. Different formulations of such basket embedding could be used, we have opted for: 𝑬B = 1 |B| ∑ j∈B 𝜸𝒋. One notes that it would be possible to learn different items embeddings for 𝑬B 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, εi:

U(i|ℬ,s,p)=V(i|ℬ,s,p)+ϵi

from which we can derive probabilities, as described in the following section.

Purchase probability

The random variable εi 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 i∈A that is not yet in the basket is a softmax over the remaining items in the assortment A:

ℙ(i|ℬ,s,p)=ℙ(U(i|ℬ,s,p)>U(j|ℬ,s,p)∀j∈𝒜∖ℬ,j≠i)(4)
=eV(i|ℬ,s,p)∑j∈(𝒜∖ℬ)eV(j|ℬ,s,p)(5)

where ℙ(i|B,s,p) is the probability to add the item i to the basket B at the store s with the prices p and is estimated with the latent parameters Θ={α,𝜷,𝜹,𝜸}. We set this probability to zero when i∉A or i∈B.

Implementation for large-scale data

Given a large dataset of N shopping sessions {(Bk,Ak,sk,pk)}k=1N, 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.

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:

Θ∗=argmaxΘ⁡∏k=1N∏i∈𝔹kℙ(i|ℬk∖i,sk,pk)

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 B′⊆B, which we believe is not always informative and makes computation exponentially costly as the basket size grows.

One also notes that the formula of ℙ(i|Bk\i,sk,pk) (Equation 5) is computationally heavy too, since A can be very large. Instead, we normalize eV(i|B,s,p) over a set of randomly drawn negative samples, formally written NS (whose size |NS| is a hyperparameter). We thus approximate ℙ(i|Bk\i,sk,pk) with:

f(i,ℬk∖i,sk,pk)=eV(i|ℬk,sk,pk)eV(i|ℬk,sk,pk)+∑j∈𝒩𝒮eV(j|ℬk,sk,pk)

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 ∏N k=1 ∏i∈ Bk f (i|Bk\i, sk, pk):

∏k=1N∏i∈ℬkf(i|ℬk∖i,sk,pk)≥∏k=1N∏i∈ℬkeV(i|ℬk,sk,pk)(1+eV(i|ℬk,sk,pk))∏j∈𝒩𝒮(1+eV(j|ℬk,sk,pk))

which gives us the final loss to be minimized during our training, that is the opposite of the log of the lower bound:

ℒ=−∑k=1N∑i∈ℬk(log⁡σ[V(i|ℬk∖i,sk,pk)]+∑j∈𝒩𝒮log⁡(1−σ[V(j|ℬk∖i,sk,pk)]))(6)

where σ[x]=ex1+ex is the sigmoid function. One notes that this loss corresponds to a binary crossentropy where the V(i|Bk\i,sk,pk) are associated to the positive labels and the negative samples V(j|Bk\i,sk,pk) to the negative labels.

This loss is minimized during a stochastic gradient descent. At each batch of baskets, the negative samples NS 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 NS.

Negative Sampling

In scenarios involving a fixed set of options, such as the vocabulary in the context of natural language [9], negative samples NS 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 Bk, as our context does not allow for duplicated items (see Sections 3.1 and 3.2). Second, we propose to draw negative samples NS exclusively from items within the available assortment Ak. Formally, we enforce the condition:

𝒩𝒮⊂𝒜k∖ℬk(7)

Implicitly, the negative samples are generated depending on both Ak and Bk on the data point k. It could be explicitly written NS(Ak,Bk). Practically, it means that Ak 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 I\Bk.

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 j∈I\Bk is drawn as a negative sample of item i∈Bk, then the conditional utility V(j|Bk\i,sk,pk) will be reduced during the gradient descent that minimizes the loss L (see Equation 6). Imposing item j to be in the assortment Ak means that such reduction of a conditional probability during the gradient descent will happen only to items that could have been bought with item i 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 j∈I\Bk that is not in assortment Ak amounts to assuming that j would have been cannibalizing item i if j were in assortment Ak, which is not necessarily true.

We consider this method of incorporating assortment Ak in the estimation of ℙ(i|Bk\i,sk,pk) to be simple yet sufficient and effective, with significant benefits, as demonstrated in the following section.

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.

Synthetic Experiments

Dataset

We build a synthetic dataset for which the catalog has 8 items, I={1,...,8}, with the following interactions:

Cannibalization: {1,2,3} on the one hand and {4,5,6} on the other hand form groups of items cannibalizing each other.

Complementarity: each of the items in {1,2,3} are complementary to each of the items in {4,5,6};

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 {1,2,3} are badminton shuttlecocks, items {4,5,6} are badminton rackets while items {7,8} are a t-shirt and a short. We implemented a routine that, given an assortment A⊆I, generates a dataset D 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 A2. In the left of Figure 1, we illustrate the simulated interactions by computing ℙ(i∈B|j∈B) on baskets generated by our routine for a full assortment A=I. A train dataset Dtrain and a test dataset Dtest, illustrated in Figure 2, are constituted by sampling baskets for the different following assortments:

· Training set Dtrain: - Store 1: A1 = {1, 2, 4, 5, 7, 8} = I\{3, 6} yields D1; - Store 2: A2 = {1, 3, 5, 6, 7, 8} = I\{2, 4} yields D2; - Store 3: A3 = {2, 3, 4, 6, 7, 8} = I\{1, 5} yields D3; · Test set Dtest: - Store 4: A4 = {1, 2, 5, 6, 7, 8} = I\{3, 4} yields D4;

Full Assortment: Afull=I, i.e. all items yields Dfull.

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.

Better Capturing Interactions between Products in Retail: Revisited Negative Sampling for Basket Choice Modeling

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: U(ℬ)=∑i∈ℬβlog⁡pi+∑i,j∈ℬ𝜸𝒊⋅𝜸𝒋. 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.

Ours: Our model trained on Dtrain with negative samples drawn following Equation 7.

OursI: Our model trained on Dtrain, however any item can be a negative sample as long as it is not in the basket. For this model, NS=I\Bk.

Oursfull: Our model, trained on Dfull. 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 A=I in Dfull.

Except for Oursfull, all models are trained with basket data Dtrain issued from the three assortment A1,A2 and A3, and evaluated on the test dataset Dtest. The differences between the models can be easily analyzed by comparing the co-purchase probabilities ℙ(i|B={j}) in Figure 3 with the ground truth on Dfull in Figure 1. Similarly, Figure 4 presents a new product combination with assortment A4, which is not part of the training set. In both cases, we observe that our model, OursA 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:

NLL(𝒟)=−∑ℬ∈𝒟∑i∈ℬlog⁡ℙ(i|ℬ∖i)(8)
MRR(𝒟)=∑ℬ∈𝒟∑i∈ℬ1rank[V(i|ℬ∖i)](9)

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 OursA better learns the true underlying distribution, and better generalizes on new assortment variations. A first explanation can be found using the conditional probabilities illustratecad 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 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.

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 (The code for the experiments can be found at https://github.com/artefactory/alea-carta-est), 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 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.

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 D2021 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 K=128 for all embeddings and |NS|=20 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 𝜸i embeddings of our model, colored according to product i’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.

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 C(i,j)∈ℝ in order to rank the items j according to their complementarity with item i:

C(i,j)=∑ℬ∈𝒟ℙ(i|ℬ∪{j})+ℙ(j|ℬ∪{i})−ℙ(i|ℬ∖{j})−ℙ(j|ℬ∖{i})(10)

which is symmetrical w.r.t i and j. The top 10 products j in terms of C(i,j) values are shown in Table 5, for 4 examples of products i. 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 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.

Table 4 | Conditional Negative Log-Likelihood (lower is better) and Mean Reciprocal Rank (higher is better) on the retail test set.

Illustration of the synthetic data assortments.
Figure 2. Illustration of the synthetic data assortments. The full set of items I is in Afull.
Conditional probabilities ℙ(i|B = { j}) for i ≠ j as estimated by the different models on Dfull.
Figure 3. Conditional probabilities ℙ(i|B = { j}) for i ≠ j as estimated by the different models on Dfull. These probabilities are to be compared with the left of Figure 1.
Conditional probabilities ℙ(i|B = { j}) for i ≠ j as estimated by the different models on the test data D4.
Figure 4. Conditional probabilities ℙ(i|B = { j}) for i ≠ j as estimated by the different models on the test data D4. These probabilities are to be compared with the right of Figure 1.
T-SNE projection of the learned i embeddings
Figure 5. T-SNE projection of the learned 𝜸i embeddings

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.

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.

Next step

A problem worth researching?

Tell us what you are trying to solve, and we will put you in touch with the people who work on it.