【推荐】Twitter推荐算法架构

news/2024/5/19 22:36:55 标签: twitter, 推荐算法, 深度学习, 开源项目

note

文章目录

  • note
  • 一、推特开源推荐算法
  • 二、Twitter Recommendation Algorithm
    • 2.1 召回模型
    • 2.2 排序模型
  • 三、基础建设
  • Reference

一、推特开源推荐算法

项目地址:https://github.com/twitter/the-algorithm
内容:从数据获取,到特征加工、召回再到粗排、精排,到最后的混合出结果整个链路。推特更关注用户以及推特之间组成的数据网络图。会涉及一些图特征和图算法。
在这里插入图片描述
项目亮点:

  • 多模态:该项目支持多种类型的数据,包括文本、图片、视频等。
  • 实时性:该项目使用实时流处理技术,能够及时处理大量的用户行为数据,并实时地生成推荐结果。
  • 可扩展性:该项目使用分布式计算技术,可以方便地进行水平扩展和增加计算资源。
  • 精度高:该项目采用了多种推荐算法,包括内容过滤、协同过滤、基于图的推荐等,能够提供高质量的个性化推荐服务

二、Twitter Recommendation Algorithm

项目中包括的组件模块(含有大部分的Bazel BUILD files):

TypeComponentDescription
FeatureSimClustersCommunity detection and sparse embeddings into those communities.
TwHINDense knowledge graph embeddings for Users and Tweets.
trust-and-safety-modelsModels for detecting NSFW or abusive content.
real-graphModel to predict likelihood of a Twitter User interacting with another User.
tweepcredPage-Rank algorithm for calculating Twitter User reputation.
recos-injectorStreaming event processor for building input streams for GraphJet based services.
graph-feature-serviceServes graph features for a directed pair of Users (e.g. how many of User A’s following liked Tweets from User B).
Candidate Sourcesearch-indexFind and rank In-Network Tweets. ~50% of Tweets come from this candidate source.
cr-mixerCoordination layer for fetching Out-of-Network tweet candidates from underlying compute services.
user-tweet-entity-graph (UTEG)Maintains an in memory User to Tweet interaction graph, and finds candidates based on traversals of this graph. This is built on the GraphJet framework. Several other GraphJet based features and candidate sources are located here
follow-recommendation-service (FRS)Provides Users with recommendations for accounts to follow, and Tweets from those accounts.
Rankinglight-rankerLight ranker model used by search index (Earlybird) to rank Tweets.
heavy-rankerNeural network for ranking candidate tweets. One of the main signals used to select timeline Tweets post candidate sourcing.
Tweet mixing & filteringhome-mixerMain service used to construct and serve the Home Timeline. Built on product-mixer
visibility-filtersResponsible for filtering Twitter content to support legal compliance, improve product quality, increase user trust, protect revenue through the use of hard-filtering, visible product treatments, and coarse-grained downranking.
timelinerankerLegacy service which provides relevance-scored tweets from the Earlybird Search Index and UTEG service.
Software frameworknaviHigh performance, machine learning model serving written in Rust.
product-mixerSoftware framework for building feeds of content.
twmlLegacy machine learning framework built on TensorFlow v1.

2.1 召回模型

Twitter有很多召回数据源,为用户召回最新、最感兴趣的相关推文。

  • 输入:推文候选池大小,hundreds of millions 亿万级别。
  • 输出:两类召回通道:你关注的用户圈(in-network)、你未关注的用户圈(out-of-network),整体上,二者比例是55开。
    • in-Network召回:使用自研Earlybird搜索引擎,导致是倒排索引,要过一个Light ranker海选粗排模型进行该召回路的截断。
    • out-of-Network召回:SimClusters、TwHIN等表征学习

在这里插入图片描述

2.2 排序模型

