Jun-Hyun Bae*, Taewon Park*, Minho Lee
Kyungpook National University
* Equal Contribution
Abstract
Learning associative reasoning is necessary to implement human-level artificial intelligence even when a model faces unfamiliar associations of learned components. However, conventional memory augmented neural networks (MANNs) have shown degraded performance on systematically different data since they lack consideration of systematic generalization. In this work, we propose a novel architecture for MANNs which explicitly aims to learn recomposable representations with a modular structure of RNNs. Our method binds learned representations with a Tensor Product Representation (TPR) to manifest their associations and stores the associations into TPR-based external memory. In addition, to demonstrate the effectiveness of our approach, we introduce a new benchmark for evaluating systematic generalization performance on associative reasoning, which contains systematically different combinations of words between training and test data. From the experimental results, our method shows superior test accuracy on systematically different data compared to other models. Furthermore, we validate the models using TPR by analyzing whether the learned representations have symbolic properties.
Overview
์ด ๋ ผ๋ฌธ์์ ๋ง๋ Systematic Associative Recall(SAR)์ ํ์ต๊ณผ ํ ์คํธ์ ์ฐ๊ด ๊ด๊ณ๋ฅผ ๋ค๋ฅด๊ฒ ๊ตฌ์ฑํ๋ค. ํ์ต ์ค ์ซ์์๋ง ์ฐ๊ฒฐ๋ ์ฌ๋ ์ด๋ฆ์ ํ ์คํธ์์๋ ๊ณผ์ผ๊ณผ ์ฐ๊ฒฐํ๋ค. ๋ฑ์ฅํ๋ ๋จ์ด๋ ์ด๋ฏธ ํ์ตํ์ง๋ง ์กฐํฉ์ ๋ฌ๋ผ์ง๋ ์ค์ ์ด๋ค.
DNC์ FWM์ ํ์ต๊ณผ ๊ฐ์ ์กฐํฉ์์๋ ์ ํ๋๊ฐ ๋์์ง๋ง, ์กฐํฉ์ ๋ฐ๊พธ๋ฉด ์ฑ๋ฅ์ด ํฌ๊ฒ ๋จ์ด์ก๋ค. ์ ์ ๋ชจ๋ธ์ modular RNN encoder์ TPR ๊ธฐ๋ฐ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ๊ฒฐํฉํด ์ด ๊ฒฉ์ฐจ๋ฅผ ์ค์๋ค. FWM๋ TPR ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ฌ์ฉํ๋ฏ๋ก, ๋ ๋ชจ๋ธ์ ๋น๊ต์์๋ encoder๊ฐ ๋ง๋๋ roleยทfiller ํํ์ ํจ๊ป ๋ถ์ํ๋ค. ์ ์ ๋ชจ๋ธ์ ๊ฐ์ ๊ฐ์ฒด๋ฅผ ๋ค๋ฅธ ์กฐํฉ์์ ๊บผ๋ผ ๋ ๋ ์ผ๊ด๋ ํํ์ ๋ณด์๋ค.
![]()
์ ์ฒด ์ํคํ ์ฒ. ๊ฐ ์์ $t$๋ง๋ค modular encoder์ hidden state $h_t$์์ role $r_t$์ filler $f_t$๋ฅผ ๊ฐ๊ฐ ์ถ์ถํ๊ณ , ๋ ๋ฒกํฐ์ tensor product($\otimes$)๋ฅผ ์ธ๋ถ ๋ฉ๋ชจ๋ฆฌ $\mathbf{M}_t$์ ๋์ ํ๋ค. ์ง์ ์์๋ ๊ฐ์ encoder๊ฐ unbinding ๋ฒกํฐ $u_t$๋ฅผ ๋ง๋ค์ด ๋ฉ๋ชจ๋ฆฌ์์ ํด๋น filler๋ฅผ ๊บผ๋ด๊ณ (unbind), ์ด๋ฅผ ์ ํ ๋ณํํด ์ถ๋ ฅ $o_t$๋ฅผ ์ป๋๋ค.
Method
๋ฉ๋ชจ๋ฆฌ์ ๊ด๊ณ๋ฅผ ์ ์ฅํ ์ ์๋ค๊ณ ํด์ ์๋ก์ด ์กฐํฉ๋ ์ ๋ค๋ฃจ๋ ๊ฒ์ ์๋๋ค. ๋ ผ๋ฌธ์ encoder๊ฐ ํ์ต์์ ๋ณธ ์กฐํฉ์ ์ฝํ ํํ์ ๋ง๋ค ์ ์๋ค๋ ์ ์ ์ฃผ๋ชฉํ๋ค. ๊ทธ๋์ modular RNN encoder์ TPR ๊ธฐ๋ฐ ์ธ๋ถ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ๊ฒฐํฉํด, ๊ตฌ์ฑ ์์๋ฅผ ๋ค์ ์กฐํฉํ๊ธฐ ์ข์ ํํ์ ๋ฐฐ์ฐ๋๋ก ์ ๋ํ๋ค.
ํต์ฌ ๊ตฌ์ฑ:
- Recurrent Independent Mechanisms (RIMs): ์ฌ๋ฌ RNN ๋ชจ๋์ด competitive learning์ผ๋ก ๊ฐ์ ๋ ๋ฆฝ์ ์ธ ์ธ์ฝ๋ฉ ๋ฉ์ปค๋์ฆ์ ํ์ต
- Tensor Product Representation (TPR): role๊ณผ filler๋ฅผ tensor product๋ก ๋ฌถ์ด ์ฐ๊ด ๊ด๊ณ๋ฅผ ํํ โ \(T = \sum_{k=1}^N \mathbf{r}_k \otimes \mathbf{f}_k\)
- TPR-based External Memory: ๊ฐ ์์ \(t\)์์ hidden state๋ก๋ถํฐ role/filler ํํ์ ์ถ์ถํด ๋ฉ๋ชจ๋ฆฌ์ ์ค์ฒฉ(superpose)ํ๋ค. ์ฐ๊ธฐ ๊ฐ๋ \(\beta = \sigma(W_\beta h_t)\)๋ฅผ ์ฌ์ฉํด \(\mathbf{M}_t = \mathbf{M}_{t-1} + \mathbf{r}_t \otimes (\beta \mathbf{f}_t - (1-\beta) \mathbf{f}_{t-1})\)๋ก ๊ฐฑ์ ํ๋ค.
- Systematic Associative Recall (SAR): ์ฒด๊ณ์ ์ผ๋ฐํ ํ๊ฐ๋ฅผ ์ํ ์ ๋ฒค์น๋งํฌ ์ ์
Results
Systematic Associative Recall (SAR) Task
SAR์ ๋ณธ ๋ ผ๋ฌธ์์ ์ ์ํ๋ ๋ฒค์น๋งํฌ๋ก, associative reasoning์์์ ์ฒด๊ณ์ ์ผ๋ฐํ๋ฅผ ์ธก์ ํ๊ธฐ ์ํด ์ค๊ณ๋์๋ค. ์ธ ๊ฐ์ง ๊ฐ์ฒด ์งํฉ(์ฌ๋ ์ด๋ฆ \(S_h\), ๊ณผ์ผ ์ด๋ฆ \(S_f\), ์ซ์ ์ด๋ฆ \(S_n\))์ ์ฌ์ฉํ๋ฉฐ, ํ์ต ๋ฐ์ดํฐ์ ํ ์คํธ ๋ฐ์ดํฐ ๊ฐ์ ๊ฐ์ฒด ์กฐํฉ์ ์ฒด๊ณ์ ์ผ๋ก ๋ค๋ฅด๊ฒ ๊ตฌ์ฑํ๋ค.
๊ตฌ์ฒด์ ์ผ๋ก, \(S_h\)์ ์ผ๋ถ(\(S_h^1\))๋ ํ์ต ์ ์ซ์์๋ง ์ฐ๊ด๋๊ณ , ๋ค๋ฅธ ์ผ๋ถ(\(S_h^2\))๋ ๊ณผ์ผ๊ณผ๋ง ์ฐ๊ด๋๋ค. ํ ์คํธ๋ ๋ ๊ฐ์ง๋ค. ํ์ต๊ณผ ๊ฐ์ ๊ด๊ณ๋ฅผ ๋ฌป๋ test (same)๊ณผ, ๊ด๊ณ๋ฅผ ๋ค๋ฐ๊ฟ \(S_h^1\)์ ๊ณผ์ผ๊ณผ, \(S_h^2\)๋ ์ซ์์ ์ฐ๊ด์ํจ test (different)์ด๋ค. ๋์ด๋ ํ๋ผ๋ฏธํฐ \(p = |S_h^3| / |S_h|\)๋ ํ์ต ์ ๊ณผ์ผยท์ซ์ ๋ชจ๋์ ์ฐ๊ด๋๋ ์ฌ๋ ์ด๋ฆ(\(S_h^3\))์ ๋น์จ๋ก, ๊ฐ์ด ์์์๋ก ํ์ต/ํ ์คํธ ๊ฐ ์ฒด๊ณ์ ์ฐจ์ด๊ฐ ํฌ๋ค.
(a) DNC
(b) FWM
(c) Ours
SAR ํ์คํฌ์์ DNC, FWM, ์ ์ ๋ฐฉ๋ฒ์ ํ์ต/ํ ์คํธ ์ ํ๋ ๋น๊ต(15k iteration).
DNC์ FWM์ ๋ชจ๋ \(p\)์์ test (same)๊ณผ test (different) ์ฌ์ด์ ํฐ ๊ฒฉ์ฐจ๋ฅผ ๋ณด์ธ๋ค. ํ์ต ๋ ๋ณธ ์กฐํฉ์๋ ๋ง์ถ์ง๋ง, ๊ด๊ณ๊ฐ ๋ค๋ฐ๋ ์กฐํฉ์ผ๋ก๋ ์ผ๋ฐํํ์ง ๋ชปํ๋ค๋ ๋ป์ด๋ค. ์ ์ ๋ฐฉ๋ฒ์ \(p=0.3\)๊ณผ \(p=0.5\)์์ test (different) ์ ํ๋๊ฐ 90%๋ฅผ ๋์ด ๊ฒฉ์ฐจ๋ฅผ ํฌ๊ฒ ์ขํ๋ค. ๋ค๋ง ๊ฐ์ฅ ์ด๋ ค์ด \(p=0.1\)์์๋ ์ ์ ๋ฐฉ๋ฒ๋ test (different) ์ ํ๋๊ฐ 40%์ ๋ชป ๋ฏธ์ณ, ์ฌ์ ํ ํฐ ๊ฒฉ์ฐจ๊ฐ ๋จ๋๋ค. FWM์ด TPR ๊ธฐ๋ฐ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ฌ์ฉํจ์๋ ๋ถ๊ตฌํ๊ณ ์ฒด๊ณ์ ์ผ๋ฐํ์ ์คํจํ๋ค๋ ๊ฒ์, TPR ๋ฉ๋ชจ๋ฆฌ๋ง์ผ๋ก๋ ์ถฉ๋ถํ์ง ์์ผ๋ฉฐ encoder๊ฐ ์ฌ๋ฐ๋ฅธ symbolic representation์ ํ์ตํ๋ ๊ฒ์ด ํต์ฌ์์ ์์ฌํ๋ค.
Concatenated-bAbI (catbAbI)
SAR์ด ์ฒด๊ณ์ ์ผ๋ฐํ์ ์ด์ ์ ๋ง์ถ ๋ฐ๋ฉด, catbAbI๋ ์ผ๋ฐ์ ์ธ ์ฅ๊ธฐ ์ฐ๊ด ์ถ๋ก ์ฑ๋ฅ์ ํ๊ฐํ๋ค. bAbI์ story๋ฅผ ๋์์ด ์ด์ด ๋ถ์ธ sequence์์ ์ง์์๋ต์ ์ํํ๋ ํ์คํฌ์ด๋ค.
catbAbI test accuracy (3ํ ํ๊ท ). our trial์ ๋์ผ ์ธํ ์์ ์ง์ ์ฌํํ ๊ฒฐ๊ณผ๋ค.
| Model | Test Accuracy |
|---|---|
| LSTM | 80.88% |
| Transformer-XL | 87.66% |
| Meta-learned Neural Memory | 88.97% |
| Fast Weight Memory (FWM) | 96.75% |
| FWM (our trial) | 94.94% |
| Ours | 96.63% |
๋์ผํ ์คํ ์ธํ (our trial)์์ ๋น๊ตํ๋ฉด, ์ ์ ๋ฐฉ๋ฒ(96.63%)์ด FWM(94.94%)๋ณด๋ค 1.7%p ๋๊ณ , FWM ๋ ผ๋ฌธ์ ๋ณด๊ณ ์น(96.75%)์๋ ๊ฑฐ์ ๊ฐ๋ค. modular encoder๋ฅผ ๋์ ํด ์ฒด๊ณ์ ์ผ๋ฐํ ๋ฅ๋ ฅ์ ๋ํ๋ฉด์๋, ์ผ๋ฐ์ ์ธ ์ฐ๊ด ์ถ๋ก ์ฑ๋ฅ์ ์ต๊ณ ์์ค์ ๊ฐ๊น๊ฒ ์ ์งํจ์ ๋ณด์ฌ์ค๋ค.
Symbolic Representation ๋ถ์
ํ์ต๋ ํํ์ด ์ฌ๋ฐ๋ฅธ symbolic property๋ฅผ ๊ฐ๋์ง ๋ ๊ฐ์ง ๋ถ์์ผ๋ก ๊ฒ์ฆํ๋ค.
Role-Unbinding Orthogonality: TPR์์ filler๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ ๊บผ๋ด๋ ค๋ฉด(unbinding), ๊ฐ์ ๊ฐ์ฒด์ role ๋ฒกํฐ์ unbinding ๋ฒกํฐ๋ ์ ์ฌ๋๊ฐ 1์ ๊ฐ๊น๊ณ , ์๋ก ๋ค๋ฅธ ๊ฐ์ฒด๋ผ๋ฆฌ๋ 0์ ๊ฐ๊น์์ผ(์ง๊ต) ํ๋ค. FWM์ ์ ์ฌ๋ ํ๋ ฌ์ off-diagonal ๊ฐ์ด ์๋นํ ๋จ์ ์์ง๋ง, ์ ์ ๋ฐฉ๋ฒ์ ํจ์ฌ ์ง๊ต์ ๊ฐ๊น๋ค. ์ด๋ modular encoder๊ฐ ๊ฐ ๊ฐ์ฒด์ ๋ํด ๋ถ๋ฆฌ ๊ฐ๋ฅํ(separable) symbolic representation์ ํ์ตํ์์ ์๋ฏธํ๋ค.
(a) FWM
(b) Ours
์๋ก ๋ค๋ฅธ ์ฌ๋ ๊ฐ์ฒด์ ๋ํ role ๋ฒกํฐ์ unbinding ๋ฒกํฐ ๊ฐ ์ ์ฌ๋ ํ๋ ฌ. FWM์ off-diagonal ์ ์ฌ๋๊ฐ ๋จ์ ์์ง๋ง, ์ ์ ๋ฐฉ๋ฒ์ ๊ฑฐ์ ์ง๊ตํ๋ค.
Filler Consistency: ๋์ผํ ๋์ ๊ฐ์ฒด์ ๋ํด, ์ด๋ค ์กฐํฉ์์ ์ง์ํ๋ ๋์ผํ read ๋ฒกํฐ๊ฐ ๋ฐํ๋์ด์ผ ์ฒด๊ณ์ ์ถ๋ก ์ด๋ผ ํ ์ ์๋ค. FWM์ ์กฐํฉ์ ๋ฐ๋ผ read ๋ฒกํฐ๊ฐ ๋ฌ๋ผ์ง์ง๋ง, ์ ์ ๋ฐฉ๋ฒ์ ์กฐํฉ์ ๊ด๊ณ์์ด ๊ฑฐ์ ๋์ผํ read ๋ฒกํฐ๋ฅผ ๋ฐํํ๋ค. ์ด๋ ๋ชจ๋ธ์ด ํน์ ์กฐํฉ์ ์๊ธฐํ๋ ๊ฒ์ด ์๋๋ผ, ๊ฐ๋ณ ๊ตฌ์ฑ ์์๋ฅผ ๋ ๋ฆฝ์ ์ผ๋ก ์ธ์ฝ๋ฉํ๊ณ ์ฌ์กฐํฉํ์ฌ ์ถ๋ก ํ๊ณ ์์์ ๋ณด์ฌ์ฃผ๋ ์ฆ๊ฑฐ์ด๋ค.
(a) FWM
(b) Ours
๊ฐ์ ๊ณผ์ผ ๊ฐ์ฒด๋ฅผ ๊บผ๋ธ read ๋ฒกํฐ ๊ฐ ์ ์ฌ๋. ์ ์ ๋ฐฉ๋ฒ์ ์กฐํฉ์ ๊ด๊ณ์์ด ์ผ๊ด๋ ์ถ๋ ฅ์ ๋ณด์ธ๋ค.