김창연, 고형권, 김동희, 김준호, 송헌, 이민경, 이재윤
DEAR: Deep Reinforcement Learning
for Online Advertising Impression in
Recommender Systems
강화학습을 이용한 온라인 광고 추천 시스템
Introduction
Online Advertising
Problem Statement
온라인 광고추천
물건을 살 만한 소비자에게 광고를 제공하여 

수익을 최대화하고자 함.

목표 지표
•CTR (Click Through Rate)

- 해당 광고 노출 대비 클릭율

•ROI (Return on Investment)

- 광고 투자 대비 순수익률
Online Advertising
Online Advertising
기존 방식
• Guaranteed Delivery (GD)
• 광고 계약자와 정해진 수량만큼 광고를 노출하는 것.

• Real-Time Bidding (RTB)
• 실시간으로 광고 구좌를 판매하고, 낙찰된 광고를 내보내는 것 (AdExchange)
Online Advertising
기존 방식의 한계점
• GD, MTB의 공통적인 문제점

1. o
ffl
ine/static optimization algorithms that treat each impression
independently

2. maximize the immediate revenue for each impression

• 이에 따라 광고 추천에 강화학습을 적용하려는 다양한 시도들이 등장.
기존 RL 모델들의 문제점
• 대부분의 연구들이 수익 극대화에만
초점을 두었음.

• 그러나, 광고가 많아지게 되면 user
experience에 부정적인 영향.
Online Advertising
Online Advertising
광고 추천 시 고려해야 할 사항들
추천 모델링 시 고려 사항
A. 현재 추천 리스트에 광고를 집어넣을 것인가 말 것인가?

B. 광고를 넣는다면 어떤 광고를 넣을 것인가?

C. 해당 광고를 어떤 위치에 집어넣을 것인가?

→ 위의 세 항목은 긴밀한 연관성이 있음.

추천 모델의 목적
D. 광고 수익 극대화

E. 유저 사용에 대해 부정적인 영향 최소화
RL 간단요약
MDP
Q-Learning
DQN
RL 간단요약
MDP (Markov Decision Process)
RL 간단 요약
Q-learning
• Model-Free: 환경에 대한 정보가 전무한 상태로 시작. 맞으면서 배운다

• O
ff
-policy: current policy target policy

• 앞서 말한 value function 중 Q (action value function)을 최대화하는 policy를 찾아내고자 함.

• Exploitation & Exploration
• 대표적으로 e-greedy (일정 확률로 exploit or explorate) -> 정보를 얻어가면서 동시에 최적 경로.

• 각 (s,a)에 대해서 Q를 저장해두면 재귀적으로 적용 가능.
≠
RL 간단요약
DQN
• State, action의 크기가 커지면 테이블로 저장하기 어려워짐.

• Function approximator로써 deep learning network를 이용하게 됨.

• DQN만의 고유 특징

• Replay bu
ff
er

• agent는 관측 값을 얻을 때마다 이를 Replay Buffer에 저장
.

