27
1 Chapter 7. Content-Addressable Memory 知知知知知知知知 知知知知知知知知 知知知知知知知知知 知知 知知

Chapter 7. Content-Addressable Memory

  • Upload
    sadah

  • View
    222

  • Download
    6

Embed Size (px)

DESCRIPTION

Chapter 7. Content-Addressable Memory. 知的ロボティクス. 知的計測クラスタ 聴覚メディア研究室 傳田 遊亀. Chapter 7. 7.1 INTRODUCTION 7.2 HOPFIELD MEMORIES 7.2.1 Stability 7.2.2 Lyapunov Stability Example: CAM for a Small Phone Book 7.3 KANERVA MEMORIES 7.3.1 Implementation 7.3.2 Performance of Kanerva Memories - PowerPoint PPT Presentation

Citation preview

Page 1: Chapter 7. Content-Addressable Memory

1

Chapter 7.Content-Addressable Memory

知的ロボティクス

知的計測クラスタ聴覚メディア研究室

傳田 遊亀

Page 2: Chapter 7. Content-Addressable Memory

2Chapter 7.

7.1 INTRODUCTION 7.2 HOPFIELD MEMORIES

7.2.1 Stability 7.2.2 Lyapunov Stability Example: CAM for a Small Phone Book

7.3 KANERVA MEMORIES 7.3.1 Implementation 7.3.2 Performance of Kanerva Memories 7.3.3 Implementation of Kanerva Memories

7.4 RADIAL BASIS FUNCTIONS 7.5 KALMAN FILTERING

Page 3: Chapter 7. Content-Addressable Memory

37.1 INTRODUCTION

CAM ( Content-Addressble Memory ) データの情報の一部から関連した情報を連想して探す Hopfield memories ( Autoassociative ) Kanerva memories ( Heteroassociative )

Page 4: Chapter 7. Content-Addressable Memory

47.1 INTRODUCTION

抽象化された neuron ( unit )が memory bit を表現 Unit は -1 or 1 の離散状態を取る Weight は 0 ~ 1 の実数

jx

ixijw

N

jjiji txwtx

1

)()1(

N

jjiji txwgtx

1

)()1(

.1

01)(

otherwise

xxg

Page 5: Chapter 7. Content-Addressable Memory

57.2 HOPFIELD MEMORIES

Autoassociative memories Weight を のように対称になるように制限す

ることで weight の決定が比較的容易 2 層型ネットワーク ある時刻の出力は次の状態の入力になる Attractors (安定した平衡点)だけが存在する

jiij ww

W

X

Xh

Page 6: Chapter 7. Content-Addressable Memory

67.2 HOPFIELD MEMORIES

Hebbian Rule Q 個のパターン に適した weight を決

定するQpp ,,1, x

Weight の update rule

Q

p

pj

piij xxw

1

Q

p

Tpp

1

)(xxW

newj

newi

oldij

newij xx

nw

n

nw

11

Page 7: Chapter 7. Content-Addressable Memory

77.2.1 Stability

Weight の対称性から状態ベクトルはhypercube ( n 次元の立方体)の頂点の状態のみを取る

Page 8: Chapter 7. Content-Addressable Memory

87.2.1 Stability

Hopfield memories がある状態ベクトル  で安定px

)( pp g Wxx )(1

pi

N

j

pjij

pi hgxwgx

j pq

pj

qj

qi

pi

N

j

Q

q

pi

qj

qi

pi xxxNxxxxh

1 1

j

qj

pj

qp xx 0xxpi

pq j

pj

qj

qi

pi NxxxxNx

パターンの各成分が 1 or-1 に等確率で分布・独立である場合 noise 成分の分散は独立項の分散の和

1)1(2 QQNNQ ∵

Page 9: Chapter 7. Content-Addressable Memory

97.2.1 Stability

Noise 成分の分散は           の二項分布 Bit error rate は N から∞までの積分で求められる パターン数が増えると Bit error rate は増加 Unit 数が減ると Bit error rate は低下

QN 2,

4.1QN

NQ

Page 10: Chapter 7. Content-Addressable Memory

107.2.1 Stability

平均と標準偏差の比             は        SNR ( Signal to Noise Ratio )とみなせる

Bit error の起きる確率)()( QN N=1000, Q=100 の場合

)10()1001000()( QN

CAM の記憶容量は非常に小さい N138.0

QNQNN

Page 11: Chapter 7. Content-Addressable Memory

117.2.2 Lyapunov Stability Lyapunov 関数 V(x) を用いてシステムの安定性を調べる

V(x) が単調減少する場合 CAM は常に local minima になる V(x) をシステムのエネルギーとみなせる

12

1

ii

jijiij

i jjiij xxxxwCxxwV

0)()( ii xVxVV

0 Vxx ii

 

0222

iij

iijiji

jiij

jijiij

jijiijii

wxwxxxw

xxwxxwVxx

Page 12: Chapter 7. Content-Addressable Memory

12Exmaple: CAM for a Small Phone Book

各エントリー 25 文字の電話帳 1 文字 /5bit, ±1 で符号化

ex.) a ・・・ (-1,-1,-1,-1,1) , b ・・・ (-1,-1,-1,1,-1)

各エントリーは 125 次元のベクトルで表現

John Stewart Denker 8128

Lawrence David Jackel 7773

Richard Edwin Howard 5952

Wayne P. Hubbard 7707

Brian W. Straughn 3126

John Henry Scofield 8109

Page 13: Chapter 7. Content-Addressable Memory

13Exmaple: CAM for a Small Phone Book

Memory パターンに近い状態で始まった場合 V は単調減少 格納パターンに十分近づく

