# Stepping up marketing for advertisers: Scalable lookalike audience

[Grab](https://yomu.fyi/company/grab) · William Wu · Sep 22, 2023

**Type:** Problem & solution

## Summary

Grab's legacy lookalike audience generation platform suffered from long creation SLAs of two working days, high costs, and low weekly update frequencies. To resolve these bottlenecks, the engineering team designed an embedding-based platform powered by an in-memory retrieval service and automated update pipelines. The system creates audience representations by averaging constituent passenger embeddings, determining user membership through real-time cosine score thresholds. To eliminate feature store latency while fitting all embeddings into memory, a hash-based compression method cuts passenger embedding storage needs by roughly 90%. Consequently, audience availability dropped to within 15 minutes of campaign creation, audience generation costs fell by 98%, and ad impressions and clicks doubled.

## Context

Grab's previous lookalike audience workflow suffered from high creation costs, weekly update frequencies, and two-day SLAs caused by slow data insertion into its Segmentation Platform, hindering advertisers from scaling campaigns and responding quickly to market shifts.

## Approach / What changed

Grab implemented an in-memory, embedding-based retrieval service and pipeline that averages passenger embeddings into audience embeddings, evaluates membership via cosine similarity thresholds, and uses a Bloom-filter-inspired hash compression algorithm to reduce embedding memory footprints.

## Takeaways

- Averaging constituent passenger embeddings to produce audience embeddings enables direct online membership matching via cosine similarity and score thresholds without complex downstream models.
- A hash-based embedding compression technique segments a 64-bit hash into four 16-bit blocks to reduce in-memory passenger embedding storage by approximately 90% using mean squared error loss training.
- The new platform decreased audience generation costs by 98% and reduced the time required for advertisers to target a new audience from two days to within 15 minutes.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Machine Learning](https://yomu.fyi/topic/machine-learning), [Performance](https://yomu.fyi/topic/performance), [Recommendation Systems](https://yomu.fyi/topic/recommendation-systems), [Scalability](https://yomu.fyi/topic/scalability)

[Read original post](https://engineering.grab.com/scalable-lookalike-audiences)
