Level 1
b c d e f
Max. depth -1
Max depth
Figure 2.4: G enerating a sta te tree (see te x t for th e explanation).
in th e sam e m anner.
O nce th e leftm ost five nodes of th e m axim um d e p th are form ed, th e left m ost node of d e p th im m ediately above th e m axim um d e p th (node a in figure 2.4) is com pletely formed. The tree will be expanded for th e branches w ith th e sam e origin as node a. T he process will be recursively continued u n til th e whole tre e is constructed.
T his process is more concisely described by th e following pseudo code.
generate_tree(state,current_depth) { if (current_depth+l==max_depth) { nodes = bestSnodes(states)
}
else { nodes = bestSnodes(states) for (i=0;i<5;i++) { generate_tree(nodes[i] .state,depth+1)}
}
}
Searching for th e good nodes is done at th e sam e tim e as th e tree is being g enerated. T his is accomplished by m ain tain in g a global list of nodes th a t contain highest quality values. Suppose th e list is for containing b est 10 nodes in th e tree. W henever a node is created during co n stru ctio n of th e tree, the node is assessed for its quality. W hen th e quality is higher th a n a node stored in th e list, th e node w ith th e lowest quality value in th e list will be su b stitu te d w ith th e new ly created node. W hen th e tree is com pleted, th e list contains th e global to p 10 quality nodes. B acktracking is th e n im plem ented over those nodes to seek th e threshold sequences.
2.4.3
R eso u rce req u irem en ts
All co m p u ters have a lim ited set of resources. A very large q u a n tity of com p u te r m em ory would be required to apply th e m e th o d to a realistic evaluation of a large netw ork. Here, th e memory resources required for th is task are briefly considered.
Since th e activ ity of each modelled neuron is binary, th e s ta te of th e neuron requires only one b it of storage. The activ ity of a netw ork is essentially th e collection of th e cell activities and it can be sto red in a b in a ry array of N / S
bytes (1 b y te is 8 b its), and th e same am ount of inform ation is required to hold th e n ex t s ta te of th e netw ork after a th resh o ld is applied.
As an event is an instance of netw ork activity, N / 8 bytes are also required to rep resen t an event. The network learns M events, so M N / S bytes are req u ired to store th e learned events. Similarly, th e connectivity m a trix and weight m a trix can be stored using N ^ / 8 bytes each. If we assum e th a t all th e learning occurs in one stage, the connectivity m a trix is n o t really needed once th e weight m a trix is generated. Even more efficiently, weight m a trix can be w ritte n on to p of th e connectivity m atrix so to save th e space in th e com puter
memory.
In to ta l, a naive calculation of m ajor resource requirem ent for th e netw ork is M N / S + N ^ / S bytes. For th e netw ork specified in section 2.4.1 (M = 2 2 3 ), th e resource requirem ent is approxim ately 3.3 M bytes which is sm all enough to be accom m odated in a m odern com puter. N ote th a t th e q u an tity grows w ith th e order of O(N^).
T h e above is a naive calculation of resource requirem ent. W hen sparse encoding is assum ed, it is more economical to store th e indices to th e active cell th a n sto rin g th e whole activity of th e n etw ork in a bin ary array. log2N bits
are req u ired to represent N different num bers. If it is possible to specify th e ab so lu tely m axim um am ount of active cells a t any tim e in th e netw ork as Wmax)
th e netw ork activ ity is more economically stored if th e following condition is satisfied:
Wmaxlog2N < N
In practice, m od ern com puter architecture is optim ised for m em ory allocation of a by te, 2 bytes (word), and 4 bytes (long w ords). To index a cell in a netw ork w ith N < 2^®(= 65,536), 2 bytes are used p e r index. Each event has a fixed size of active cells, nam ely W . If th e indexing scheme is employed to re p re se n t events in th e com puter memory, it uses 2 M W bytes.
T h e sam e indexing m ethod can be used for th e connectivity m a trix and th e w eight m a trix , when th e connectivity in th e netw ork is sparse. In stead of sto rin g a series of b in ary arrays, if indices to connected cells m ay be stored for th e connectivity m a trix is N . In this case, th e resource requirem ent is 2 R N
bytes.
T h e am o u n t of m em ory space occupied using th e indexing m eth o d is 2 M W+
W hen R is determ ined as a p ro p o rtio n of N (e.g. 10% connectivity = R = O.IN) th e q u an tity grows w ith 0 { N ^ ) . However, th e indexing m eth o d will becom e m ore economical if sparse encoding (sm all W ) and more significantly, sparse connectivity (small R) is realised.
As s ta te d in section 2.4.2, th e num ber of nodes in a d e p th L state tree is Since each node contains a state th a t occupies iV/8 bytes, a six d e p th tree occupies a t least 12.2 M bytes. Physically, th e com puter has 64M bytes of m em ory of which ab o u t SOMbytes is available for general use and th e v irtu al m em ory is a b o u t twice this size. This m eans th a t a six d ep th tree can be co n stru cte d confortably while a seven d e p th tre e (which requires at least 61 M bytes) can fit th e system , although th e speed of processing will trem endously slow dow n due to use of virtual memory.
2.5
R esu lts
T he s ta te tre e w ith th e m axim um d e p th 6 (sta rtin g from level 0) for th e netw ork was generated and was searched for goal nodes.
Figure 2.5 shows th e extracted optim al th resh o ld stra teg y and th e resulting netw ork a ctiv ity for th e network w ith p= 0.2. T h e num b er of correct cells stead ily increased throughout th e recall while th e num b er of spurious cell increased a t th e first step of th e recall an d th e n gradually decreased. The final q u a lity value is approxim ately 0.89.
F ig u re 2.6 shows th e same plot as in figure 2.5 except th a t th e netw ork loading is increased [p = 0.3). Here, we see th a t 6 steps are n o t enough to com plete th e recall. Spurious cells are b o o sted as a result of th e first th resh old in g and th e n filtered out in th e second in stan ce of thresholding. At th e th ir d s ta te of recall, the level of th resh old is decreased so to increase th e
A
B
14 12 10I
81
I
6 4 2 0 5 6 0 2 3 T im e 4 1Figure 2.5: Identified optim al threshold sequence (A ) an d th e associated ac tiv ity of th e netw ork (B ). The netw ork configuration is iV = 5000, R = 500,
W = 200, an d M = 1 4 0 so th a t p=0.2. T he netw ork is activ ated w ith th e in itial seed containing 20 correct cells and 0 spurious cells.
n u m b er of correct cells while boosting some spurious cells. T he fo u rth and fifth th resh old s seem to have th e effect of filtering out spurious cells while su stain in g th e activity of correct cells. Finally a t th e 6 th stage of recall, th e th resh o ld is “forced” to be set lower to increase th e correct cell activ ity in spite of th e increase of spurious cell, to improve th e q uality of th e recall. The final q u ality value is approxim ately 0.41.
One could argue th a t the reason th a t successful recall could not be achieved in th e netw ork w ith p = 0.3 because th e loading is beyond th e majcimum cap acity (i.e. overloading). To te st th e proposition, a d e p th seven tre e was gen erated for th e network, com pensating th e m ost of th e m achine’s m em ory a n d v irtu a l memory, no t to m ention th e co m p u tatio n al tim e (> two days). If th e final q uality (at seventh tim e step of recall) increases, recall m ay be possible if m ore tim e steps are allowed. However, searching th ro u g h th e sta te tree of such d e p th would not be not feasible because of th e resource co n straint.
T h e re su lt of search over the seven d e p th s ta te tree is d e m o n strated in figure 2.7. As observed in figure 2.5 and 2.6, spurious cells are boosted up in