PIE 实验增量预测多触点归因 - Amazon MTA 框架落地
Skill-PIE-Experimental-MTA · 13-广告分析
1. 解决的问题
Momcozy / Graco 等大牌同投 Google Search + Facebook DPA + TikTok Shop
2. 核心算法逻辑
广告归因的根本悖论:精度 vs 可信度。纯 RCT 实验(停投对照)可以给出无偏的渠道因果增量,但只能看总盘,无法下钻到每一条 Campaign 甚至每一次点击;纯 ML 多触点归因(Shapley / Attention)能细化到触点级别,但平台总是把广告优先投给"本来就要买"的高意图用户,模型捡到的全是"选择偏差",转化贡献被系统性高估。
3. 业务应用场景
- 业务问题:Momcozy / Graco 等大牌同投 Google Search + Facebook DPA + TikTok Shop。投手根据 Last-Click 数据削减 Facebook/TikTok 预算,老板看不到真实因果增量,高管层(要 RCT)与执行层(要触点)两套数据永远对不上账,每季度预算分配争论消耗 3-5 天。 - 数据要求: - RCT 数据:三渠道分别跑 4 周 Geo-holdout(2500+ 实验单元/渠道) - 触点数据:用户旅程记录(journey_id、channel、timestamp、converted),日均 5000+ 条转化路径 - 预
- 业务问题:Apple ATT 导致 Facebook 归因窗口数据缺失率 60%+,ML 模型在数据断点处随机输出,归因报告失真度高达 40%,导致 Facebook 预算被错误削减 30%,实际 ROAS 反而下降。 - 数据要求: - RCT "总盘"锚点:即使触点数据残缺,RCT 仍能给出渠道增量真实值(宏观约束) - 残缺触点数据:允许 journey 内某些触点无 channel 标记(映射到 `unknown`) - 预期产出: - 即使 ML 因数据断点产生偏差,PIE 校准会将所有渠道的总量强制对齐 RCT 增量,防止灾难性偏离 - 输出"ATT 容忍归因报告":各渠道 P
4. 输入数据要求
请查看原始代码模板获取输入规格。
5. 输出结果
请查看原始代码模板获取输出规格。
6. 业务价值 / ROI
- 中型品牌月广告费 200 万 × ROAS 提升 10-15%(归因偏差修正)= 20-30 万/月 × 12 = 240-360 万/年
- 决策时间从 3-5 天 → 0.5 天,运营人力节省约 20 万/年
- 避免 Facebook 被错误削减 30% 导致的 ROAS 损失 = 100-200 万/年
- 易处:PIE 框架逻辑清晰,校准公式简洁,本 Skill 提供完整可运行代码
- 易处:RCT 实验设计(Geo-holdout)母婴品牌通常已有实践经验
- 难处:需要整合三平台触点日志(ETL 工程量),大品牌可能涉及数据合规与隐私
7. 代码模板
代码块数量:1 · 路径:未检测到
"""
PIE MTA 三步校准 - 最小可运行示例
依赖: numpy, pandas, scipy
"""
from paper2skills_code.advertising.amazon_mta_pie_2025.model import (
PIEAttributionPipeline,
simulate_rct_experiment,
TouchpointMLEstimator,
PIECalibrator,
)
CHANNELS = ['google_search', 'facebook', 'tiktok']
# ---- Step 1: 每季度跑一次 RCT 实验 ----
rct_results = simulate_rct_experiment(
channels=CHANNELS,
n_treated=5000,
n_control=5000,
true_incrementality={'google_search': 0.035, 'facebook': 0.018, 'tiktok': 0.012},
seed=42,
)
# 输出:{'google_search': {'rct_incrementality': 0.037, 'ci_lower': ..., 'ci_upper': ...}, ...}
# ---- Step 2: ML 对每日触点路径打分 ----
estimator = TouchpointMLEstimator(channels=CHANNELS, seed=42)
touchpoint_df = estimator.generate_touchpoint_data(n_journeys=10000)
scored_df = estimator.fit_predict(touchpoint_df)
# scored_df 新增列:ml_prob(无偏)、ml_prob_biased(有偏,待校准)
# ---- Step 3: PIE 校准 ----
calibrator = PIECalibrator()
report = calibrator.calibrate(scored_df, rct_results, CHANNELS)
print(report[['channel', 'ml_share_biased', 'rct_share', 'pie_share', 'scaling_factor']])
# channel ml_share_biased rct_share pie_share scaling_factor
# google_search 0.4138 0.5918 0.5918 1.4300
# facebook 0.3444 0.2722 0.2722 0.7901
# tiktok 0.2417 0.1361 0.1361 0.5630
# ---- 预算建议 ----
current_budget = {'google_search': 10000, 'facebook': 3000, 'tiktok': 2000}
rec = calibrator.budget_recommendation(current_budget, total_budget=15000)
print(rec[['channel', 'current_budget', 'pie_weight', 'recommended_budget', 'action']])
# channel current_budget pie_weight recommended_budget action
# google_search 10000 0.5917 8876.0 削减
# facebook 3000 0.2722 4083.0 增加
# tiktok 2000 0.1361 2041.0 持平
# ---- 一行快速调用(Pipeline 封装) ----
pipeline = PIEAttributionPipeline(channels=CHANNELS, n_journeys=10000, seed=42)
pipeline.run_rct_experiment()
pipeline.score_touchpoints()
final_report = pipeline.calibrate()
8. 论文来源
- 2508.08209