User Foundation Models for Personalization at Scale

grab · Tech · 2025 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Superapp personalization and recommendation infrastructure

Grab needed a reusable user representation layer that could capture multimodal, sequential behavior across mobility, delivery, financial, merchant, and driver ecosystems without relying on siloed task-specific feature engineering.

Constraints:

Architecture

Grab built a transformer-based user foundation model that consumes tabular profile data and sequential clickstream events through a shared key-value token format. Modality-specific adapters encode text, numerical values, IDs, and locations, alignment layers project them into one vector space, and the transformer pre-trains with masked reconstruction plus next-action prediction. Ray-based CPU/GPU pipelines train on terabytes of data and regenerate fresh long-term and short-term embeddings for downstream personalization systems.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  raw-superapp-data["Raw superapp data"] --> key-value-tokenizer["Key-value tokenizer"]
  key-value-tokenizer --> modality-adapters["Modality adapters"]
  modality-adapters --> alignment-layer["Alignment layer"]
  alignment-layer --> transformer-foundation-model["Transformer foundation model"]
  transformer-foundation-model --> pre-training-heads["Pre-training heads"]
  pre-training-heads --> hierarchical-id-classifier["Hierarchical ID classifier"]
  transformer-foundation-model --> user-id-adapter["User ID adapter"]
  transformer-foundation-model --> sequence-aggregation-module["Sequence aggregation module"]
  user-id-adapter --> downstream-personalization-models["Downstream personalization models"]
  sequence-aggregation-module --> downstream-personalization-models
  ray-cpu-workers["Ray CPU workers"] --> key-value-tokenizer
  ray-cpu-workers --> ray-gpu-workers["Ray GPU workers"]
  ray-gpu-workers --> transformer-foundation-model
  ray-gpu-workers --> downstream-personalization-models
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Raw superapp data Provides tabular user attributes, transaction records, clickstream events, IDs, text, numbers, and locations. Key-value tokenizer
Key-value tokenizer Converts tabular columns and time-series events into a universal token format. Raw superapp data, Modality adapters
Modality adapters Encode text, numerical, categorical ID, and location tokens with specialized encoders. Key-value tokenizer, Alignment layer
Alignment layer Projects modality-specific vectors into one shared representation space. Modality adapters, Transformer foundation model
Transformer foundation model Learns user representations from tabular and time-series signals. Alignment layer, Pre-training heads, Sequence aggregation module, User ID adapter
Pre-training heads Reconstruct masked tokens and predict next-action type/value by modality. Transformer foundation model, Hierarchical ID classifier
Hierarchical ID classifier Reduces massive categorical ID prediction complexity through grouped classification. Pre-training heads
User ID adapter Stores learned long-term user embeddings. Transformer foundation model, Downstream personalization models
Sequence aggregation module Condenses recent interaction sequences into short-term intent embeddings. Transformer foundation model, Downstream personalization models
Ray CPU workers Run distributed preprocessing and tokenization for training and inference. Key-value tokenizer, Ray GPU workers
Ray GPU workers Run distributed neural training and batch embedding inference. Ray CPU workers, Transformer foundation model, Downstream personalization models
Downstream personalization models Consume foundation embeddings for ads, recommendations, fraud, churn, and other tasks. User ID adapter, Sequence aggregation module, Ray GPU workers

Data flow

Grab tokenizes user attributes and recent events as key-value pairs, sends each token through a modality adapter, aligns all vectors into a shared representation space, and feeds them into the transformer. Pre-training reconstructs masked tokens and predicts next actions, while Ray separates CPU tokenization from GPU model computation. The resulting long-term and short-term embeddings are served to ad optimization, recommendations, fraud, churn, and other downstream models.

3 supporting quotes
“The tokenization strategy defines a universal token structure as key-value pairs.”summary, stated
“After each token passes through its corresponding modality adapter, an alignment layer projects all resulting vectors into the same representation space.”summary, stated
“the same efficient architecture generates fresh embeddings for millions of users using Ray Data for distributed batch inference.”summary, stated

Why this architecture

