Sub topic 6
Turning several predictions into one ranking score
Prerequisites and scope
This chapter assumes you have read the earlier chapters on the feed pipeline and on engagement prediction. You should know that the feed builds a set of candidate posts for each viewer. You should also know that models estimate the chance of actions such as a click, a reaction, a comment, or a share.
Here the question is narrower. A model gives you several probabilities for one post. A feed needs one ordered list. How do the probabilities become an order?
LinkedIn has described its feed as a system with multiple stages and multiple predicted outcomes. It has not published the exact formula or weights used in production. This chapter therefore teaches the general technique, called multi-objective scoring, and uses a toy example. Nothing here reproduces LinkedIn's real numbers.
The problem: many predictions, one list
For each pair of viewer and post, a ranking model can estimate several things:
- The chance the viewer clicks to expand or open the post.
- The chance the viewer reacts.
- The chance the viewer comments.
- The chance the viewer shares or reposts.
- Possibly how long the viewer will spend with the post.
These numbers do not agree with each other. A post can have a high chance of a reaction and a low chance of a comment. Another can be the reverse. A list can only be sorted by one number, so the system must collapse the predictions into a single score per post.
A multi-objective score is one number built from several predicted outcomes. A objective here means one outcome the system wants to encourage, such as comments.
The simplest approach: a weighted sum
The most common way to combine predictions is a weighted sum. You multiply each predicted probability by a weight that says how much that outcome is worth, then add the results.
score(post) = w_click * P(click)
+ w_reaction * P(reaction)
+ w_comment * P(comment)
+ w_share * P(share)Three things follow from this form:
- A weight is a statement of value. A larger weight on comments means the system prefers posts that are likely to start conversations, even if they are less likely to get clicks.
- Probabilities are small, weights adjust their scale. A share is rare compared with a reaction. A modest probability multiplied by a large weight can still matter.
- Changing a weight changes the ranking without retraining the models. The models only predict. The weights decide what to do with the predictions. This separation lets a team tune the feed's goals without rebuilding its predictors.
A worked example
The following toy program scores two posts. The weights are invented for illustration.
# Illustrative toy model only. This is NOT LinkedIn's actual formula.
# It shows the general idea: predict several outcomes per post, then combine them.
weights = {"click": 1.0, "reaction": 0.5, "comment": 2.0, "share": 3.0}
posts = {
"post_a": {"click": 0.10, "reaction": 0.08, "comment": 0.01, "share": 0.005},
"post_b": {"click": 0.04, "reaction": 0.12, "comment": 0.03, "share": 0.002},
}
def score(predictions):
return sum(weights[action] * p for action, p in predictions.items())
ranked = sorted(posts, key=lambda name: score(posts[name]), reverse=True)
for name in ranked:
print(name, round(score(posts[name]), 4))Work through the numbers by hand.
post_a: 1.0 × 0.10 + 0.5 × 0.08 + 2.0 × 0.01 + 3.0 × 0.005 = 0.10 + 0.04 + 0.02 + 0.015 = 0.175.post_b: 1.0 × 0.04 + 0.5 × 0.12 + 2.0 × 0.03 + 3.0 × 0.002 = 0.04 + 0.06 + 0.06 + 0.006 = 0.166.
So post_a ranks first, even though post_b has a higher chance of a reaction and a comment. The click probability of post_a is large enough to win under these weights.
Now change the comment weight from 2.0 to 6.0. The score of post_a becomes 0.215, and the score of post_b becomes 0.226. The order flips. Nothing about either post changed. Only the system's idea of what is valuable changed.
Why not just optimize one thing?
Suppose the feed only maximized predicted clicks. It would favor posts with curiosity-driven openings, whatever their value. Viewers would click, feel little reward, and trust the feed less over time.
Suppose it only maximized comments. It would favor posts that provoke arguments or ask for replies, which many viewers find tiresome.
Mixing objectives is a way to balance short-term signals against longer-term ones. LinkedIn's public engineering write-ups describe the feed as aiming for relevance and professional value, not for a single metric. A weighted combination is one practical way to express that balance.
Edge cases and caveats
Predictions are not calibrated by default
A weighted sum only makes sense when the probabilities are on comparable scales. If one model tends to over-predict by a factor of two, its outcome gets twice the influence the weight intended. Teams therefore check calibration, meaning whether "10 percent" predictions come true about 10 percent of the time.
Weights are not necessarily linear or fixed
A weighted sum is the simplest form. Real systems may use other combinations, such as multiplying terms, applying caps, or using a learned model on top of the predictions. They may also set weights differently for different viewers or contexts. Treat the weighted sum as a teaching model, not a description of the production code.
Negative outcomes count too
Not every predicted outcome is good. A viewer might hide a post, report it, or unfollow its author. These outcomes can enter the score with negative weights, or they can act as separate filters. The next chapter covers quality and spam filtering. For now, note that a combined score can punish as well as reward.
A score is relative
The score matters only in comparison with other candidates for the same viewer at the same moment. A score of 0.17 has no meaning alone. A post can score high for one viewer and low for another, because the underlying predictions are personal.
The score is not the final feed
After scoring, the feed may still adjust the order. Blending can mix in other content types, and the system can avoid showing too many posts from one author in a row. So a higher score raises a post's chance of a good position, and it does not guarantee a fixed rank.
What you can and cannot conclude
Here is what the technique supports, and what it does not.
| Claim | Supported by the idea of multi-objective scoring? |
|---|---|
| The feed predicts more than one kind of outcome | Yes, this is the documented design |
| Comments always count more than reactions | No, exact weights are unpublished and may vary |
| You can raise your rank by asking for comments | No, this is a guess, and low-quality prompts may be filtered or ignored |
| A post that earns varied, genuine interactions from its likely audience tends to look good on several objectives | Yes, as a general principle |
| A fixed "magic formula" can be reverse engineered from your analytics | No, you only see outcomes, not predictions or weights |
The practical lesson is modest. You cannot see the weights, so you cannot target them. What you can do is write for the people most likely to value the post. Their genuine responses are what the predictions try to anticipate.
Seeing the effect in your own data
You can mimic the idea on your own posts, using your analytics. Raw counts mislead, because a post with more impressions gets more of everything. An engagement rate puts posts on the same basis.
# Simple routine for comparing your own posts.
posts = [
{"id": "p1", "impressions": 1200, "reactions": 30, "comments": 6, "reposts": 2},
{"id": "p2", "impressions": 800, "reactions": 40, "comments": 12, "reposts": 5},
]
for p in posts:
engagements = p["reactions"] + p["comments"] + p["reposts"]
rate = engagements / p["impressions"]
print(p["id"], f"{rate:.1%}")This prints p1 3.2% and p2 7.1%. The second post had fewer impressions but a higher rate of interaction. Notice that this treats all interactions as equal. A feed would not necessarily do that, and you are free to weigh them yourself if some outcomes matter more to your goals. For example, if you want conversations with prospective clients, you might count comments more heavily. That is your own scoring choice for your own purposes, and it does not claim to match LinkedIn's.
Summary
- Models predict several outcomes per viewer and post. A scoring step combines them into one number so posts can be sorted.
- A weighted sum is the simplest model. Weights express what the platform values and can be tuned without retraining predictors.
- Small changes to weights can flip a ranking, which is why no fixed trick is reliable.
- Scores are personal and relative, and later steps can still adjust the final order.
- For you, the useful response is to write for your real audience and to measure the outcomes you care about.
Exercise
Using the toy weights from this chapter (click 1.0, reaction 0.5, comment 2.0, share 3.0), a post has these predicted probabilities: click 0.06, reaction 0.10, comment 0.02, share 0.01. Compute its score. Then say what happens to the score if the share weight is doubled to 6.0.
Show answer
Score = 1.0 × 0.06 + 0.5 × 0.10 + 2.0 × 0.02 + 3.0 × 0.01 = 0.06 + 0.05 + 0.04 + 0.03 = 0.18. With the share weight at 6.0, the share term becomes 6.0 × 0.01 = 0.06, so the score is 0.06 + 0.05 + 0.04 + 0.06 = 0.21. Doubling one weight added 0.03, which equals the original share term.
Exercise
A colleague says, "My analytics show that my posts with the most comments always reach the most people, so the algorithm must weight comments highest." Give two reasons this conclusion is not safe.
Show answer
First, analytics show outcomes, not the model's predictions or weights, so you cannot read weights from them. Second, causality can run the other way: a post that is shown to more people gets more comments, so high reach can produce comments rather than the reverse. Other factors, such as the topic, the audience match, and the author's relationships with viewers, can also explain the pattern.