Time    

Energy   

CAM state

0.0 0.0 john s

0.2 -0.0784 john sdewirubneoimv 8109

0.4 -0.8426 john sdewirtbnenimv 8129

0.6 -0.8451 john sdewirtbnenimv 8129

0.8 -0.8581 john sdewirt nenkmv 8128

1.0 -0.9099 john sdewart denker 8128

1.2 -0.9824 john stewart denker

8128

Page 14: Chapter 7. Content-Addressable Memory

14Exmaple: CAM for a Small Phone Book

Memory パターンから遠い状態で始まった場合 V は単調減少するが attractor は偽の local minima になる

Time    

Energy   

CAM state

0.0 0.0 garbage

0.2 -0.00244 garbagee lafj naabd 5173

0.4 -0.6280 garbaged derjd naabd 7173

0.6 -0.6904 garbaged derjd nadbd 7173

0.8 -0.6904 gasbafed derjd nadbd 7173

1.0 -0.7595 gasbafed derjd naabd 7173

1.2 -0.7709 fasjebad derjd naabd 7173

1.4 -0.8276 fasjebad derjd naabd 7173

1.6 -0.8282 fasjeb d derjd naabd 7173

Page 15: Chapter 7. Content-Addressable Memory

157.3 KANERVAMEMORIES

Heteroassociative Q 個のメモリ( n bit/memory )がアドレス空間

(     )に無相関に分布 M 個のペア (x, y) , x ・・・アドレス , y ・・・データ ベクトルを格納するためには x の Hamming 距離 D の全

ベクトル d に y を加える ベクトルを修正するためには d の総和を閾値処理する

nQ 2

ii dgy

Page 16: Chapter 7. Content-Addressable Memory

167.3 KANERVAMEMORIES

単一のベクトルのみを処理する場合は正確にベクトルを修正できる

一般的には複数のベクトルを扱う必要がある 総和をとることで影響が出る可能性がある

データの各成分が ±1 の範囲でランダムに分布すると仮定 他のベクトルの要素は打ち消しあう 入力ベクトルが主な成分を占める

Page 17: Chapter 7. Content-Addressable Memory

177.3 KANERVAMEMORIES

Conventional computer memory 密なアドレス空間( ex. 20 bit )を持ち全てのアドレス

(  )を使用

202

Page 18: Chapter 7. Content-Addressable Memory

187.3 KANERVAMEMORIES

疎なアドレス空間( ex. 1000 bit) を持つ     ものアドレスを確保することは物理的に不可能10002

Page 19: Chapter 7. Content-Addressable Memory

197.3.1 Implementation

M×N ( M << アドレスス空間)のアドレス行列 Aと M×N データ行列 C x から距離 D 内のベクトルをセレクトベクトル s を用い

て表す)(Axs D

.0

1)(

otherwise

DxxD

実際に使用するベクトルの割合を p とすると使用されるベクトル数は pM になる

Q

k

Tkk

1

ysC

Page 20: Chapter 7. Content-Addressable Memory

207.3.1 Implementation

ベクトルを格納することでデータを得られる

Csh T)(hy g

.1

01)(

otherwise

xxg i

i

A

X

dC

hY

Kanerva memories は 3 層ネットワークで表現できる

Page 21: Chapter 7. Content-Addressable Memory

217.3.2 Performance of Kanerva Memories

第一項の期待値・・・                

)( aD

a Axs

Q

akk

TkkaaaaaQ

k

TkkaaaTa

,11

)( ysssssyyssCsh

1ppM a y

kTkkL ss

)var()1()var(var)var(

)(var

11,1

,1

LyQLL a

Q

akk

kkkia

Q

akk

kTkki

aaai

ssy

ssyssy

ベクトルをランダムに選んだ場合の noise 成分                

Page 22: Chapter 7. Content-Addressable Memory

227.3.2 Performance of Kanerva Memories

第 1 項の期待値・・・ pM 第 2 項の期待値・・・ pM

22,!)( pMLepMLp pMx

211

211

21

21 )()var( LELLyELyE

1)1(1

)()1(2

222

QMppQpM

MpMpQpM

)var()1()var( 11LyQLa

合計確率はポアソン分布でモデル化可能

Page 23: Chapter 7. Content-Addressable Memory

237.3.2 Performance of Kanerva Memories

)(

310))11(11(100

100

Example of a Kanerva Memory Q=100 , p=0.1 , M=10,000

合計の各要素が独立であると仮定した場合正規分布で近似できる Error rate ・・・

)77.5()(

Page 24: Chapter 7. Content-Addressable Memory

247.3.3 Implementation of Kanerva Memories

Content-addressable 性 16×16 = 256 次元のベクトル

Page 25: Chapter 7. Content-Addressable Memory

257.3.3 Implementation of Kanerva Memories

Heteroassociative 性

Page 26: Chapter 7. Content-Addressable Memory

267.4 RADIAL BASIS FUNCTIONS

Kanerva memories ではアドレス空間を大きく取ることで error rate を下げることが可能

データがアドレスの関数として表現可能 内挿によって関数近似を行う Radial basis functions を使用

)()( igh xxx

2

2

2

)()(

i

ih

xxx

i

iiihcf )()( xx

Page 27: Chapter 7. Content-Addressable Memory

277.5 KALMAN FILTERING

Kanerva memories の拡張 Noise の影響を抑える コストを最小化する

222)( WxIxWxW ,E

μWxIWxx

x

)(21

TkkE

vxx

)ˆ()(ˆ 121 xxPRWxIWxx Tkk

の共分散行列・・・ )ˆ( xxP