# Transfer Learning for Multi-Premise Entailment with Relationship Processing Module
## 3 Methods
### Three-Step Training  
In theory, we hope that the R module is relatively independent. The other parts of the model, namely the encoding layer and inference layer, does the same work in the MPE task as in the SPE task. This means that we can easily transfer the model used for SPE tasks to MPE tasks, and its frame and parameters can be relatively complete and collaborative to transfer.  
Therefore, we have to ensure that the R module has the independence of completing only specific tasks in the matching process. We try to achieve this goal in training and propose the three-step training in Algorithm 1:  
```
Input: Single-premise entailment data set \(S\), multi-premise entailment data set \(T\) Output: MPE task model \(M_{2}\)
1 SPE model parameter pre-training: use the Siamese framework and SPE data \(S\) to train the SPE model to obtain the model \(M_{0}\), and its corresponding encoding layer parameters \(\theta_{E}\) and inference layer parameters \(\theta_{I}\);
2 Training of multi-premises fusion model R: (a) As shown in Figure 4, a suitable fusion model R is selected to fuse multiple premise vectors into one premise vector to obtain the MPE task model \(M_{1}\). (b) Initialize the model R, and set its parameter to \(\theta_{R}\). (c) Freeze the parameters \(\theta_{E}\) and \(\theta_{I}\), use MPE data T to train the model \(M_{1}\), update the parameters \(\theta_{R}\). Update the preliminary MPE model \(M_{1}\).
3 Fine-tune the final model: (a) Unfreeze the parameters \(\theta_{E}\) and \(\theta_{I}\) of the model \(M_{1}\). Then, set the joint parameters \(\theta=(\theta_{E},\theta_{I},\theta_{R})\), named \(M_{2}\) model. (b) Use the MPE data T again to train the \(M_{2}\) model, update the parameters \(\theta\), and get the final MPE task model \(M_{2}\).
```  
**Algorithm 1**Three-step training.  
In the three-step training, the first step is to use SPE data for pure SPE model training. In the Siamese framework, the encoding layer will learn how to encode context-free word vectors for sentence representations, and the inference layer will learn how to process both premise representation and hypothesis representation for classification results. In the second step, the weight parameters of the SPE model are frozen, the R module Learning the fusion method of multiple premise vectors, i.e., the relationship from multiple premises and their good fusion, which ensures the relative independence of the R module in the matching process. In the third step, all weight parameters are defrosted. Pre-trained parameters and R module parameters are trained together at a small learning rate to avoid the previously learned parameters being disrupted by large steps. Besides, the purpose of this step is also to learn a task-specific classification layer.  
The R module design should fully consider the following ideas: (a) It should be independent of the encoding layer and the inference layer. (b) It should have the ability to fully integrate information between multiple premises. (c) The fused vector should be able to be accepted by the inference layer. If average pooling or maximum pooling is used with no parameters, they are treated as a particular case without using the second step of the three-step training. We propose using the attention-backtracking mechanism to build R modules.