
Achieving a 4x improvement in training throughput and skyrocketing booking conversions with a clever offline-online hybrid serving architecture.
This article details how Airbnb bypassed the limits of handcrafted feature aggregation by training a robust guest sequence model using Transformers. It showcases practical optimization techniques like search batching and decoupled inference that deliver outstanding precision without inflating infrastructure serving costs.
Recommended for ML developers working with massive, sparse interaction logs under tight latency budgets; decoupling long-term context extraction into batch pipelines is a battle-tested pattern.
Airbnb's search ranking heavily relied on manual aggregated features, which became hard to scale and failed to capture the deep contextual nuances of the guest journey. Also, 97.8% of historical guest sequences are noisy listing views while target booking signals are extremely sparse, leading to high cost and poor expressiveness in sequence models.
They designed a Transformer-based sequence model (JourneyFormer) that split the guest sequence into a long-term sequence (7 years, capped at 80 events) and a short-term sequence (21 days, capped at 200 events) using a unified embedding table. They introduced 'batching of searches' to process cumulative sequences in a single causal encoder pass and decoupled inference, moving heavy encoder runs to offline daily batch jobs while utilizing online scoring for real-time ranking.
The combined system achieved a +3.78% total offline NDCG improvement (+0.44% long-term, +1.04% short-term, and +2.3% setwise ranker). Online A/B tests confirmed significant business success with +0.55% uncanceled bookers, +0.82% uncanceled nights, and +5.04% email clicks when using the same general-purpose embeddings.
Trade-off
To keep latency low, the multi-layer sequence encoder runs as a daily offline batch, delaying immediate intra-day guest event updates in the long-term representation. Capping sequences to 80 and 200 events also truncates highly active guest histories, losing about 2% of the longest user sequences.
An optimization technique utilizing causal masks to pass an entire chronological event series through the encoder once, routing intermediate states to their respective search timestamps instead of running redundant forward passes.
A learning-to-rank method that scores multiple candidate items together as a set to evaluate their relative differences, rather than scoring each candidate pointwise and independently.
An architectural split where the resource-heavy sequence encoder runs in scheduled offline batches to store user embeddings, and real-time online servers retrieve these cached embeddings for quick rank calculations.