在这里插入图片描述

  • 粗排:light ranker的特征pipeline如上图,LR模型
    • 粗排模型基于推特本身以及用户时间线构建特征,会对用户收到推特之后的多个反应做出预测。也就是说这是一个多目标模型,会对用户收到推特之后是否会点击、点赞、评论等做出预测。最后再将这些多个目标之间的预测结果根据不同的权重融合得到一个得分,最后根据这个得分进行排序。
  • 精排:heavy rank使用新浪以前的masknet模型
  • 重排:规则导向有作者多样性、In-Network推文和Out-of-Network推文的控比、屏蔽的推文作者等

三、基础建设

  • 模型serving服务:Navi,High performance, machine learning model serving written in Rust.
  • Feeds信息流推荐框架:Product-mixer,Software framework for building feeds of content.
  • 机器学习训练框架:twml,基于TF-1,目前用于训练粗排Earlybird light ranker

Reference

[1] https://github.com/twitter/the-algorithm
[2] A new era of transparency for Twitter
[3] KDD 2020:SimClusters: Community-Based Representations for Heterogeneous Recommendations at Twitter
[4] KDD 2022:TwHIN: Embedding the Twitter Heterogeneous Information Network for Personalized Recommendation


http://www.niftyadmin.cn/n/196478.html

相关文章

Ruby正则表达式

Ruby正则表达式 | 菜鸟教程 正则在线工具 正则表达式库 正则表达式 正则表达式,又称规则表达式。(英语:Regular Expression,在代码中常简写为regex、regexp或RE),计算机科学的一个概念。正则表达式通常被…

SSL证书分类和SSL免费证书申请和证书监控

SSL 证书分类 简称全称中文意思DVDomain validated域名认证OVOrganization validated组织认证EVExtended validation扩展认证 SSL免费证书申请 服务商网址阿里云https://www.aliyun.com百度云https://cloud.baidu.com/product/ssl.html腾讯云https://buy.cloud.tencent.com/s…

Springboot自定义配置类

文章目录1. 简介2. Value方式获取参数3. 自定义配置类3.1 定义一个配置类3.2 yml配置文件定义属性3.3 properties配置文件定义属性3.4 使用配置类4. 配置文件编码问题5. 总结1. 简介 在开发过程中需要将一些可配置的东西抽出来放到配置文件中统一管理,即方便开发也…

wxml模板,wxss模版,全局配置,页面配置,网络数据请求

WXML 模板语法 1、数据绑定 1.1、数据绑定的基本原则 ① 在 data 中定义数据② 在 WXML 中使用数据 1.2、在 data 中定义页面的数据 在页面对应的 .js 文件中,把数据定义到 data 对象中即可: Page({data: {//字符串数据info:init data}, });1.3、M…

Linux信号基本概念

Linux信号入门概述阻塞信号集与未决信号集流程概述信号四要素概述查看常规信号一览总结概述 Linux 信号是进程之间进行通信和处理异步事件的一种方式。信号由内核向进程发送,用于通知进程某种事件已经发生。本文将介绍 Linux 中的信号相关知识,包括阻塞…

java毕业生就业信息管理系统servlet程序

1.系统登录:系统登录是用户访问系统的路口,设计了系统登录界面,包括用户名、密码和验证码,然后对登录进来的用户判断身份信息,判断是管理员用户还是普通用户。 2.系统用户管理:不管是…

【读书笔记-MIT决策算法】1.简介

目录 1.1 决策(Decision Making) 1.2 应用 1.2.1 飞行器防撞 1.2.2 自动驾驶 1.2.3 乳腺癌筛查 1.2.4 金融消费与投资组合配置 1.2.5 分布式野火监测 1.2.6 火星科学探索 1.3 方法 1.3.1 显式编程 1.3.2 监督学习 1.3.3 优化理论 1.3.4 规划…

HTTP的那些事儿

超文本传输协议(Hyper Text Transfer Protocol,HTTP),它是在计算机世界中的两个点之间传递文本,图片,多媒体等超文本文件的协议。HTTP处在数据链路层,网络层,传输层,应用…