Mix-ranking is often the final stage in recommendation systems, where natural content (hereafter item) needs to be mixed with marketing content (hereafter ad) to generate the final list pushed to users.

From a Long Term Value (LTV) perspective, this is a trade-off process between LT and V. If ads appear too much, they’ll inevitably squeeze item count and positions, affecting user experience and retention (LT), but correspondingly ad revenue, or Average revenue per user (ARPU) will increase, and vice versa.

So industry practice is to set a user experience constraint and optimize ad efficiency as much as possible within that constraint, i.e., maximizing revenue. This can naturally be modeled as an optimization problem. LinkedIn’s 2020 paper does exactly this: Ads Allocation in Feed via Constrained Optimization.

Intuitively, mix-ranking has 2 sub-problems to solve: (1) How to calculate each item or ad’s value at each position: Since items and ads are ranked separately with different objectives, their final value scales are different. How to bring both scales to a comparable range is a question to discuss. (2) How to allocate to maximize final list value: After confirming item and ad values, how to insert item and ad positions to achieve entire list maximization.

LinkedIn’s paper above focuses on the second problem, with some content also involving the first problem. This article will first describe the paper’s modeling approach, then discuss ideas for calculating item and ad values, and other matters to note in mix-ranking.

阅读全文 »

随机性,如同带刺的玫瑰,危险而又迷人;随机性可能会给你带来生活中的惊喜,但也有可能会降临足以毁灭生活的灾难

在去年的年度小结提到,22 年最大的感悟,是生活存在非常多的随机性,正是这些随机性导致了无法预测和无人知晓的未来;1 月份在查资料过程中看到了塔勒布的“不确定性” 四部曲:《随机漫步的傻瓜》、《黑天鹅》、《反脆弱》和《非对称风险》,相比于笔者简单的感悟,这几本书花了很大功夫来描述随机性这件事情

如果单纯看随机性,很容易让我们陷入虚无主义中,因为没什么是确定的,或者说没什么是能够坚信的,因为随机性几乎主导了一切。幸运的是,书里给出了还给出了一些也许可供参考的方法论,虽然作者行文有时候较为晦涩,但总体还是值得一读的。本文主要是 《随机漫步的傻瓜》和《黑天鹅》两本书的一些笔记以及拓展,祝开卷有益。

阅读全文 »

2022 的最后一个月,在全国 “喜阳阳” 的氛围中度过了,写这篇文章时,恢复了差不多一周多,基本也没什么症状了。但回想下今年发生的各种事情,真的是可以用魔幻来形容,这个魔幻不仅仅指防疫政策的 180 度大转弯,更是发生在身上的各种事情,这些事情基本都可以总计为计划赶不上变化,或者说未来无人知晓

一直都有写年度总结的习惯,而这么魔幻的一年,更值得写篇文章纪念下,正好也是元旦放假,趁着这几天把过去一年发生的事情梳理了一下~

阅读全文 »

Current recommendation or ad systems basically do request-level estimation and optimization, which brings the problem of rising machine costs while maximizing effectiveness. Uneven traffic distribution makes this problem more severe. For Douyin or Meituan, there are often two traffic peaks in a day: lunch peak and evening peak, because these are times when food ordering and phone scrolling increase dramatically. Traffic drops significantly in other time periods, as shown below.

This means if we prepare enough machines to handle peak load, most machines are idling or have very low ROI in other time periods. Therefore, capacity expansion or degradation is often needed during peaks. Degradation generally means reducing request count by dropping traffic proportionally, but dropping traffic definitely hurts overall effectiveness. This has led to the research direction of computational resource optimization. Resource optimization is essentially a trade-off between effectiveness and machine cost, or how to reduce costs as losslessly as possible.

