# Few-Shot Relation Extraction on Ancient Chinese Documents
## 5 Experiments
### Overall Results  
To find a proper few-shot learning method for relation classification, we introduce and modify a few prevailing methods to few-shot relation classification tasks, while GNN, Meta Network, SNAIL, and Prototypical Networks have been implemented and clearly introduced in FewRel, We examined the rest of the models, and the comparison of all the results is illustrated in Table 5.  
Power transform has more improvement compared with the base model, partly because it maps original spread data to a Gaussian distribution, which revises the skew distribution of the data. Prototype rectification also performs pseudo-labeling that augments support samples, which rectifies the prototype and distributes it closer to the ideal one. These adjustments will prevent the deformative distribution of variables and degrade the effect of extreme values, which may predominate other values. For IADM, We eliminated the CNN layer and retained FFN as a scaling function \(g_{\phi}(x)\) according to the differences between the two environments. IADM has an improvement of 2.29% over the original model. In comparison with power transform, IADM also normalizes the data distribution. Moreover, IADM can better adjust the extreme value across the overall distribution with a scaling function, and this scaling can capture global features and map sparse data into a limited space. Accordingly, the model will be less influenced by the sparse distribution caused by a large-scale transformation operation. By contrast, the relation network did not achieve a noteworthy result. This model, which is proposed for image classification, has low performance on few-shot relation \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Batch Size & 1 \\ Learning Rate & 0.05/0.1 \\ Optimization Strategy & SGD \\ Train Iteration & 50,000 \\ Test Iteration & 10,000 \\ Weight Decay & \(1\times 10^{-5}\) \\ Word Embedding Dimension & 50 \\ Position Embedding Dimension & 5 \\ Hidden Size & 60 \\ Sentence Max Length & 40 \\ Training Class N & 20/10 \\ Evaluate Class N & 10/5 \\ Support Instance K & 5/1 \\ Query Instance Q & 5/1 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Model parameter settings. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **No.** & **5-w-1-s** \\ \hline Base model & 1 & 73.64 \\ \hline +PT & 2 & 74.50 \\ +PR & 3 & 74.40 \\ +Relation & 4 & 56.49 \\ +MANN & 5 & 73.52 \\ +IADM & 6 & 75.93 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Class predictor comparison, Model is the abbreviation for proposed model name and No. is their identification number (the same below). PT represents power transforms, PR represents prototype rectification, Relation represents the relation network for few-shot learning, MANN represents the memory aggregated neural network, and IADM represents the input-adaptive distance metric from the MCT model. classification tasks. This defect stems from the disparate structure of data, and the model cannot use transfer learning on these two tasks. MANN [26] can easily achieve great performance on the training dataset, but it seldom improved the performance on the development dataset. This phenomenon resulted from the MANN memory dump's overfitting. As shown in Figure 4, after 90,000 steps, the development accuracy remains unchanged, and the model cannot learn more patterns. With the refreshing memory dump saving all advantageous and suitable information, the model for each training step only overfits the current training query and support instances. In Table 6, we compared our model with other extant models on the FewRel 1.0 task. The result shows that MASCOT-PA has advantages over other no pretraining-based models, even outperforms the BERT-based TPN model and prototypical network in the 5-way-1-shot task, which proves that MASCOT-PA is excel at handling few-shot relation classification tasks. While it also exposes a drawback for MASCOT-PA.