# Safe and Efficient Multi-Epoch Embedding Training

DevFeed: [Safe and Efficient Multi-Epoch Embedding Training](<https://devfeed.tech/articles/safe-and-efficient-multi-epoch-embedding-training-121989.md>)

Original publisher: [Read original article](<https://medium.com/pinterest-engineering/safe-and-efficient-multi-epoch-embedding-training-103bec2abc83?source=rss----4c5a5f6279b6---4>)

Author: Pinterest Engineering

Published: 2026-11-06T16:01:03Z

Content type: article

Language: en

Sources: [Pinterest](<https://devfeed.tech/sources/pinterest-engineering-blog-medium.md>)

Topics: [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Fine-tuning](<https://devfeed.tech/topics/fine-tuning.md>), [recommendation systems](<https://devfeed.tech/topics/recommendation-systems.md>), [distributed-training](<https://devfeed.tech/topics/distributed-training.md>), [machine learning overfitting](<https://devfeed.tech/topics/machine-learning-overfitting.md>), [Representation learning](<https://devfeed.tech/topics/representation-learning.md>), [gradient\_accumulation](<https://devfeed.tech/topics/gradient-accumulation.md>)

Tags: [communication](<https://devfeed.tech/tags/communication.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [embedding](<https://devfeed.tech/tags/embedding.md>), [embedding-tables](<https://devfeed.tech/tags/embedding-tables.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [fine-tuning](<https://devfeed.tech/tags/fine-tuning.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [lookup](<https://devfeed.tech/tags/lookup.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [pinterest](<https://devfeed.tech/tags/pinterest.md>), [pretraining](<https://devfeed.tech/tags/pretraining.md>), [ranking](<https://devfeed.tech/tags/ranking.md>), [recommendation-system](<https://devfeed.tech/tags/recommendation-system.md>), [recommendation-systems](<https://devfeed.tech/tags/recommendation-systems.md>), [retrieval](<https://devfeed.tech/tags/retrieval.md>), [synchronization](<https://devfeed.tech/tags/synchronization.md>), [training](<https://devfeed.tech/tags/training.md>), [vision-language-models](<https://devfeed.tech/tags/vision-language-models.md>), [vision-language-models-vlms](<https://devfeed.tech/tags/vision-language-models-vlms.md>), [vlms](<https://devfeed.tech/tags/vlms.md>)

## AI overview

Pinterest's Homefeed team enabled multi-epoch fine-tuning of pretrained ID embeddings by delaying their adaptation: train the rest of the model with embeddings frozen for the first epoch, then unfreeze them. Full co-training overfit sharply, with nearly a 6% offline save-metric decline from one to two epochs; delayed updates improved results in experiments and the production approach led to a reported 1.09% increase in online saves. For longer runs, they overlapped next-batch distributed embedding lookups with current-batch computation, accepting a one-update staleness that showed no measured quality loss, and reduced lookup overhead with fused requests and specialized kernels. Gradient isolation also prevented overfitting, but did not outperform fully frozen embeddings. The authors describe these results in the Homefeed setting and leave broader component-specific optimization as an open question.

## Source excerpt

Authors: Shruthi Hariharan | Machine Learning Engineer II; Konish Dutta | Machine Learning Engineer II; Abhinav Naikawadi | Sr. Machine Learning Engineer; Zhihua Zhang | Machine Learning Engineer II; Rakshita Nagalla | Sr. Machine Learning Engineer; Kousik Rajesh* | Machine Learning Engineer II; Matt Lawhon | Staff Machine Learning Engineer Tags: Machine Learning, Infrastructure, Recommendation Systems Content Track: Technical Discussion / Architecture of big components * == work done while at Pinterest Introduction Large ID embedding tables underpin some of the largest modeling advances at Pinterest, including teacher-model scaling and cross-domain pretraining for ranking and retrieval. These tables are first pre-trained to learn broadly useful Pin representations and then fine-tuned as part of the downstream surface-specific ranking model. Here, we'll focus on the Homefeed ranking model. The strength of the embedding tables comes from their enormous capacity to absorb information about billions of Pins and learn rich representations. That power, however, is coupled with fragile training dynamics that have historically constrained fine-tuning to one epoch. That compromise has become increasingly dissatisfactory; single-epoch fine-tuning prevents us from effectively optimizing our models over small, fresh datasets in retraining, and disproportionately harms effective representation learning of certain components of our ranking model which benefit from longer training, like Vision Language Models (VLMs). A one-epoch ceiling forces every component of our model to learn on the schedule of its most training-sensitive component. When trained longer, two problems appear: Model quality degrades sharply. In Homefeed ranking, we saw nearly a 6% decline in our offline save metric when extending training from one epoch to two epochs. GPU waste from communication-bound training accumulates. Distributed embedding lookup and synchronization overhead created large idle periods in