This article mainly introduces common approaches for computational resource optimization. I summarize them as drop, cache, and dynamic methods. If we decompose consumed computational resources, we can intuitively split into two parts: request count × computational cost per request. Therefore, we can optimize from these two aspects:

  • drop: Directly drop traffic, i.e., directly reduce “request count”
  • cache: Store previous estimation results in cache, so each estimation doesn’t need actual machine inference, i.e., reducing “computational cost per request”
  • dynamic: Dynamically control computational cost per request based on request value. This method also reduces “computational cost per request”. DCAF is representative of this approach.

The above methods are all traffic-level optimization. There are also methods for optimizing model inference latency, mainly in computational parallelization (hardware upgrade), model compression (quantization, distillation, structure adjustment, etc.). This article won’t expand on these.

阅读全文 »

当前的推荐或广告系统基本都是做到请求级别的预估和优化,在效果最大化的同时带来的问题是机器成本的上升;而流量分布的不均匀使得这个问题更为严峻,比如说对于抖音或美团,一天内流量往往有两个峰:午高峰和晚高峰,因为这两个时间点餐、刷手机的人数会陡增,而其他时间段流量会下降比较多,如下图所示

这意味着如果准备足以抗住高峰的机器,那在其他时间段大部分机器是空转的,或者说 roi 很低,因此往往在高峰的时候都需要扩容或降级。降级一般是指指降低请求数,按比例 drop 流量,但是 drop 流量对总体效果肯定是有损的,因此也衍生出了算力优化这个研究方向,算力优化本质上就是做效果和机器成本的 trade-off, 或者说如何尽可能无损地降本

本文主要介绍一些算力优化的常见手段,笔者将其总结为 drop、cache 和 dynamic 三类方法;而如果把消耗的算力拆解,可以直观拆成 2 部分:请求量 × 请求消耗的算力,因此可以从这两部分出发去优化算力

  • drop:直接把流量 drop 掉,即直接减少 “请求量”
  • cache:将之前的预估结果存到缓存中,每次预估不用经过实际机器的 inference,即减少了 “请求消耗的算力”
  • dynamic 则是根据请求的价值,动态控制每条请求消耗的算力,这个方法也是减少了 “请求消耗的算力”,DCAF 是这类方法的代表

上面的几个方法都是偏流量维度的优化,还有一些方法是对模型 inference 的 耗时进行优化的,主要方向是计算并行(硬件升级)、模型压缩(量化、蒸馏、结构调整等),本文就不详细展开了

阅读全文 »

管理,似乎是职场人无法回避的一个话题,因为随着组织的庞大,由于沟通、分工、人员参差不齐等问题,人效不可避免地下降,管理就是在缓解人员数量增加而带来的边际收益递减问题。而无论是管理者还是被管理者,笔者觉得都有必要去了解一下管理的相关内容,才能更好地扮演自己在职场中的角色

在这个话题下,有着不同的派系和理论,每一种看起来都讳莫如深;但是回到管理的本质,就是如何高效地组织一群人去完成一个任务,并且是长期可持续的

虽入职场时间不长,也有一些谈不上正式的管理经历,同时有幸从接触到的多位直属 leader 身上、从与一些前辈的谈话中,都获得了不少的启发和指导,自己也在这个问题上做了一些简单的调研,一直想对这部分做个总结,于是就有了这篇文章

文章主要是笔者的一些经历以及对管理的简单认知,样本必然是有偏的,未必在所有场景下都适用,文章可能会比较发散,祝开卷有益

阅读全文 »

Highlight Detection, literally high-light detection, is generally applied in images or videos. This article focuses on video scenarios, where the task is to find “highlight” segments from a long video. “Highlight” is a very broad definition, unlike CTR/CVR which have clear meanings. Highlight definition varies by scenario: for e-commerce livestream, highlight segments might be the time periods with highest GMV; for non-commerce livestream, highlights might be time periods with most viewers or gifts.

Highlight Detection has wide practical applications: video sites like iQIYI and Bilibili automatically play some segments when hovering over videos - these can be considered highlight segments. Mainstream livestream platforms provide replay tools with highlight segment candidates. Besides user-facing, advertisers/merchants also get similar products, such as Qianchuan, Kuaishou Jinniu platforms.

