Ecommerce ops · Production

DoorDash trains Twin Neural Network catalog embeddings for search and recommendations

The problem

DoorDash's catalog is extremely large and constantly growing, making it impossible to manually label or analyze at scale. Multiple teams needed a common, generalizable way to represent catalog items for ML use cases — recommendations, search, and promotions — but existing embedding approaches had significant drawbacks for large, sparse, continuously evolving catalogs.

First attempt

Word2vec embeddings required computationally expensive daily retraining as millions of items were added and suffered from sparsity for infrequently interacted items. Supervised deep neural network classifiers did not guarantee good metric properties and depended heavily on annotation quality for rare classes. BERT fine-tuning was too slow for inference due to model size, even with distilled variants.

Workflow diagram · grounded in source
1
Search session data ingestion
trigger
“we use self-supervised methods to train embeddings based on the item name and search query”
2
Positive/negative pair construction
ai_action
“An item X is relevant for a query Q, if a user searched for query Q and immediately purchased X afterwards in the same session and X is the most expensive item in the basket”
3
Siamese network training with triplet loss
ai_action
“we use a Siamese Neural Network ( also called a Twin network) architecture with triplet loss. The triplet loss attempts to force similar examples together and push dissimilar examples apart in the latent space”
4
Embedding deployment as shared features
output
“we've begun to deploy the embeddings as features available for consumption by other models at DoorDash”
5
Recommendation carousel population
output
“Use a filtering step to retrieve the stores most similar to last_store_id”
Reported outcome

The Siamese Neural Network improved F1-score by ~23% over the FastText baseline, outperforming supervised LSTM classifiers (+15%).
The embeddings also required more than three times the labeled data for a FastText classifier to achieve comparable accuracy, demonstrating substantially better sample efficiency. The embeddings are now deployed across recommendations and programmatic merchandising with immediate substantial improvements.

Reported metrics
F1-score improvement over FastText baseline (Siamese Network)~23%
F1-score improvement over FastText baseline (LSTM Classifier)+15%
Labeled data required for comparable FastText accuracygreater than three times the existing labeled data
Model performance improvement post-deploymentimmediate substantial improvements
Reported stack
Siamese Neural Networkbidirectional LSTMFastTextUMAPWord2vec
Source
https://careersatdoordash.com/blog/using-twin-neural-networks-to-train-catalog-item-embeddings/
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

The Siamese Neural Network improved F1-score by ~23% over the FastText baseline, outperforming supervised LSTM classifiers (+15%).

What tools did this team use?

Siamese Neural Network, bidirectional LSTM, FastText, UMAP, Word2vec.

What results were reported?

F1-score improvement over FastText baseline (Siamese Network): ~23%; F1-score improvement over FastText baseline (LSTM Classifier): +15%; Labeled data required for comparable FastText accuracy: greater than three times the existing labeled data; Model performance improvement post-deployment: immediate substantial improvements (source-reported, not independently verified).

What failed first in this deployment?

Word2vec embeddings required computationally expensive daily retraining as millions of items were added and suffered from sparsity for infrequently interacted items.

How is this ecommerce ops AI workflow structured?

Search session data ingestion → Positive/negative pair construction → Siamese network training with triplet loss → Embedding deployment as shared features → Recommendation carousel population.