Grab chose a foundation-model architecture because a superapp creates cross-vertical behavior that task-specific models miss. The shared key-value token format and modality adapters let one transformer learn from unordered profile data and ordered clickstreams, while dual embeddings give downstream systems both persistent preference and current-session intent.

“Traditional siloed models would treat the ride and food search as independent events, missing the valuable signal that the dropoff location provides context for subsequent search behavior.”summary, stated
“This dual-embedding approach provides downstream models with both stability (long-term patterns unlikely to change rapidly) and responsiveness (short-term context reflecting current sessions)”summary, stated

Models used: Custom transformer foundation model · Masked language modeling objective · Next-action prediction objective · Pre-trained language models for text adapters · Ray Data distributed inference

Scale

Alternatives considered (roads not taken)

Continue manually engineered task-specific features

Rejected because: Siloed features required substantial effort and missed cross-vertical sequential behavior.

“traditional approaches to personalization—which relied on hundreds to thousands of manually engineered features specific to individual tasks—were insufficient”summary, stated

Semi-supervised training on one downstream objective

Rejected because: Single-objective training would bias embeddings toward one vertical and limit utility elsewhere.

“Training solely on one objective would create biased embeddings limiting utility for other tasks.”summary, stated

Flat ID prediction over all entities

Rejected because: Hundreds of millions of IDs would make output heads computationally intractable.

“making the model computationally intractable.”summary, stated
“The solution employs hierarchical classification, a technique particularly relevant for LLMOps at scale.”summary, stated

Bundle CPU preprocessing with GPU computation

Rejected because: Bundling would leave expensive GPUs idle during tokenization.

“A naive approach bundling these tasks would force expensive GPU resources to sit idle during CPU data preparation.”summary, stated

Patterns

model-distillation (model architecture)

Grab turns diverse superapp behavior into reusable embeddings that distill long-term and short-term user signals for many downstream models.

“the model generates embeddings that serve as high-quality input features for numerous downstream recommender models and prediction tasks.”summary, stated
“The foundation model represents a shift toward "embeddings as a product," a stable, reliable, and powerful basis for any AI-driven application at Grab.”summary, stated

batch-offline-processing (infrastructure)

Grab uses Ray distributed batch training and inference pipelines to process terabytes of data and regenerate embeddings for millions of users.

“Grab built upon the Ray framework, an open-source standard for scalable computing, enabling management of both training and inference within a unified ecosystem.”summary, stated
“For daily inference, the same efficient architecture generates fresh embeddings for millions of users using Ray Data for distributed batch inference.”summary, stated

context-engineering (representation)

The model context is engineered through key-value tokenization, custom positional embeddings, attention masks, and modality adapters that preserve tabular versus sequential semantics.

“To preserve the distinct nature of each data source while using this common token format, the model employs custom positional embeddings and attention masks.”summary, stated
“This design allows the model to benefit from both structures simultaneously without imposing artificial ordering on tabular features or losing sequential information from clickstream data.”summary, stated

latency-optimization (infrastructure)

Ray decouples CPU preprocessing from GPU computation to keep expensive accelerators fed and reduce cost/time.

“By using Ray's ability to manage heterogeneous hardware, the team created distinct, independently scalable pools of CPU and GPU workers.”summary, stated
“This separation achieves near-optimal GPU utilization, dramatically reducing costs and accelerating processing times.”summary, stated

data-quality-loop (data operations)

Grab identifies ongoing corpus unification and enrichment as necessary for reliable foundation-model behavior across downstream applications.

“The case study mentions ongoing work to "unify and enrich datasets" and create "a comprehensive, low-noise view of user behavior," suggesting data quality challenges remain active concerns.”summary, stated

Tradeoffs

Unsupervised ecosystem-wide pre-training

Chose Masked reconstruction and next-action prediction over all Grab verticals over Semi-supervised training on one downstream objective.

Rationale: The foundation model needed general embeddings useful across heterogeneous tasks.

“The pre-training combines masked language modeling (reconstructing randomly masked tokens) with next-action prediction.”summary, stated
“This approach directly addresses a key LLMOps challenge: building foundation models that generalize across multiple downstream applications rather than optimizing narrowly for one metric.”summary, stated

Dual long-term and short-term embeddings

