A two-stage architecture for scaling recommendation models - Conquense Dev
ENES

← Back to the news

architecture

A two-stage architecture for scaling recommendation models

Meta presents an architecture that separates heavy user modeling from online ranking to expand advertising-system capacity without proportionally increasing serving costs.

Recommendation systems face a familiar tension: they need increasingly expressive models to capture user context, but they must respond with latency and costs compatible with billions of interactions. In a post on Engineering at Meta, a company team describes a multi-stage architecture for its advertising ranking platform.

The main idea is to separate two jobs that often compete for the same resources. A user model can process long sequences of actions and learn detailed representations of interests and preferences. Online ranking, by contrast, must evaluate candidates quickly during every request. Meta places the heavier modeling work in an offline stage and keeps lighter online models in production, where they consume those representations.

This separation changes how the system can scale. Increasing depth or sequence length in the offline model does not necessarily require increasing the cost of every online decision by the same amount. The architecture allows the team to experiment with more complexity where compute time is more flexible, while preserving predictable limits in the service constrained by strict latency requirements.

The post also describes dense tokenization and target-aware attention to learn feature interactions directly from data. The technical significance is a reduced dependence on manually designed sparse combinations. In recommendation problems, useful signals often appear in the order and timing of actions, not only in static attributes. A model that preserves that temporal structure may better represent changes in intent or recent preferences.

The architecture does not remove trade-offs. Offline representations can become stale and require an appropriate refresh policy. Separating training and serving also introduces contracts between stages: both sides must agree on schemas, versions, availability, and behavior when signals are missing. Quality improvements must be measured alongside memory, bandwidth, latency, refresh cost, and stability under traffic changes.

For teams building search, feeds, or personalization systems, the lesson is broadly applicable. It is not always necessary to choose between a powerful model and a fast service. An explicit division between deep understanding and low-latency decisions can create a third option, provided that the interface between both stages is stable and observability is strong enough to detect degradation.

Meta’s work matters because it treats scaling as a property of the complete architecture, not merely as a matter of adding parameters. In production machine-learning systems, final performance depends as much on where a signal is computed as on the quality of the model that generates it.

Transparency: this text was generated by AI and reviewed before publication.