#AI

Personalizing Airbnb search by learning from the guest journey

Personalizing Airbnb search by learning from the guest journey
01

Summary

Goodbye Manual Feature Engineering: How Airbnb Encodes 7-Year Guest Journeys with Transformers

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.

  • 01Dividing noisy user interaction sequences into a deep 7-year booking scope and a fresh 21-day browsing window
  • 02A 4x increase in training throughput by utilizing 'batching of searches' that runs the causal encoder only once per user session
  • 03Decoupling inference to maintain production latencies by running expensive encoder passes offline and retrieving pre-computed embeddings online
  • 04Combining rich sequence embeddings with a co-trained setwise ranker to capture relative differences across candidates
  • 05Validating the general applicability of learned embeddings by achieving a 5.04% click-through rate lift in promotional emails

RECOMMENDATION

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.

The Problem

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.

The Solution

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 Result

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.

03

Key Concepts

Concept · 01

Batching of Searches

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.

  • Significantly accelerated training throughput by approximately 4x by grouping search-heavy user behaviors into single passes.
Concept · 02

Setwise Ranking

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.

  • Co-trained along with the Transformer encoder to secure a further 2.3% enhancement in offline ranking quality.
Concept · 03

Decoupled Inference

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.

  • Served as the backbone strategy to process seven years of behavioral data while remaining within the limits of online query latency.