5D Library › 短视频完播率风险函数、推荐反馈环与自动化获客漏斗 · English
第一章 划走的动力学:威布尔风险函数
把划走写成风险函数
一条短视频开始播放后,观众随时可能划走。设观众停留的时间为随机变量 ,留存函数 是看到第 秒仍未离开的比例,风险函数 是已经看到第 秒的人在下一瞬间离开的速率。生存分析的标准做法是给 选一个分布 (Klein and Moeschberger 2003);威布尔分布 (Weibull 1951) 的留存与风险为
形状参数 时风险随时间递减:划走集中在开头,留下来的人越来越不容易离开。这正是短视频的典型形态。 时退化为风险恒定的指数分布。
推导
# Chapter 1. p01: Weibull swipe-away kinetics and completion rates.
# The time a viewer stays on a short video is modelled as Weibull with
# shape k and scale L (seconds): survival S(t) = exp(-(t / L)^k),
# hazard h(t) = (k / L) (t / L)^(k - 1). With k < 1 the hazard falls
# over time: most swipes come in the first seconds, and those who stay
# become ever less likely to leave. For a video of length D:
# completion rate = S(D);
# mean watch time = integral of S(t) from 0 to D (midpoint rule);
# watch fraction = mean watch time / D.
# An exponential model (k = 1) tuned to the same 5-second retention is
# shown for contrast. Last, k and L are recovered from two retention
# readings, since ln(-ln S) = k ln t - k ln L is a straight line.
import math
def surv(t, k, L):
return math.exp(-(t / L) ** k)
def haz(t, k, L):
return (k / L) * (t / L) ** (k - 1)
def mean_watch(D, k, L, n=4000):
return sum(surv((i + 0.5) * D / n, k, L) for i in range(n)) * D / n
if __name__ == "__main__":
k, L = 0.6, 20.0
s5 = surv(5, k, L)
Le = -5 / math.log(s5)
print(" Weibull k = {}, L = {} s".format(k, L))
print(" retention at 3 s {:.3f}, at 5 s {:.3f}".format(
surv(3, k, L), s5))
print(" hazard per second at 1, 5, 20 s: {:.3f}, {:.3f}, {:.3f}".format(
haz(1, k, L), haz(5, k, L), haz(20, k, L)))
print(" exponential with the same 5 s retention: scale {:.2f} s"
.format(Le))
print("\n length D completion mean watch watch frac exp compl")
for D in (7, 15, 30, 60, 90):
mw = mean_watch(D, k, L)
print(" {:6d} s {:12.3f} {:10.1f} s {:12.3f} {:11.3f}".format(
D, surv(D, k, L), mw, mw / D, surv(D, 1.0, Le)))
t1, t2 = 3.0, 15.0
a1 = math.log(-math.log(surv(t1, k, L)))
a2 = math.log(-math.log(surv(t2, k, L)))
kk = (a2 - a1) / (math.log(t2) - math.log(t1))
LL = math.exp(math.log(t1) - a1 / kk)
print("\n recovered from retention at 3 s and 15 s:")
print(" k = {:.3f}, L = {:.2f}".format(kk, LL))
print("\nReading: with a falling hazard, a 60 s video keeps far more")
print("viewers to the end than an exponential model with the same")
print("first five seconds predicts. Completion rate punishes length,")
print("but much less than intuition suggests; two retention points")
print("are enough to fit both parameters.")
# Weibull k = 0.6, L = 20.0 s
# retention at 3 s 0.726, at 5 s 0.647
# hazard per second at 1, 5, 20 s: 0.099, 0.052, 0.030
# exponential with the same 5 s retention: scale 11.49 s
#
# length D completion mean watch watch frac exp compl
# 7 s 0.587 5.1 s 0.723 0.544
# 15 s 0.431 9.1 s 0.605 0.271
# 30 s 0.279 14.3 s 0.476 0.073
# 60 s 0.145 20.3 s 0.339 0.005
# 90 s 0.085 23.7 s 0.263 0.000
#
# recovered from retention at 3 s and 15 s:
# k = 0.600, L = 20.00
#
# Reading: with a falling hazard, a 60 s video keeps far more
# viewers to the end than an exponential model with the same
# first five seconds predicts. Completion rate punishes length,
# but much less than intuition suggests; two retention points
# are enough to fit both parameters.取 、 秒,3 秒留存为 0.726,5 秒留存为 0.647;第 1 秒的风险是每秒 0.099,第 20 秒降到 0.030。15 秒视频的完播率为 0.431,60 秒为 0.145;若用 5 秒留存相同的指数模型(尺度 11.49 秒),60 秒的完播率只有 0.005。递减风险意味着:完播率确实惩罚时长,但远没有直觉那么严厉。平均观看时长随时长增长而增长,60 秒视频平均被看 20.3 秒,观看比例却降到 0.339。最后,程序只用 3 秒与 15 秒两个留存读数,就恢复了 与 :因为 对 是一条直线。
中途再钩值不值得
「每隔几秒就要再钩一次」是常见的剪辑建议。程序假设每次再钩使随后 2 秒的风险降低七成,但观众会学会、会厌倦:每分钟 次再钩使整条视频的风险提高 的比例。
推导
# Chapter 1. p02: Re-hook pulses: how often should a video re-hook?
# Baseline hazard: Weibull k = 0.6, L = 20 s, as in p01, for a 60 s
# video. A re-hook (a question, a cut, a promise of what comes next)
# placed every H seconds lowers the hazard by a factor (1 - r) for the
# w = 2 s that follow it. Re-hooks also wear: with n hooks per minute
# the whole hazard rises by a share c n^2 (viewers learn the trick and
# tire of it). With r = 0.7 and c = 0.002 the program integrates the
# cumulative hazard on a 0.01 s grid and reports completion and mean
# watch time.
import math
K, L, D = 0.6, 20.0, 60.0
def base(t):
return (K / L) * (t / L) ** (K - 1)
def run(H, r=0.7, w=2.0, c=0.002, dt=0.01):
per_min = 0.0 if H is None else 60.0 / H
lift = 1 + c * per_min ** 2
cum, watch, t = 0.0, 0.0, 0.0
while t < D:
tm = t + dt / 2
h = base(tm) * lift
if H is not None and tm >= H and (tm % H) < w:
h *= 1 - r
watch += math.exp(-cum - h * dt / 2) * dt
cum += h * dt
t += dt
return math.exp(-cum), watch
if __name__ == "__main__":
print(" hook every hooks/min completion mean watch (s)")
for H in (None, 30, 20, 15, 10, 6, 4, 3):
comp, mw = run(H)
print(" {:>10s} {:11.1f} {:12.3f} {:14.1f}".format(
"none" if H is None else "{} s".format(H),
0.0 if H is None else 60.0 / H, comp, mw))
print("\nReading: re-hooks after the opening buy only a little,")
print("because with a falling hazard most viewers who will swipe")
print("have already swiped before the first re-hook arrives. Hooks")
print("closer than every 10 s lose ground, and at every 4 s the")
print("video does worse than with none.")
print("The opening seconds, not the middle, decide completion.")
# hook every hooks/min completion mean watch (s)
# none 0.0 0.145 20.4
# 30 s 2.0 0.148 20.4
# 20 s 3.0 0.151 20.5
# 15 s 4.0 0.153 20.5
# 10 s 6.0 0.155 20.5
# 6 s 10.0 0.150 19.9
# 4 s 15.0 0.136 18.4
# 3 s 20.0 0.122 16.8
#
# Reading: re-hooks after the opening buy only a little,
# because with a falling hazard most viewers who will swipe
# have already swiped before the first re-hook arrives. Hooks
# closer than every 10 s lose ground, and at every 4 s the
# video does worse than with none.
# The opening seconds, not the middle, decide completion.没有再钩时完播率为 0.145;每 10 秒一次时达到最高的 0.155;更密就开始倒退,每 4 秒一次时为 0.136,已不如不钩。增益很小的原因与第一节相同:在递减风险下,会划走的人大多在第一次再钩出现之前就已经划走了。开头几秒,而不是中段,决定了完播率。
假说 · 尚未验证
可检验的推论。 若划走风险确实随时间递减,则同一账号不同视频的留存曲线在 对 的坐标上应近似为直线,斜率小于 1;改进开头的剪辑应显著提高 5 秒留存,而在 20 秒之后加入再钩只能带来很小的完播率变化。什么会证明这一推论错:若留存曲线的斜率接近或大于 1,或中段再钩带来与开头改进相当的提升,本章的模型就不适用于该账号。
小结
划走可以写成威布尔风险函数;短视频的风险随时间递减,所以开头决定一切,而完播率对时长的惩罚比指数模型温和得多。两个留存读数就能拟合两个参数。中途再钩的收益有限,太密则有害。
参考文献
Fan, Y. (2026). Short-Video Completion Hazards, Recommender Exploration Loops and Automated Acquisition Funnels: Weibull Swipe-Away Kinetics, Multi-Stage Pool Promotion Thresholds and Traffic-to-Cashflow Conversion Bounds [短视频完播率风险函数、推荐反馈环与自动化获客漏斗] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090213 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).