Skip to contents

The mathematics behind HeiDI

The HeiDI model has four major components: 1) the acquisition of reciprocal associations between stimuli, 2) the pooling of those associations into stimulus activations, 3) the distribution of those activations into stimulus-specific response units, and 4) the generation of responses.

1 - Acquiring reciprocal associations

Whenever a trial is given, HeiDI learns associations among stimuli. The association between two stimuli, ii and jj is denoted via vi,jv_{i,j}. The association vi,jv_{i,j} represents a directional expectation: the expectation of jj after being presented with ii. Furthermore, its value represents the nature of the effect that ii has over the representation of jj. If positive, the presentation of ii “excites” the representation of jj. If negative, the presentation of ii “inhibits” the representation of jj.

HeiDI not only learns “forward” associations between stimuli, but also their reciprocal, or “backward” associations. Thus, if organisms are presented with iji \rightarrow j, organisms not only learn about vi,jv_{i,j}, but also about vj,iv_{j, i}, or the expectation of receiving ii after being presented with jj. Note that, for the sake of brevity, the learning equations below are only specified for forward associations.

1.1 - The stimulus expectation rule

HeiDI generates expectations about stimuli. The expectation of stimulus jj (eje_j) is expressed as

ej=kKxkvk,j \tag{Eq. 1} e_j = \sum_{k}^{K}x_kv_{k,j}

where KK is the set containing all stimuli in the experiment, and xkx_k is a quantity denoting the presence or absence of stimulus kk (1 or 0, respectively)1.

1.2 - Learning rule

HeiDI learns the appropriate expectations via error-correction mechanisms. After trial tt, the association between stimuli ii and jj is expressed as

vi,j,t=vi,j,t1+Δvi,j,t \tag{Eq. 2} v_{i,j, t} = v_{i,j, t-1} + \Delta v_{i,j, t}

where vj,i,t1v_{j,i, t-1} is the forward association between ii and jj on trial t1t-1, and Δvi,j,t\Delta v_{i,j, t} is the change in that association as a result of trial tt. That delta term uses a pooled error term and is expressed as

Δvi,j=xiαi(xjcαjej) \tag{Eq. 3} \Delta v_{i,j} = x_i\alpha_i(x_jc\alpha_j - e_j) where αi\alpha_i and αj\alpha_j are parameters representing the salience of stimuli ii and jj, respectively (0α10 \le \alpha \le 1), cc is a scaling constant (c=1c = 1). Note that the term denoting the trial, tt has been omitted here for simplicity.

2 - Pooling the strength of associations

HeiDI pools its stimulus associations to activate stimulus-specific representations. The activation of the representation for stimulus jj, aja_j, is defined as:

aj,M=oj,M+hj,M \tag{Eq. 4} a_{j,M} = o_{j,M} + h_{j,M}

where oj,Mo_{j,M} denotes the combined associative strength towards stimulus jj in presence of stimuli MM, and hj,Mh_{j,M} denotes the chained associative strength towards stimulus jj in presence of stimuli MM.

2.1 - Combined associative strength

The quantity oj,Mo_{j,M} is the result of combining the associative strength of forward and backward associations to and from stimulus jj as

oj,M=mjMvm,j+(mjMvm,jmjMvj,mc) \tag{Eq. 5} o_{j,M} = \sum_{m \neq j}^{M}v_{m,j} + \left(\frac{\sum_{m \neq j}^{M}v_{m,j} \sum_{m \neq j}^{M}v_{j,m}}{c}\right)

where each of the sums above run over all stimuli MM presented in the trial, different from stimulus jj.2 The left-hand term describes how the forward associations from stimuli MM to jj affect the representation of jj, whereas the right-hand term describes how the backward associations that jj has with stimuli MM affect its representation (although these are modulated by the forward associations themselves).

2.2 - Chained associative strength

The quantity hj,Mh_{j,M} captures the indirect associative strength that the stimuli MM have with jj, via absent stimuli. As such, hj,Mh_{j,M} is defined as

hj,M=mjMnNvm,noj,nc \tag{Eq. 6a} h_{j,M} = \sum_{m \neq j}^{M} \sum_{n}^{N}\frac{v_{m,n}o_{j,n}}{c}

where N are the stimuli not presented on the trial (i.e., K-M). Note the re-use of oo, the quantity defined in Eq. 5. This equation allows absent stimuli NN to influence the representation of stimulus jj, as long as they have an association with present stimuli MM.

In Honey and Dwyer (2022), the authors specify a similarity-based mechanism that modulates the effect of associative chains according to the similarity of the salience of nominal and retrieved stimuli3. As such, Eq. 6a is expanded as:

hj,M=mjMnNS(αn,αn)vm,noj,nc \tag{Eq. 6b} h_{j,M} = \sum_{m \neq j}^{M} \sum_{n}^{N}S(\alpha_{n}, \alpha'_n)\frac{v_{m,n}o_{j,n}}{c}

where SS is a similarity function that takes the nominal salience of stimulus n, αn\alpha_n (as perceived when nn is presented on a trial) and its retrieved salience, αn\alpha'_n (as perceived when nn is retrieved via other stimuli M, see ahead). This function is defined as:

S(αn,αn)=αnαn+|αnαn|×αnαn+|αnαn| \tag{Eq. 7} S(\alpha_n, \alpha'_n) = \frac{\alpha_n}{\alpha_n + |\alpha_n-\alpha'_n|} \times \frac{\alpha'_n}{\alpha'_n+ |\alpha_n-\alpha'_n|}

Notably, whenever there is more than one nominal salience for a given stimulus, then αn\alpha_n is the arithmetic mean among all nominal values (see “heidi_similarity” vignette).

3 - Distributing strength into stimulus-specific response units

HeiDI then distributes the pooled stimulus-specific strength among all KK stimuli, according to their relative salience. The activation of response unit jj, RjR_j is expressed as

Rj,k=θ(j)kKθ(k)ak,M \tag{Eq. 8} R_{j,k} = \frac{\theta(j)}{\sum_{k}^{K}\theta(k)}a_{k,M}

where jKj \in K. As KK can include both present and absent stimuli, the θ\theta function above depends on whether the stimulus kk is absent (i.e., kNk \in N) or not (i.e., kMk \in M), as:

θ(k)={|mM(vm,k+nkNvm,nvn,kc)|,if kNαk,otherwise \tag{Eq. 9} \theta(k) = \begin{cases} \left |\sum_{m}^{M}\left( v_{m,k}+\sum_{n \neq k}^{N}\frac{v_{m,n}v_{n,k}}{c}\right) \right|,& \text{if } k \in N\\ \alpha_k, & \text{otherwise} \end{cases}

Note that the quantity for absent stimuli is absolute, to prevent negative θ\theta values due to inhibitory associations4. Also, note a summation term is used on the left-hand side of the expression for an absent stimulus. It implies that all the present stimuli MM contribute to the salience of stimulus kk. Finally, note on the right-hand side of the same expression that the present stimuli contribute not only via the direct association each of them has with kk, vm,kv_{m,k} but also through associative chains with other absent stimuli (c.f., Eq. 6a).

4 - Generating responses

Finally, HeiDI responds. The response-generating mechanisms in HeiDI are currently underspecified. In its current version, HeiDI’s responses are the product of the activation of stimulus-specific response units and the connection that those units have with specific motor units. As such, the activation of motor unit qq, rqr_q, is given by

rq=Rjwj,q \tag{Eq. 10} r_q = R_jw_{j,q}

where wj,qw_{j,q} is a weight representing the association between stimulus-specific unit jj and motor unit qq.