# Improvement of Heterogeneous Transfer Learning Efficiency by Using Hebbian Learning Principle
## 3 Hebbian Transfer Learning
### The Algorithm  
In the conceptual process presented in Figure 1, on one side, the source parameters are learned and then on the other side, the target parameters are fine-tuned from the transferred parameters. The source model is trained using standard backpropagation, while the target model is trained using the backpropagation of plastic layer for Hebbian learning [65]. In the experiment results section, we compare the result of Hebbian transfer learning with standard transfer learning, where the parameters are fine-tuned by standard backpropagation only. For transfer learning we use the same standard CNN architecture for image classification for source and target model, explained later in detail. To describe in easy words, in the initial step, we train the source model with a source domain dataset using stochastic gradient descent. In the next step, the model parameters (connection weights) learned on the source domain dataset is used to initialize the target model to perform transfer learning. In the last step, the target model parameters \begin{table}
\begin{tabular}{c l} \hline \hline \(\mathcal{T}_{S},\ \mathcal{T}_{T}\) & The source task and target task \\ \(\text{D}_{S},\ \text{D}_{T}\) & The source domain dataset and target domain dataset \\ \(W^{S},\ W^{T}\) & The source model parameters and target model parameters \\ \(x_{i}(t)\) & The output of neuron \(i\) at time \(t\) \\ \(w_{i,j}\) & The weight parameter of connection between neuron \(i\) and \(j\) \\ \(\alpha_{i,j}\) & The plasticity parameter of connection between neuron \(i\) and \(j\) \\ \(Hebb_{i,j}(t)\) & The Hebbian trace—plasticity of connection between neuron \(i\) and \(j\) \\ \(\eta\) & The learning rate of plasticity \\ \(\sigma\) & The nonlinear activation function \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notations used in describing the Hebbian transfer learning algorithm. Figure 1: The conceptual process of the transfer learning task. are fine-tuned by using the target domain dataset (using the Hebbian transfer learning technique). Figure 1 shows the conceptual process of the plastic way of Hebbian transfer learning task. The transfer learning setup aided by Hebbian learning principle helps to better perform feature adaptation from heterogeneous source to target domain model. The strength of each connection is governed by Hebbian plasticity during networks lifetime. The plastic neural network is a combination of a parameter, which determines baseline weights and the degree of plasticity of each connection. These parameters govern the way in which each connection changes over time as a result of experience. The Hebbian plasticity for each connection can be modeled as a time-dependent quantity called Hebbian trace \(Hebb_{i,j}\)[64]. Equation (1) represents the simplest form of Hebbian trace, which is a running average of the product of pre and postsynaptic activities. With the Hebbian trace, the strength of a connection at time \(t\) is determined by baseline weights \(w_{i,j}\) and plasticity parameter \(\alpha_{i,j}\) multiplied by \(Hebb_{i,j}\), and it defines the response of a given output neuron as in Equation (2). \[Hebb_{i,j}(t+1)=\eta\;x_{i}(t-1)x_{j}(t)+(1-\eta)Hebb_{i,j}(t) \tag{1}\]  
\[x_{j}(t)=\sigma\big{\{}\sum\bigl{[}w_{i,j}x_{i}(\;t-1)+\alpha_{i,j}Hebb_{i,j}(t )x_{i}(t-1)\bigr{]}\big{\}} \tag{2}\]  
There are many possible formulations of Hebbian plasticity rule. In the Equation (1), the weight decay term causes Hebbian traces decay thus causing memories decay, in the absence of input. We can turn to other Hebbian rules that perform better weight value stabilization and can prevent runaway divergence, like [PERSON]'s rule [66]. The computation of Hebbian trace implementing [PERSON]'s rule is given in Equation (3). \[Hebb_{i,j}(t+1)=Hebb_{i,j}(t)+\eta x_{j}(t)\Bigl{(}x_{i}(t-1)-x_{j}(t)Hebb_{i, j}(t)\Bigr{)} \tag{3}\]  
In Hebbian transfer learning, an episode is one-step of training using one batch of dataset. The lifetime of the training is the training of network using the entire dataset once.