Skip to main content

Overview

Instead of predicting a single “relevance” score, Phoenix predicts probabilities for multiple engagement actions simultaneously. This multi-task learning approach enables the model to capture nuanced user preferences and allows flexible weighting of different engagement types during ranking.

Motivation

A single relevance score cannot capture the complexity of user engagement:

Problem: Single Score

  • Treats all engagement equally
  • Cannot distinguish passive (click) from active (reply) engagement
  • No signal for negative actions (block, mute)
  • Inflexible weighting at serving time

Solution: Multi-action

  • Predicts probability for each action type
  • Captures full spectrum of user behavior
  • Includes negative signals to avoid bad content
  • Flexible combination at serving time

Action Types

Phoenix predicts probabilities for 14 distinct actions, spanning positive, passive, and negative engagement:
The exact number of actions is configurable via PhoenixModelConfig.num_actions. The model architecture adapts automatically.

Architecture

Output Layer

The model uses a single unembedding matrix to project candidate embeddings to action logits:
phoenix/recsys_model.py

Forward Pass

The ranking model produces action logits for each candidate:
phoenix/recsys_model.py
1

Transformer Encoding

Process user + history + candidates → [B, seq_len, 256]
2

Extract Candidates

Select only candidate positions → [B, num_candidates, 256]
3

Project to Actions

Apply unembedding matrix → [B, num_candidates, 14]
4

Return Logits

Output logits for each action type (converted to probabilities during training/inference)

Training

Multi-action prediction is trained as a multi-task binary classification problem:

Label Structure

Each training example has a multi-hot label vector:

Loss Function

Binary cross-entropy loss for each action:
Implicit Feedback: Some actions (like clicks) are implicit. If a user liked a post, they must have clicked it, but clicks may not be explicitly labeled.

Serving: Weighted Scoring

At serving time, action probabilities are combined using learned weights to produce a final ranking score:
Weight Tuning: Weights can be adjusted without retraining the model, enabling rapid experimentation and A/B testing of ranking strategies.

Benefits

1. Nuanced Understanding

The model learns subtle differences in user intent:

2. Flexible Optimization

Different product goals can use different weights:

3. Better Calibration

Predicting specific actions provides better-calibrated probabilities:
  • P(like) = 0.3 is interpretable: “30% chance user will like this”
  • Single relevance score lacks this interpretation

4. Multi-task Learning

Sharing representations across tasks improves generalization:
  • Rare actions (e.g., report) benefit from signal of common actions (e.g., click)
  • Model learns robust features that transfer across action types

Action Embeddings for History

In the input, historical actions are encoded using a learned projection:
phoenix/recsys_model.py
Signed Encoding: Actions are converted from to before projection. This allows the model to learn both positive and negative directions for each action type.

Example: Scoring a Candidate

Let’s trace how a candidate post is scored:

Comparison with Single-Score Models

Advantages:
  • Captures nuanced user behavior
  • Flexible weighting at serving time
  • Better calibration for individual actions
  • Negative signals to avoid bad content
  • Multi-task learning improves generalization
Trade-offs:
  • More complex to tune (multiple weights)
  • Higher inference cost (14 predictions vs 1)
  • Requires multi-hot labels in training data

Candidate Isolation

Learn how candidates are scored independently for consistent predictions

Design Decisions

Understand the rationale behind multi-action prediction and other key choices