• 저장된 버퍼 (history)에서 배치 만큼 샘플링하여, Q-러닝 업데이트 사용
• Fixed Target network Q`

• Target과 train network가 같이 변해서 학습이 안 되는 것을 방지.
Introduction
다시 논문의 문제로 돌아와서,,,
• 논문에서 해결하고자 하는 문제를 MDP로 표현.

• state : 유저의 browsing history + current reco-list, contextual info at time t

• Action : AA가 3가지 기준에 관해서 고르게 될 action

• Reward : action 에 따른 유저의 피드백 (ad income + user experience)

• Transition Probability 

• Discount Factor
st
at
r(st, at) at
p(st+1 |st, at)
γ
Introduction
논문의 문제 해결
• 궁극적인 목적

• 주어진 historical MDP 에 대해서,

Cumulative reward from user를 최대화하는 policy 를 찾아라.
(
𝒮
,
𝒜
,
𝒫
, ℛ, γ)
π
Q&A
Proposed
Algorithm
State & action feature
DQN architecture
optimization
Proposed Architecture
기존에 사용되던 DQN 모델들
• 모델 (a): 광고의 location은 판별 가능

• 모델 (b): 특정 광고는 고를 수 있음.

특정 광고 + 위치까지 하려면 

→ 두 모델이 exclusive한 관계

• DEAR에서는 

1. 이것을 아우르는 모델 적용.

2. 시간 복잡도 =>
O(|A| ⋅ L)
O(|A| ⋅ L) O(|A|)
DEAR
Processing of State and Action Features
• State feature
• : user’s rec/ads browsing history, contextual information and rec-list of current
request

• rec/ads browsing history: GRU를 이용하여 sequential preference 추출

• contextual information: OS, app version, fedd type 등을 벡터화

• rec-list of current request: concat of L items -> FFN에 집어넣음.

•
st = concat(prec
t , pad
t , ct, rect)
st
rect = tanh(Wrecconcat(rec1, rec2, . . . , recL) + brec)
DEAR
Processing of State and Action Features
• Action Feature
• Action 

• : item feature of a candidate ad

• : location one-hot vector to interpolate the selected ad
at = (aad
t , aloc
t ) ∈
𝒜
aad
t
aloc
t ∈ ℛL+1
DQN Architecture
• Input: state and candidate ad pair 

• Output: action-value (Q-value) corresponding to
L+2 location

1. Where optimal + which optimal
• For given pair , get all Q-values for all
possible locations
(st, aad
t )
(st, aad
t )
aloc
t
DEAR
DQN Architecture
• Input: state and candidate ad pair 

• Output: action-value (Q-value) corresponding to L+2
location

2. Which ad + where ad location + Whether to insert the ad

• 

• Why L+2?

• L+1 + 1(광고 안 넣는 경우)

• Temporal Complexity: =>
(st, aad
t )
Q(st, aad
t )l
 for integers in 0 ≤ l ≤ L + 2
O(|A| ⋅ L) O(|A|)
DEAR
DQN Architecture
• Divide Q function

• Value function 

• Advantage function 

• Why?

• 광고 삽입여부는 주로 에 의해 결정

• 광고 위치는 모든 feature에 의해 결정
V(st)
A(st, aad
t )
st
DEAR
DEAR
Reward function


• AA는 income of ads는 maximize 해야 되고, negative in uence of ads on user
experience는 minimize해야 함!

• if user continues to browse the next list, else 

• : 해당 광고의 revenue / 해당 광고 삽입 시에만 측정하고 그렇지 않으면 0
rt(st, at) = rad
t + α ⋅ rex
t
rex
t = 1 rex
t = 0
rad
t
DEAR
Optimal Action-value function
• 앞서 주어진 조건들을 모두 이용하면, optimal policy에 의한 action value function
구할 수 있음.



t+1의 모든 ads, locations에 대해서 조회해보아야 함.
Q*(st, at)
Q*(st, at) =
𝔼
st+1
[rt + γ max
at+1
Q*(st+1, at+1 |st, at)]
DEAR
모델 학습 과정
• 과거 데이터들을 기반으로 o
ff
-policy를 통해 학습.

• Storing transitions stage: 기존 광고 노출 전략 에 의한 를 저장
하여 replay bu ff
er 생성

• Training stage: replay bu
ff
er로부터 minibatch 를 뽑아서 AA 패러미터
학습.
b(st) (st, at, rt, st+1)
(s, a, r, s′

)
DEAR
Optimization
• 

• 

• target for the current iteration (과거 데이터를 미리 알고 있으므로, 그걸 기반으로 구한 target 값)

• 를 학습할 때에는 target network 를 고정. (Mnih et al. 2013)

•
L(θ) =
𝔼
st,at,rt,st+1
(yt − Q(st, at; θ))2
yt =
𝔼
st+1
[rt + γ max
at+1
Q(st+1, at+1; θT
)|st, at]
L(θ) θT
∇θL(θ) =
𝔼
st,at,rt,st+1
(yt − Q(st, at; θ))∇θQ(st, at; θ)
DEAR
O
ff
-policy Training of DEAR Framework
DEAR
Online Test of DEAR Framework
Q&A
Experiment
Experiment
Dataset
• 기존에 없는 새로운 dataset 만들어서 사용.

• 2019년 3월의 Doyuin (tik-tok의 중국 버전) 데이터 사용

• 시간 순으로 train(70%) / test (30%) split

• normal videos (recommended video) + ad videos

• Normal video feature: id, like score, comment score, follow score, group
score

• Ad video feature: id, image size, bid-price, hidden-cost, predicted-ctr,
predicted-recall
Experiment
Dataset
Experiment
Implementation Detail
• Length of recommendation list = 6 

• Dimensions

• Ad, video features: 60

• : 64, 64, 13, 360, 60

• Discount factor :0.95

• Size of replay bu
ff
er: 10000
L
prec
t , pad
t , ct, rect, aad
t
γ
Experiment
Metrics
A. Accumulated rewards , 

B. Improvement of DEAR

C. Corresponding p-value
R =
T
∑
1
rt rt = rad
t + α ⋅ rex
t
Experiment
Baselines
A. Wide & Deep

Jointly training FFN with embeddings + linear model with feature transformation

B. DeepFM

A의 업그레이드. Feature embedding을 통해 feature engineering 불필요하게 한 모델

C. GRU4Rec

RNN as GRU + Recommendation system

D. HDQN

Hierarchical DQN framework (high-level -> location, low-level -> speci c ad)
Experiment
Result
Component Study
DEAR-1: supervised learning

DEAR-2: GRU -> FCNs

DEAR-3: DQN Fig2-(b)

DEAR-4: One Q function

DEAR-5: random selected ad

DEAR-6: random slot
Experiment
Parameter Sensitivity Analysis
• 의 영향력이 커지면

• 광고를 적게 넣어 유저의 부정적 영
향은 줄지만

• 광고 매출은 자연스럽게 줄어듦.

• Vice versa

• 온라인 플랫폼은 각자의 비즈니스 특
성에 따라 값을 잘 선택해야 함.
Rex
α
Experiment
Q&A
Conclusion
Conclusion
Contribution of DEAR
1. 3 internally related action at the same time.

2. Simultaneously maximize ad revenue, minimize the negative in uence of ad

3. Signi
fi
cantly improve online advertising performance in reco systems.
Conclusion
DEAR 모델의 의문점
1. 모델의 구체적인 구조가 공개되어 있지 않음.

2. 실험 데이터셋 설계에 대한 의문 (기존 데이터에 대한 최적화는 아닌가?)

3. 모델이 아니라 feature로 인한 성능 향상은 아닐까?

1. 대부분의 feature를 자체 예측한 값으로 사용하고 있음.

2. 재현 가능성에 대한 의문

4. 다른 RL 방법론을 썼을 때에 더 좋은 결과가 나오지 않을까? (Policy-based)
THANK YOU

Dear - 딥러닝 논문읽기 모임 김창연님

  • 1.
    김창연, 고형권, 김동희,김준호, 송헌, 이민경, 이재윤 DEAR: Deep Reinforcement Learning for Online Advertising Impression in Recommender Systems 강화학습을 이용한 온라인 광고 추천 시스템
  • 2.
  • 3.
    온라인 광고추천 물건을 살만한 소비자에게 광고를 제공하여 수익을 최대화하고자 함.
 목표 지표 •CTR (Click Through Rate) - 해당 광고 노출 대비 클릭율 •ROI (Return on Investment) - 광고 투자 대비 순수익률 Online Advertising
  • 4.
    Online Advertising 기존 방식 •Guaranteed Delivery (GD) • 광고 계약자와 정해진 수량만큼 광고를 노출하는 것. • Real-Time Bidding (RTB) • 실시간으로 광고 구좌를 판매하고, 낙찰된 광고를 내보내는 것 (AdExchange)
  • 5.
    Online Advertising 기존 방식의한계점 • GD, MTB의 공통적인 문제점 1. o ffl ine/static optimization algorithms that treat each impression independently 2. maximize the immediate revenue for each impression • 이에 따라 광고 추천에 강화학습을 적용하려는 다양한 시도들이 등장.
  • 6.
    기존 RL 모델들의문제점 • 대부분의 연구들이 수익 극대화에만 초점을 두었음. • 그러나, 광고가 많아지게 되면 user experience에 부정적인 영향. Online Advertising
  • 7.
    Online Advertising 광고 추천시 고려해야 할 사항들 추천 모델링 시 고려 사항 A. 현재 추천 리스트에 광고를 집어넣을 것인가 말 것인가? B. 광고를 넣는다면 어떤 광고를 넣을 것인가? C. 해당 광고를 어떤 위치에 집어넣을 것인가? → 위의 세 항목은 긴밀한 연관성이 있음. 추천 모델의 목적 D. 광고 수익 극대화 E. 유저 사용에 대해 부정적인 영향 최소화
  • 9.
  • 10.
    RL 간단요약 MDP (MarkovDecision Process)
  • 11.
    RL 간단 요약 Q-learning •Model-Free: 환경에 대한 정보가 전무한 상태로 시작. 맞으면서 배운다 • O ff -policy: current policy target policy • 앞서 말한 value function 중 Q (action value function)을 최대화하는 policy를 찾아내고자 함. • Exploitation & Exploration • 대표적으로 e-greedy (일정 확률로 exploit or explorate) -> 정보를 얻어가면서 동시에 최적 경로. • 각 (s,a)에 대해서 Q를 저장해두면 재귀적으로 적용 가능. ≠
  • 12.
    RL 간단요약 DQN • State,action의 크기가 커지면 테이블로 저장하기 어려워짐. • Function approximator로써 deep learning network를 이용하게 됨. • DQN만의 고유 특징 • Replay bu ff er • agent는 관측 값을 얻을 때마다 이를 Replay Buffer에 저장 . • 저장된 버퍼 (history)에서 배치 만큼 샘플링하여, Q-러닝 업데이트 사용 • Fixed Target network Q` • Target과 train network가 같이 변해서 학습이 안 되는 것을 방지.
  • 13.
    Introduction 다시 논문의 문제로돌아와서,,, • 논문에서 해결하고자 하는 문제를 MDP로 표현. • state : 유저의 browsing history + current reco-list, contextual info at time t • Action : AA가 3가지 기준에 관해서 고르게 될 action • Reward : action 에 따른 유저의 피드백 (ad income + user experience) • Transition Probability • Discount Factor st at r(st, at) at p(st+1 |st, at) γ
  • 14.
    Introduction 논문의 문제 해결 •궁극적인 목적 • 주어진 historical MDP 에 대해서, Cumulative reward from user를 최대화하는 policy 를 찾아라. ( 𝒮 , 𝒜 , 𝒫 , ℛ, γ) π
  • 15.
  • 16.
    Proposed Algorithm State & actionfeature DQN architecture optimization
  • 17.
    Proposed Architecture 기존에 사용되던DQN 모델들 • 모델 (a): 광고의 location은 판별 가능 • 모델 (b): 특정 광고는 고를 수 있음. 특정 광고 + 위치까지 하려면 → 두 모델이 exclusive한 관계 • DEAR에서는 1. 이것을 아우르는 모델 적용. 2. 시간 복잡도 => O(|A| ⋅ L) O(|A| ⋅ L) O(|A|)
  • 18.
    DEAR Processing of Stateand Action Features • State feature • : user’s rec/ads browsing history, contextual information and rec-list of current request • rec/ads browsing history: GRU를 이용하여 sequential preference 추출 • contextual information: OS, app version, fedd type 등을 벡터화 • rec-list of current request: concat of L items -> FFN에 집어넣음. • st = concat(prec t , pad t , ct, rect) st rect = tanh(Wrecconcat(rec1, rec2, . . . , recL) + brec)
  • 19.
    DEAR Processing of Stateand Action Features • Action Feature • Action • : item feature of a candidate ad • : location one-hot vector to interpolate the selected ad at = (aad t , aloc t ) ∈ 𝒜 aad t aloc t ∈ ℛL+1
  • 20.
    DQN Architecture • Input:state and candidate ad pair • Output: action-value (Q-value) corresponding to L+2 location 1. Where optimal + which optimal • For given pair , get all Q-values for all possible locations (st, aad t ) (st, aad t ) aloc t DEAR
  • 21.
    DQN Architecture • Input:state and candidate ad pair • Output: action-value (Q-value) corresponding to L+2 location 2. Which ad + where ad location + Whether to insert the ad • • Why L+2? • L+1 + 1(광고 안 넣는 경우) • Temporal Complexity: => (st, aad t ) Q(st, aad t )l  for integers in 0 ≤ l ≤ L + 2 O(|A| ⋅ L) O(|A|) DEAR
  • 22.
    DQN Architecture • DivideQ function • Value function • Advantage function • Why? • 광고 삽입여부는 주로 에 의해 결정 • 광고 위치는 모든 feature에 의해 결정 V(st) A(st, aad t ) st DEAR
  • 23.
    DEAR Reward function • AA는income of ads는 maximize 해야 되고, negative in uence of ads on user experience는 minimize해야 함! • if user continues to browse the next list, else • : 해당 광고의 revenue / 해당 광고 삽입 시에만 측정하고 그렇지 않으면 0 rt(st, at) = rad t + α ⋅ rex t rex t = 1 rex t = 0 rad t
  • 24.
    DEAR Optimal Action-value function •앞서 주어진 조건들을 모두 이용하면, optimal policy에 의한 action value function 구할 수 있음. t+1의 모든 ads, locations에 대해서 조회해보아야 함. Q*(st, at) Q*(st, at) = 𝔼 st+1 [rt + γ max at+1 Q*(st+1, at+1 |st, at)]
  • 25.
    DEAR 모델 학습 과정 •과거 데이터들을 기반으로 o ff -policy를 통해 학습. • Storing transitions stage: 기존 광고 노출 전략 에 의한 를 저장 하여 replay bu ff er 생성 • Training stage: replay bu ff er로부터 minibatch 를 뽑아서 AA 패러미터 학습. b(st) (st, at, rt, st+1) (s, a, r, s′  )
  • 26.
    DEAR Optimization • • •target for the current iteration (과거 데이터를 미리 알고 있으므로, 그걸 기반으로 구한 target 값) • 를 학습할 때에는 target network 를 고정. (Mnih et al. 2013) • L(θ) = 𝔼 st,at,rt,st+1 (yt − Q(st, at; θ))2 yt = 𝔼 st+1 [rt + γ max at+1 Q(st+1, at+1; θT )|st, at] L(θ) θT ∇θL(θ) = 𝔼 st,at,rt,st+1 (yt − Q(st, at; θ))∇θQ(st, at; θ)
  • 27.
  • 28.
    DEAR Online Test ofDEAR Framework
  • 29.
  • 30.
  • 31.
    Experiment Dataset • 기존에 없는새로운 dataset 만들어서 사용. • 2019년 3월의 Doyuin (tik-tok의 중국 버전) 데이터 사용 • 시간 순으로 train(70%) / test (30%) split • normal videos (recommended video) + ad videos • Normal video feature: id, like score, comment score, follow score, group score • Ad video feature: id, image size, bid-price, hidden-cost, predicted-ctr, predicted-recall
  • 32.
  • 33.
    Experiment Implementation Detail • Lengthof recommendation list = 6 • Dimensions • Ad, video features: 60 • : 64, 64, 13, 360, 60 • Discount factor :0.95 • Size of replay bu ff er: 10000 L prec t , pad t , ct, rect, aad t γ
  • 34.
    Experiment Metrics A. Accumulated rewards, B. Improvement of DEAR C. Corresponding p-value R = T ∑ 1 rt rt = rad t + α ⋅ rex t
  • 35.
    Experiment Baselines A. Wide &Deep Jointly training FFN with embeddings + linear model with feature transformation B. DeepFM A의 업그레이드. Feature embedding을 통해 feature engineering 불필요하게 한 모델 C. GRU4Rec RNN as GRU + Recommendation system D. HDQN Hierarchical DQN framework (high-level -> location, low-level -> speci c ad)
  • 36.
  • 37.
    Component Study DEAR-1: supervisedlearning DEAR-2: GRU -> FCNs DEAR-3: DQN Fig2-(b) DEAR-4: One Q function DEAR-5: random selected ad DEAR-6: random slot Experiment
  • 38.
    Parameter Sensitivity Analysis •의 영향력이 커지면 • 광고를 적게 넣어 유저의 부정적 영 향은 줄지만 • 광고 매출은 자연스럽게 줄어듦. • Vice versa • 온라인 플랫폼은 각자의 비즈니스 특 성에 따라 값을 잘 선택해야 함. Rex α Experiment
  • 39.
  • 40.
  • 41.
    Conclusion Contribution of DEAR 1.3 internally related action at the same time. 2. Simultaneously maximize ad revenue, minimize the negative in uence of ad 3. Signi fi cantly improve online advertising performance in reco systems.
  • 42.
    Conclusion DEAR 모델의 의문점 1.모델의 구체적인 구조가 공개되어 있지 않음. 2. 실험 데이터셋 설계에 대한 의문 (기존 데이터에 대한 최적화는 아닌가?) 3. 모델이 아니라 feature로 인한 성능 향상은 아닐까? 1. 대부분의 feature를 자체 예측한 값으로 사용하고 있음. 2. 재현 가능성에 대한 의문 4. 다른 RL 방법론을 썼을 때에 더 좋은 결과가 나오지 않을까? (Policy-based)
  • 43.