2. 고전(80’s) AI에서의 Production System
• Production system for planning, reasoning, prediction at
1980s,
• Modeling of high-level congnition, mathematical problem solving
• Condition-Action Rules
• Rule conditions are matched to entities in working memory
• Match can trigger computational actions that update working
memory or external actions on the outside world
3. Our contributions
• We develop E2E deep learning model that construct object-
centric representations of entities in videos
• Operate on these entities with differentiable and thus
learnable production rules
• Disentangle of Knowledge
• Symbolic AI
4. 실제 사례로 감잡기
• MNIST Transformation Entity들 1) image 2) ops
Rule은 변환 규칙
ex) Rotate Right라는 룰은
오른쪽으로 90도 기울인다.
Rule “rotate right”
when
ops == 1
image exist
then
produce “rotate 90 right image”
5. Slots and Sparse Rules
Image
ops
Step 1.
parsing input image into slot-based entities
(slot-wise representation of entities[1])
Step 2.
select {rule, primary slot} pair by attention
=> 일종의 룰매칭
=> MNIST에서는 ops=1에 대해 rule_rot_right 선택
Step3
select a contextual slot given primary slot/rule
=> MNIST에서는 image 선택
Step 4
apply the selected rule based on primary and
context slots
=> 일종의 Rule 적용
=> MNIST 에서는 변환된 image 생성
[1] https://arxiv.org/abs/1909.10893
6. Algorithm in details
입력 시퀀스, ex) video에서의 frame
Time t에서의 M개의 entity들의 representation
Ex) 물리 환경 문제에서 M=3의 embedding
N개의 Rule, ex) MNIST 변환에서는 N=4
Learned rule embedding vector
마치 전통적 rule의 when절에 해당
Rule의 then 절로써 world를 바꾸는 action을
결정
7. 문제마다 정해야할 hyper-parameter
1) 룰의 개수 N
2) 룰 적용 횟수(stage) K
3) MLP의 구조
4) Contextual slot의 개수
Entity들의 표상을 구한다. (updated or initial)
K 번에 걸처서 특정 룰을 선정해서 적용하는 것을 반복한다.
개별 룰 임베딩을 쿼리로 하고, 모든 Entntiy들을 key로 해서 attension을 한다.
가장 최고집중을 가진 특정 룰과 특정 entity(primary)를 선택한다.
위에서 선정한 특정 룰과 특정 primary entit를 쿼리로 하고, 다른 entity들을 key로 해서 attention
가장 최고집중을 가진 특정 contextual entity를 선택한다.
c.f) 문제에 따라서 복수 개일 수 있음
선택된 룰의 action을 정한다 with primary/contextual
Action이 world에 영향을 끼쳐서 entntiy 표상을 변화시킨다.
룰 임베딩 업데이트는 어디?
WHEN
THEN
8. Experiments : 연산 Task
M = 3
Stage K=1
N = 4 ( +, -, * , /)
T = 1
학습 셋 구성
[feature, label] = (0.4, 0.5, +) , 0.9
(0.3, 0.2, - ) , 0.1
0.4 + 0.5 = 0.9
0.3 - 0.2 = 0.1
0.1 * 0.5 = 0.05
Test 시점에는 아래처럼 연쇄적으로
계산하는 task 수행능력 비교
두개의 숫자 => contextual entites
한 개의 operation => primary entity
시퀀스가 길어지면 질수록 NPS 방법이 우수함을 입증
9. Experiments : MNIST 변환
M = 2 (ops가 primary, image가 contextual)
N = 4 (RR, RL, TU, TD)
Stage K=1
T = 1
학습셋
[feature, label] = (원래이미지, RR), RR변환이미지
Image to entity repr
Rule action 생성
: 여기서는 변환된 이미지 생성
10. 물체 충돌 법칙 학습
물리 법칙
: 무거운 물체가 움직이는 경로상에
있는 더 가벼운 물체는 움직인다.
When
Object move
Another lighter object exists
Then
lighter object will be pushed
Agent(사람)이 위 환경에서 물체를 움직여서 (action=U/D/L/R)
물체 충돌을 야기하면서 어떤 것이 충돌에 의해 밀리는지(pushed)
관찰함으로써 물체간 무게의 경중을 알아낼 수 있다.
11. 물체 충돌 법칙 학습
학습에 사용되는 에피소드 X = (x1, a1, x2, a2,…..xT, aT)
Image embedding
3개의 물체로 분해한 embedding
특정 물체를 미는 동작 embedding을 가미
NPS를 수행, 일종의 State Transition Model
Primary 부딪쳐서 밀린/안밀린 객체
Contexual 미는 물체
룰 액션 => 밀려져 버린 상황
12. 물체 충돌 법칙 학습
높을수록
좋음
Dense interaction하는 GNN보다
Sparse interaction하는 NPS가 우수
룰이 한 개밖에 없는데 괜스리 여러 번 K>1 rule 적용을 하면
Dense하게 되서 성능이 저하된다.
미래 step 예측 (먼 미래일 수록 예측력 저하)
이미지 한 개당 룰 적용 횟수 증가
13. Atari Game
X = (x1, a1, x2, a2,…..xT, aT)
높을수록
좋음
미래 step 예측 (먼 미래일 수록 예측력 저하)
다수 entity가 복잡한
물리법칙(반사)로 상호작용하므로
더 많은 룰이 있으면 성능 좋아짐
14. Rule이 가져야 할 속성을 NPS는 가진다.
• Modular
• Each rule is atomic (can be added/modified/deleted independently)
• Abstract
• Abstract that can match to a wide range of patterns
• Allow for transfer learning across different environments
• Sparse
• Involve only a subset of entities
• 반면 GNN은 광범위하게 involve가 된다
• Causal and asymmetric knowledge
15. Conclusion
• We learn rules from only low-level observables like images
• Learn Action-Condition World Model and Extrapolation of
knowledge in the form of learned rule in Atari games
• 여기서 world model은 State transition model in Atari game을 의미하고,
learned rule은 implicit하게 학습한 룰(예를 들어 반사룰)들을 의미하는 듯
• Human seems to exploit the inductive bias in the sparcity of
rules ... very efficient
• For such problems, exploration become bottleneck… Using rules as a
source of behavioral priors can drive necessary exploration