Highlight Detection is a research direction in academia, but academic research is limited to several manually annotated datasets and can’t be directly applied to production environments. The reason is the highlight definition varies by scenario, requiring different datasets. There are many Highlight Detection papers. This article mainly covers 2 papers closer to industry, focusing on highlight supervision signal definition, loss function design, and dataset acquisition.

阅读全文 »

Highlight Detection,直译过来就是高光检测,一般应用在图像或视频里,本文主要关注视频场景,其任务就是从一段长视频里找到某个 “高光” 的片段。这里的 “高光” 是一个非常宽泛的定义,不像 ctr / cvr 有明确的含义,不同场景下对 “高光” 的定义不一样:比如说对于带货直播,高光片段也许是 gmv 最高的时间段;对于非带货直播,高光的片段也许是观看人数或者刷礼物最多的时间段。

Highlight Detection 在实际的应用场景较为广泛:一些视频网站 (如爱奇艺、哔哩哔哩) 里鼠标停留在视频上时会自动播放一些片段,这些片段可认为是高光片段;主流的直播平台基本都提供了直播回放工具,其中往往也会提供高光片段的候选,除了提供给用户侧,广告主 / 商家侧也会提供类似产品,如巨量千川磁力金牛等平台的产品

Highlight Detection 在学术界也是一个研究方向,但是学界基本研究局限在几个人工标注的数据集上,一般无法直接应用到实际的生产环境中,原因就是上面说的,不同场景下对高光的定义不一样,需要的数据集也不一样。Highlight Detection 相关 paper 不少,本文主要讲 2 篇更贴近业界的 paper,可以重点关注高光的监督信号的定义,损失函数的设计以及数据集的获取

阅读全文 »

35 岁这个槛,似乎是悬在互联网人头上的达摩克利斯之剑,一直在各大媒体上被鼓吹放大,虽不明真假,但也让人不寒而栗;而持续了三年的疫情加上 2022 随之而来互联网裁员潮,王兴那句开玩笑似的 “2019 可能会是过去十年里最差的一年,但却是未来十年里最好的一年” 似乎一语成谶。

走在奔三的路上,凝望这前面那个迷雾般的 35 岁路口,焦虑就一直萦绕在心头;伴随着的是一系列的疑问:大厂为什么要裁员?所谓的 35 岁危机从何而来?只有互联网才有这个危机么?普通人只能眼巴巴地等待着 35 岁到来然后被裁掉?我们能做些什么?

当我最开始问出自己这一串问题时,焦虑中带着点绝望,因为前方的路虽然处于迷雾,却又似乎一眼能望到头;但是准备写这篇文章,心里又平静了很多,也许是经过这一个多月的调研和自我教育,看到了生活的可能性和随机性,接受了与焦虑为伴这个事实。本文算是写给自己的心理按摩,文章可能会有点发散,祝开卷有益。

阅读全文 »

从年初了解 有知有行 开始,断断续续看了不少上面的内容: 听完了里面投资第一课, E 大干货合集、投资知识体系里的文章也基本是已读状态,一直处于输入的状态; 感觉是时候该 connect the dots,形成一个更系统的框架融入自己的知识体系中, 于是便有了这个系列的文章

这个系列的文章绝大部分内容来自于有知有行,也会有一些笔者深究后调研的内容,且按照笔者的理解划分为:认知与心态、概念与常识、买与卖三大模块。妄图将投资这个大话题以及有知有行的编辑们整理的上百篇文章浓缩到这篇小小的笔记中,自然无法面面俱到,所以这篇文章还是会挑选笔者关注的一些内容,更详细的内容可参考有知有行以及本文里的相关引用。

本文是买与卖部分,也是实操部分;投资赚取的收益本质上就四个字:低买高卖,虽然只有四个字,但是如果要做好这个事情非常难,本文试图为这个没有标准答案的问题寻找一些可参考的解。

这个系列前面两部分的内容可参考

阅读全文 »
0%