SYS::RANKER
Attention Mask Visualization
Understand why X's recommendation model doesn't let tweets "see" each other during ranking. Isolation ensures fairness and performance.
Candidate Isolation
ACTIVE MODULE::PHOENIX
During the Phoenix ranking stage, the Transformer uses a special Attention Mask.
This ensures that each tweet's score is determined solely by its relationship with the User Context, unaffected by other tweets in the current batch.
| QUERY \ KEY | User | History | Tweet A | Tweet B | Tweet C |
|---|---|---|---|---|---|
| User | ✓ | ✓ | ✗ | ✗ | ✗ |
| History | ✓ | ✓ | ✗ | ✗ | ✗ |
| Tweet A | ✓ | ✓ | ✓ | ✗ | ✗ |
| Tweet B | ✓ | ✓ | ✗ | ✓ | ✗ |
| Tweet C | ✓ | ✓ | ✗ | ✗ | ✓ |
Allowed
The model can learn the relationship between these entities.
Blocked
The model is forbidden from attending to these entities.
Engineering Logic
If Tweet A's score changed depending on the presence of Tweet B, the ranking would be unpredictable and impossible to cache efficiently. Isolation ensures that your content's merit is judged independently of its competitors in the same batch.