about
Monolith: Real time recommendation system with collisionless embedding table (arxiv.org)
70 points by wallflower on Nov 6, 2022 | hide | past | pdf | 6 comments on HN

In plain words: A recommendation system that trains continuously instead of in batches, giving every user and item its own slot in a lookup table so entries never clash, and dropping old or rare ones to save memory. It runs in BytePlus's product, learning from clicks fast.

Abstract · Monolith: Real Time Recommendation System With Collisionless Embedding Table

Building a scalable and real-time recommendation system is vital for many businesses driven by time-sensitive customer feedback, such as short-videos ranking or online ads. Despite the ubiquitous adoption of production-scale deep learning frameworks like TensorFlow or PyTorch, these general-purpose frameworks fall short of business demands in recommendation scenarios for various reasons: on one hand, tweaking systems based on static parameters and dense computations for recommendation with dynamic and sparse features is detrimental to model quality; on the other hand, such frameworks are designed with batch-training stage and serving stage completely separated, preventing the model from interacting with customer feedback in real-time. These issues led us to reexamine traditional approaches and explore radically different design choices. In this paper, we present Monolith, a system tailored for online training. Our design has been driven by observations of our application workloads and production environment that reflects a marked departure from other recommendations systems. Our contributions are manifold: first, we crafted a collisionless embedding table with optimizations such as expirable embeddings and frequency filtering to reduce its memory footprint; second, we provide an production-ready online training architecture with high fault-tolerance; finally, we proved that system reliability could be traded-off for real-time learning. Monolith has successfully landed in the BytePlus Recommend product.

Zhuoran Liu, Leqi Zou, Xuan Zou, Caihua Wang, Biao Zhang, Da Tang, Bolin Zhu, Yijie Zhu, Peng Wu, Ke Wang, Youlong Cheng
arXiv:2209.07663 · cs.IR · submitted Sep 16, 2022 · updated Sep 27, 2022
abstract · pdf · html · ORSUM@ACM RecSys 2022

add comment on HN
Also discussed: Feb 2026 (2 points, 0 comments) · Dec 2024 (1 point, 0 comments) · Dec 2024 (2 points, 0 comments) · Dec 2024 (1 point, 1 comment) · Oct 2024 (1 point, 0 comments) · Oct 2023 (2 points, 0 comments) · Nov 2022 (3 points, 0 comments) · Nov 2022 (3 points, 0 comments)

The document discusses a monolith real-time recommendation system with collisionless embedding table. The system is designed to provide personalized content for each individual user in real-time. The data for recommendation mostly contain sparse categorical features, some of which appear with low frequency.

A collisionless embedding table is a type of data structure that is used to store information in a way that minimizes the chances of two pieces of information colliding or conflicting with each other. This is often done by using a hashing algorithm to map data to specific locations in the table, which reduces the likelihood of two pieces of data being stored in the same location.

Embeddings are a way of representing data in a lower-dimensional space. In this case, the embedding is used to represent the data from the user's interactions. This can be used to make predictions about relationships between vectors.

The advantage of storing the dot products of the embeddings would be that it would allow for a more efficient calculation of the similarity between two vectors. Dot products are a measure of how similar two vectors are, so by storing the dot products of the embeddings, it would be possible to quickly calculate the similarity between any two vectors. This would be especially useful in a recommendation system, where it is often necessary to calculate the similarity between a user's vector and a large number of other vectors in order to find the most similar items.

Interesting work on Online Learning:

There are many empirical studies which show for feature hashing, a few collisions don't have a sig impact on perf (https://youtu.be/ARjNMdCzN-Q?t=599).

However, for some archs, the impact is catastrophic. Eg matrix factorization. Any collision leads to an incorrect item. Zero Collision Hashing addresses the problem of mapping collisions. One technique is to introduce state into the hashing fn using the current id assignments.

real time publishing protocol:

* minute-level weight syncing * delta pushes only * ignore machine failures and rely on (possibly stale) full snapshot loading to bootstrap the new hosts

On the other hand, the end user can only distinguish two kinds of recommendations: (1) what is most popular over a period, and (2) what is similar to your most recent few likes/buys.

Besides, in a social media app, you can do whatever you want. To overcome limitations in (1), you can show whatever view counts you want. To overcome (2), you can take a video recorded a week ago, whose similarity you learned in a batch 3 days ago, and show it to a new user with a tag that says "1h ago."

Does anyone have an archive of their code for this?

https://github.com/bytedance/monolith exists, but is an empty repo. A Web Search for "github bytedance monolith" finds a bunch of files in that repo that are 404s when you click on them.

There are forks of the non-empty version linked from https://github.com/bytedance/monolith/network/members
It is an interesting architecture. Flink for real time feature computation and Kafka to share training samples with clients for low end to end latency.

Nothing on use of embeddings for similarity search, though. I assume they are using FAIS?