Chose Serve both stable persona embeddings and recent-intent sequence embeddings over A single user representation.

Rationale: Different downstream tasks need different balances between historical behavior and current intent.

“The long-term embedding captures persistent habits, established preferences, and overall user persona. This representation is the learned vector for a given user_id stored within the specialized User ID adapter.”summary, stated
“The short-term embedding captures immediate context and current mission. To generate this, a sequence of the user's most recent interactions processes through the model's adapters and main transformer block.”summary, stated

Modular adapters

Chose Specialized encoders per modality plus an alignment layer over One shared encoder for all text, IDs, numbers, and locations.

Rationale: Different modalities needed different encoders while still contributing to one shared representation space.

“each adapter acts as a specialized "expert" encoder for a specific modality, transforming its unique data format into a unified high-dimensional vector space.”summary, stated
“the maintainability burden of managing modality-specific adapters, alignment layers, and reconstruction heads across ongoing model iterations should not be underestimated.”summary, stated

Gotchas (what bit them)

Flat categorical ID reconstruction becomes computationally infeasible at marketplace scale.

Root cause: Hundreds of millions of user, merchant, and driver IDs imply enormous prediction heads.

Resolution: Grab used hierarchical classification to predict meaningful groups first, then smaller subgroups.

“a vocabulary of 100 million IDs with 768-dimension embeddings would create a prediction head with nearly 80 billion parameters”summary, stated
“Instead of predicting from a single flat list of millions of IDs, the model first classifies IDs into smaller meaningful groups based on attributes”summary, stated

Task-specific objectives would bias a superapp foundation model.

Root cause: Grab's downstream tasks span food, transport, financial services, ads, fraud, and churn.

Resolution: The team used unsupervised pre-training across the full ecosystem.

“Training solely on one objective would create biased embeddings limiting utility for other tasks. Furthermore, focusing on a single vertical like Food would ignore rich signals from user activity in Transport, GrabMart, and Financial Services, preventing holistic user understanding.”summary, stated
“unsupervised pre-training was the most effective path forward, allowing them to leverage the full breadth of available data”summary, stated

CPU preprocessing can starve GPU training and inference workers.

Root cause: Complex multimodal tokenization is CPU-intensive while transformer computation is GPU-intensive.

Resolution: Grab separated CPU and GPU worker pools under Ray.

“The core architectural principle involves decoupling CPU-intensive preprocessing from GPU-intensive neural network computation.”summary, stated
“A naive approach bundling these tasks would force expensive GPU resources to sit idle during CPU data preparation.”summary, stated

A shared embedding product can propagate data-quality defects to many teams.

Root cause: Downstream applications reuse the same foundation embeddings.

Resolution: Grab treats dataset unification and low-noise behavior views as ongoing operational work.

“data quality issues in foundation model training can propagate to all downstream applications, making this a critical operational consideration.”summary, stated

Evaluation

The case study reports architectural reasoning and downstream adoption but discloses limited quantitative lift metrics, leaving cost-benefit and performance comparisons as open evaluation gaps.

Metrics: Terabytes of data processed · Millions of daily embeddings · Hundreds of millions of categorical IDs · No disclosed CTR/conversion/fraud lift metrics

“Specific metrics comparing the foundation model embeddings against traditional manually engineered features across downstream tasks would strengthen claims of superior performance.”summary, stated
“The case study mentions that key areas "already heavily benefit" from the foundation model but doesn't provide concrete numbers for lift in metrics like click-through rates, conversion rates, or fraud detection accuracy.”summary, stated

Outcomes

The model serves a superapp spanning more than 800 cities, terabytes of multimodal behavior data, millions of daily embeddings, and categorical vocabularies with hundreds of millions of entities.

3 supporting quotes
“Initial embeddings for users, driver-partners, and merchant-partners have already proven value across multiple downstream applications including ad optimization, dual app prediction, fraud detection, and churn probability estimation.”summary, stated
“teams build new models on top of high-quality pre-trained embeddings rather than starting from scratch, significantly reducing development time and improving performance.”summary, stated
“the true test of success will be sustained performance improvements across downstream applications, operational reliability at scale, and cost-effectiveness compared to alternative approaches”summary, stated