Tae Hyun Kim (Lowell)

ESCM² (Entire Space Counterfactual Multi-Task Model)

정의

ESCM²는 ESMM의 두 가지 이론적 한계 — **Inherent Estimation Bias (IEB)**와 Potential Independence Priority (PIP) — 를 해결하려고, Inverse Propensity Score (IPS)Doubly Robust Estimator 기반의 반사실 위험 정칙화 항(counterfactual risk regularizer)을 ESMM에 통합한 모델이다.

최종 학습 목적함수:

LESCM2=LCTREmpirical Risk+λcLCVRCounterfactual Risk+λgLCTCVRGlobal Risk\mathcal{L}_{\text{ESCM}^2} = \underbrace{\mathcal{L}_{\text{CTR}}}_{\text{Empirical Risk}} + \lambda_c \underbrace{\mathcal{L}_{\text{CVR}}}_{\text{Counterfactual Risk}} + \lambda_g \underbrace{\mathcal{L}_{\text{CTCVR}}}_{\text{Global Risk}}

CVR의 estimand를 do-calculus로 다시 정의한다.

P(r=1do(o=1))P(r=1 \mid do(o=1))

이렇게 XOX \to O 의존성을 제거하면 선택편향(selection bias)과 PIP를 동시에 해결한다.

직관적 이해

ESMM의 두 가지 문제

IEB (Inherent Estimation Bias): ESMM은 R^=C^/O^\hat{R} = \hat{C}/\hat{O}로 CVR을 추정한다. 그런데 Jensen 부등식에서 E[C^/O^]E[C^]/E[O^]E[\hat{C}/\hat{O}] \geq E[\hat{C}]/E[\hat{O}]이므로 추정값이 항상 과대추정된다.

PIP (Potential Independence Priority): ESMM의 causal graph는 click→conversion 인과관계(ORO \to R)를 빠뜨린다. 그래서 CVR tower가 click 여부와 무관한 P(r=1)P(r=1)을 학습할 위험이 있다.

Causal Graph 비교

(a) ESMM              (b) Naive            (c) ESCM²
 X                     X                    X
 ↓                    ╱ ╲                     ╲
 O    R               O → R              do(O) → R
  ╲  ╱                     ╲                     ╲
   C                        C                     C

O→R 누락!           X→O: selection bias    do로 X→O 제거 +
                                           O→R 유지

ESCM²는 do-calculus로 Figure 3(c)의 구조를 달성한다. click=0인 샘플에 대해 “만약 클릭했다면 전환했을 확률”이라는 반사실(counterfactual) 질문에 답한다.

두 가지 변형

ESCM²-IPS

CTR tower 출력을 성향점수(propensity score)로 써서 CVR loss를 역확률로 가중한다.

RIPS=1D(u,i)Dou,iδ(ru,i,r^u,i)o^u,i\mathcal{R}_{\text{IPS}} = \frac{1}{|\mathcal{D}|} \sum_{(u,i) \in \mathcal{D}} \frac{o_{u,i} \cdot \delta(r_{u,i}, \hat{r}_{u,i})}{\hat{o}_{u,i}}
  • CTR이 정확하면 (o^=o\hat{o} = o) 불편(unbiased) CVR 추정을 보장한다 (Theorem 2).
  • 단점은 high variance다. CTR이 낮으면 weight가 폭발한다.

ESCM²-DR

IPS에 imputation tower를 더해 variance를 줄인다.

RDR=1D(u,i)D[δ^u,i+ou,i(δu,iδ^u,i)o^u,i]\mathcal{R}_{\text{DR}} = \frac{1}{|\mathcal{D}|} \sum_{(u,i) \in \mathcal{D}} \left[ \hat{\delta}_{u,i} + \frac{o_{u,i} \cdot (\delta_{u,i} - \hat{\delta}_{u,i})}{\hat{o}_{u,i}} \right]
  • δ^u,i\hat{\delta}_{u,i}는 imputation tower가 예측한 CVR error다.
  • 이중 강건성(double robustness): imputation과 propensity 중 하나만 정확해도 불편하다.
  • imputation tower는 추가 imputation loss RDRimp\mathcal{R}_{\text{DR}}^{\text{imp}}로 학습한다.

아키텍처

       Shared Embedding Lookup Table
       ┌──────┬──────────┬──────────┐
       ↓      ↓          ↓          ↓
   CTR Tower  Imp Tower  CVR Tower
       ↓      ↓          ↓
      pCTR   δ̂ (imp)   pCVR ──── × ──── pCTR
       │      │          │                  ↓
       │      │          │               pCTCVR
       ↓      ↓          ↓                  ↓
   L_CTR   L_CVR(IPS/DR)              L_CTCVR
   ───────────── + ─────────── + ──────────
              L_ESCM² (최종)

구현 팁

  1. Propensity clipping: o^u,i\hat{o}_{u,i}가 매우 작으면 weight가 폭발하므로, threshold 0.1로 clipping해 막는다.
  2. Gradient truncation: LCVR\mathcal{L}_{\text{CVR}}에서 CTR tower(propensity)로 흐르는 gradient를 차단해 CTR 학습을 보호한다.
  3. λc\lambda_c 설정: 보통 0.1~1.0 범위로 둔다. 너무 크면 CTR 학습을 방해해 CTCVR 성능이 떨어진다.
  4. λg\lambda_g 설정: 1.0 이상을 권장한다. CVR과 CTCVR 모두에 긍정적이다.
  5. DR 안정화: alternative training으로 imputation tower와 CVR tower를 번갈아 학습한다.

이론적 보장

정리내용의미
Theorem 1BiasESMM>0\text{Bias}^{\text{ESMM}} > 0ESMM은 구조적으로 CVR 과대추정
Theorem 2RIPS=P\mathcal{R}_{\text{IPS}} = \mathcal{P} (CTR 정확 시)IPS regularizer → unbiased CVR (IEB 해결)
Theorem 3r^IPSP(rdo(o=1))\hat{r}^{\text{IPS}} \to P(r \mid do(o=1))IPS → counterfactual CVR 수렴 (PIP 해결)

관련 개념

  • ESMM — ESCM²가 개선하는 기반 모델
  • Multi-Task Learning — 학습 패러다임
  • Propensity Score — CTR을 propensity로 활용
  • Doubly Robust Estimator — DR regularizer의 이론적 기반
  • Counterfactual Reasoning — do-calculus로 CVR estimand 재정의
  • Selection Bias — ESCM²가 해결하는 핵심 문제
  • IPW — IPS regularizer의 기반 방법

참고 논문

  • wangESCM2^2EntireSpace2022 — ESCM² 원논문 (SIGIR 2022)
  • maEntireSpaceMultiTask2018 — ESMM 원논문 (SIGIR 2018)

연결 그래프