GRADUAL: Granularity-aware Dual Prototype Learning for Better Few-Shot Relation Extraction (2024)

Abstract: Recent studies have shown that fusing text labels and context sentences is an effective method for learning prototype representations in few-shot relation extraction. However, the inconsistency of prototype representations across different few-shot tasks persists due to different context sentences for the same relation, even with the integration of text labels into prototype representations. Conversely, the text label for each relation is unique and consistent, 1)which prompts us to propose a dual prototype learning method. Unlike previous methods that only construct support-based prototypes, we additionally construct label-based prototypes. Furthermore, we introduce a graph-based prototype adjustment module to construct topological information between support-based and label-based prototypes, thereby generating a more effective similarity measure through a simple linear combination. In addition, relations of different granularities have different distribution widths in the same semantic space, the imbalanced distribution in the semantic space leads to a lack of comparability among relations. To create a more discriminative semantic space, 2)we propose a granularity-aware prototype learning method that unifies the distribution width of relations, making relations of different granularities have similar distribution widths. Experimental results on two public benchmark datasets show that our proposed methods achieve state-of-the-art performance in few-shot relation classification. The source code can be accessed via the following link: https://github.com/ysulizm/GRADUAL.

heading: 1 Introduction
text: Relation Extraction (RE) is a fundamental task in Natural Language Processing (NLP) that aims to extract semantic relations between entities from
∗ Equal contribution. † Correspondence author.
natural language text (Ma et al., 2023). However, obtaining high-quality RE annotation data is time-consuming and labor-intensive. To alleviate the burden of manual annotation, some researchers have adopted Distant Supervision (DS) (Mintz et al., 2009) or Semi-Supervised Relation Extraction (SSRE) (Sun et al., 2011) to obtain annotation information. However, these methods can lead to inaccurate annotations and are not adaptable to situations with only a few labeled examples. To solve the problem of data scarcity, inspired by human cognitive mechanisms, researchers have proposed Few-Shot Learning (FSL) (Han et al., 2018). FSL is dedicated to leveraging learned prior knowledge to quickly generalize to new tasks that only contain a few labeled training samples.
As a popular framework widely applied in fewshot tasks, Meta-Learning methods aim to learn the ability to learn quickly from experience and rapidly generalize to new subtasks (also known as meta-tasks) (Vinyals et al., 2016). Among them, Prototype Networks is a simple yet effective metric-based meta-learning method that aims to learn a metric space, and then classify query instances based on the distance between the query instances and the prototype representations (Snell et al., 2017).
Despite the fact that Prototype Networks based
13566
on Pretrained Language Models (PLMs) have shown excellent performance in Few-shot Relation Extraction (FSRE), the prototype representation can be further enhanced by introducing external information, specifically, relation information, which can be achieved by integrating specific relation representations into the prototype representation (Baldini Soares et al., 2019; Peng et al., 2020). Therefore, many recent studies on introducing label information into Prototype Networks have achieved notable achievements. For example, Han et al. (2021a) proposed a hybrid prototype network that generates hybrid prototypes based on context sentences and relation descriptions to learn better prototype representations. Recently, Liu et al. (2022) found that even in the 1-shot setting, directly adding the embedding of relation descriptions and support sample representations to generate prototype representations can achieve good results. As the state-of-the-art model for implementing FSRE tasks, Zhang and Lu (2022) proposed a label prompt dropout method, which further enhances the prototype representation by directly concatenating the label and context sentence as input.
Although the above methods have achieved good performance, these works only consider integrating label information into prototype representations to learn better prototype representations, ignoring the fact that different context sentences of the same relation can lead to inconsistent prototype representations among different few-shot tasks. This inconsistency persists even when text labels are integrated into the prototype representation. Conversely, the text label for each relation is unique and consistent across different few-shot tasks, which prompts us to propose a novel method called dual prototype learning method. This method constructs supportbased prototypes using context sentences, while using text labels to additionally construct label-based prototypes. Specifically, to enable the generated label-based prototypes to enhance the consistency of the support-based prototype in the same semantic space, we provide text labels and context sentences as input to the same encoder. A specific example of text labels and context sentences is shown in Figure 1. In addition, to enhance the consistency of support-based prototypes and better calculate the similarity between the prototype and the query instance, we employ a graph-based prototype adjustment module to construct the topology information between the support-based prototype
and the label-based prototype. Based on the topological information, the similarity measure between the support-based prototype, the label-based prototype, and the query instance is generated through a simple linear combination. The new similarity measure can effectively calculate the similarity degree between the prototype and query instances by integrating both support-based and label-based prototype measures.
In addition, we emphasize a potential problem in previous research, where relations of different granularities in the same semantic space have different distribution widths. This imbalanced distribution leads to a lack of comparability between these relations, thereby influencing the classification results, as shown in Figure 2(a) and Figure 2(b). To address this problem, we propose a granularityaware prototype learning method based on the dual prototype learning method. This method unifies the distribution widths of different relations in
each few-shot task, thus constructing a new semantic space with stronger discrimination, as shown in Figure 2(c) and Figure 2(d). Specifically, this method first calculates the area formed by the labelbased prototype, the support-based prototype, and the query instance. The area’s size indicates the granularity of the relations, with larger areas denoting greater granularity. Then, the distribution width of relations in the same semantic space is adjusted according to their granularity. Notably, in our Granularity-aware Dual Prototype Learning Method (GRADUAL), relations of different granularities have similar distribution width in the same semantic space.
The main contributions of this paper are as follows:
• We propose a novel dual prototype learning method that includes a graph-based prototype adjustment module. This simple yet effective method outperforms previous approaches that required additional encoders or complex graph-based network structures to integrate text labels and context sentences.
• We introduce a granularity-aware prototype learning method based on the dual prototype learning method. This method unifies the distribution width sizes of different granularity relations for each few-shot task in the same semantic space, leading to the creation of a new semantic space with stronger discriminative power.
• We conduct extensive evaluations of GRADUAL under four few-shot settings on popular large-scale benchmark datasets for FSRE. The results demonstrate that our method outperforms existing state-of-the-art methods in FSRE tasks.

heading: 2 Related Work
text: Few-Shot Relation Extraction. Few-Shot Relation Extraction (FSRE) is an emerging field that extends Few-Shot Learning (FSL) to Relation Extraction (RE), enabling rapid adaptation to unseen relations with a small number of annotated instances (Garcia and Bruna, 2018). With the release of the large-scale benchmark dataset FewRel, FSRE has received increasing attention (Han et al., 2018; Gao et al., 2019). Current research on FSRE primarily falls into two categories: (1) Methods based on Pretrained Language Models (PLMs), which further train PLMs on RE tasks to obtain better semantic space representations, such as MTB (Baldini Soares et al., 2019), CP (Peng et al., 2020), MapRE (Dong et al., 2021), LPD (Zhang and Lu, 2022), and others. (2) Methods based on Metric Learning, which aim to map the to-be-classified samples and the known classified samples to the same semantic space to compare their similarities (Li et al., 2024). Metric-based methods are nonparametric, easier to implement, and have shown strong performance in a series of few-shot tasks (Triantafillou et al., 2019). Therefore, they have been widely used in recent FSRE research, including Siamese Networks (Chen and He, 2021), Matching Networks (Han et al., 2020), Graph Neural Networks (Xie et al., 2020), and Prototype Networks (Snell et al., 2017). Among these, Prototype Networks has become the mainstream method for FSRE due to its efficiency. Prototype Networks. Existing methods based on Prototype Networks often introduce external information (such as relation information) to enhance prototype representation, which is a key part of improving FSRE performance (Wu et al., 2024). Some methods add relation information to enhance prototype representation (Liu et al., 2022; Li et al., 2022). For example, Zhenzhen et al. (2022) employed a joint training method to learn the prototype encoder from relation definitions to enhance prototype representation. Other methods utilize relation information to highlight intra-class similarity and inter-class differences through contrastive learning (Wang et al., 2022) and graph representation learning (Yu et al., 2022). For instance, Li and Qian (2022) constructed a graph-based model generation framework to generate classification models according to the context sentence and text labels. Besides, some methods alleviate the distortion of prototype representation in the prototype network by storing prototype representations in memory through continual learning (Chen et al., 2023). Summary. All the aforementioned methods have demonstrated the importance of high-quality prototype representation for FSRE. However, these methods also overlook the fact that relations of different granularities lead to imbalanced distribution in the semantic space. This imbalanced distribution reduces the model’s performance and generalization ability. (1) To avoid introducing a large amount of irrelevant external information that can
mislead the model in learning false relevance, we only introduce relation information to enhance prototype representation in our dual prototype learning method. Furthermore, (2) to improve the semantic space’s expressiveness, we propose a granularityaware prototype learning method. This method transforms the imbalanced distribution of relations of different granularities in the semantic space into a similar distribution, thus creating a new semantic space with greater differentiation for FSRE.

heading: 3 Problem Formulation
text: We follow the typical few-shot task setting, namely the N -way-K-shot setup (Han et al., 2018). In each few-shot task, each instance c includes context sentence tokens x = {x0, ..., xm}, head entity ehead = {eheadstart, eheadend } and tail entity etail = {etailstart, etailend}. The corresponding label y = {ytext, ynum} to c contains a textual label ytext and a label index ynum, where x0 = [CLS] and xm = [SEP] represent the start and end positions of tokens, eheadstart and e tail start represent the start positions of entities, and eheadend and e tail end represent the end positions of entities. Each N -way-K-shot task contains a support set S = {sij ; i = 1, ..., N, j = 1, ...,K} and a query set Q = {qi; i = 1, ...,M}, where S contains N relations, each relation has K different labeled instances, and Q contains M unla-
beled instances. The aim of the few-shot task is to predict the correct label y for each query instance q in the query set.
Our model follows meta-learning setup during training (Vinyals et al., 2016), which consists of two stages: the meta-training stage and the metatesting stage. The datasets for the meta-training and meta-testing stages are respectively referred to as the meta-training dataset Dtrain and the metatesting dataset Dtest, with no overlapping relations between them. The meta-training dataset is divided into support instances s and query instances q to enable the model to gain transferable knowledge and the ability to “learn to learn”. Unlike traditional model training methods, FSL, after integrating the concept of meta-learning, treats the meta-task as the training unit.

heading: 4 Methodology

heading: 4.1 Model Overview
text: The overview of our proposed model, GRADUAL, is shown in Figure 3. It mainly consists of 3 parts: (1) An encoder based on Pretrained Language Models (PLMs). (2) A graph-based prototype adjustment module in the dual prototype learning method. This module first constructs the topological information between the support-based prototype and the label-based prototype, and then generates a new
similarity measure by combining different inputs (similarity measures between the support-based prototype and query instances, and between the label-based prototype and query instances) and the corresponding topological information through a simple linear combination. (3) A granularity-aware layer in the granularity-aware prototype learning method. The granularity-aware layer uses the area size between the support-based prototype, the labelbased prototype, and the query instance to measure relations of different granularities in each few-shot task.

heading: 4.2 Encoder
text: Among various types of encoders used for relation extraction, encoders based on Pretrained Language Models (PLMs) have achieved notable results due to their impressive performance in capturing extensive general semantic knowledge. According to existing research, we adopt BERTBASE, CP, and LPD as encoders to generate semantic information for all instances. For each support instance, to better utilize the implicit knowledge obtained by the encoder during training, we follow the settings of Zhang and Lu (2022), using the relation description and colon as label prompts to guide the output of the PLMs-based encoder. To construct a natural language sentence for each instance, we concatenate the label prompt with the context sentence. For example, in Figure 1, the context sentence “Paris will hold the 2024 Summer Olympics” concatenated with the corresponding label prompt becomes “where an event or activity is taking place: Paris will hold the 2024 Summer Olympics”. For each query instance, we use the context sentence without any label prompts. For each label instance1, following the settings of Liu et al. (2022), we concatenate the label name with the label description, separated by a colon. For example, in Figure 1, the label name “location of the event” concatenated with the corresponding label description becomes “location of the event: where an event or activity is taking place”.
Subsequently, we introduce special tokens in each instance to distinguish head and tail entities, as well as to mark the start and end of context sentences. Specifically, we add [E1][/E1] and [E2][/E2] tokens at the positions of the head and
1In this study, the terms text label and label instance are different. Text labels contain label names and label descriptions, and label instances are concatenated by label names and label descriptions.
tail entities, and insert [CLS] and [SEP] tokens at the start and end of instances. The support instance mentioned earlier is thus represented as “[CLS] where an event or activity is taking place: [E1] Paris [/E1] will hold the [E2] 2024 Summer Olympics [/E2]. [SEP]”. The label instance becomes “[CLS] location of the event: where an event or activity is taking place. [SEP]”. Finally, the parsed instances are mapped into the semantic space through the encoder to obtain the corresponding text embeddings. We follow the settings of Li and Qian (2022). to obtain each instance representation. The representations of support and query instances are as follows:
s = hse1 ⊕ hse2 q = hqe1 ⊕ hqe2
(1)
where s and q represent the representations of support and query instances respectively, he1 and he2 represent the embeddings of special tokens [E1] and [E2], and ⊕ represents concatenation operation. The representation of the label instance as follows:
r = h0 ⊕ ∑n
i=1 hi n
(2)
where h0 represents the embedding of the special token [CLS], and n represents the number of tokens in the text embedding.

heading: 4.3 Dual Prototype Learning Method
text: Obtaining high-quality prototype representations is crucial to improve the performance of FSRE. Therefore, existing methods consider integrating label information into prototype representations to learn more effective prototype representations. However, different context sentences of the same relation can lead to inconsistent prototype representations across different few-shot tasks.To address this issue, we propose a dual prototype learning method that alleviates this inconsistency by generating consistent label-based prototypes. To more effectively calculate the similarity between prototypes and query instances, we introduce a graphbased prototype adjustment module. This module first constructs topological information between support-based prototypes and label-based prototypes, and then generates a new similarity measure based on topological information by integrating both support-based and label-based prototype measures.
For each N -way-K-shot task, the support-based prototype ps for each relation is obtained by aver-
aging the representations of K support instances in that relation, as described by Snell et al. (2017). The support-based prototype ps as follows:
ps = 1
K
K∑
i=1
si (3)
Meanwhile, The label instance representation for each relation is directly used as the label-based prototype pr in that relation. The label-based prototype pr as follows:
pr = r (4)
Subsequently, we use the Euclidean distance as our similarity measure function to calculate the degree of similarity between various instances. For each N -way-K-shot task, the Euclidean distance between the query instance and the support-based prototype as follows:
dpsq = d(ps, q) (5)
where d(·) represents the Euclidean distance. The Euclidean distance between the query instance and the label-based prototype as follows:
dprq = d(pr, q) (6)
In the graph-based prototype adjustment module, to construct topological information between the support-based prototype and the label-based prototype, we consider the support-based prototype and all label-based prototypes as nodes in the graph and then establish edges between the nodes. Specifically, for each N -way-K-shot task, we first calculate the Euclidean distance between the supportbased prototype and all label-based prototypes as follows:
dpspr = d(ps, pr) (7)
and we can get the smallest Euclidean distance as follows:
dpsmin = arg min i∈{1,...N} d(pspri) (8)
We then calculate the ratio of dpsmin to dpspr as λ, which represents the edge between nodes, as follows:
λ = dpsmin dpspr
(9)
In our graph, the edge represents the ratio of the similarity measure between two nodes of the
support-based prototype and the label-based prototype that need to be reduced to make them belong to the same label. Finally, according to the topological information in the graph, we generate a new similarity measure by integrating both supportbased and label-based prototype measures through a simple linear combination:
dpsprq = dpsq + λdprq (10)

heading: 4.4 Granularity-aware Prototype Learning Method
text: To alleviate the imbalanced distribution of different granularity relations in the same semantic space, we unify the distribution width of different relations, thereby constructing a new semantic space with more discrimination. Specifically, in the granularity-aware layer, we first calculate the area A formed by the label-based prototype, the support-based prototype, and the query instance as follows:
A = √ p(p− dpsq)(p− dprq)(p− dprps)
p = dpsq + dprq + dprps
2
(11)
We then unify the distribution width of different relations in each few-shot task, so that different granularity relations have similar distribution widths. Therefore, the new similarity measure dpsprq obtained by our dual prototype learning method becomes dApsprq, as follows:
dApsprq = dpsprq A (12)
Subsequently, we use dApsprq as the logit in the cross-entropy loss as follows:
L = − N∑
i=1 log exp (dApsipriq)∑N j=1 exp (d A psj prj q ) (13)
We calculate the gradient by using the crossentropy loss and process the gradient update on the encoder to make our model reach the optimal point.

heading: 5 Experimental Setup

heading: 5.1 Datasets
text: Our GRADUAL is evaluated on the FewRel 1.0 (Han et al., 2018) and the domain adaptation part of FewRel 2.0 (Gao et al., 2019) datasets. FewRel 1.0
consists of 100 relations, with each relation containing 700 labeled instances. Our experiments follow the split used in the official benchmark test, where the dataset is divided into 64 base relations for training, 16 relations for validation, and 20 new relations for testing. Unlike FewRel 1.0, which conducts training and testing in the same Wikipedia domain, FewRel 2.0, which has domain adaptation capabilities, conducting training in the Wikipedia domain and testing in the biomedical domain to evaluate the model’s domain transferability. Since the labels of the test sets for FewRel 1.0 and FewRel 2.0 are not publicly accessible, we submit the model’s predicted results to CodaLab to obtain the accuracy of the test set.

heading: 5.2 Compared Methods
text: We compare GRADUAL with 17 existing baselines. According to the type of encoder, we divide these baselines into three groups: standard BERTbased baselines, BERT-based baselines that introduce external information, and baselines based on pre-trained language models (PLMs).
In the group of standard BERT-based baselines, 1) Proto-BERT (Han et al., 2018) is a prototype network that uses BERT as the encoder. 2) MAML (Finn et al., 2017) is an optimization-based meta-learning method. 3) GNN (Satorras and Estrach, 2018) is a graph neural network-based metalearning method. 4) BERT-PAIR (Gao et al., 2019) is a sequence classification model that measures the similarity between two instances.
In the group of BERT-based baselines that introduce external information, 5) REGRAB (Qu et al., 2020) and 6) ConceptFERE (Yang et al., 2021) model different relations by leveraging a global relation graph and the inherent concepts of entities, respectively. 7) CTEG (Wang et al., 2020) is a model that decouples high co-occurrence relations with various external information. 8) TD-Proto (Yang et al., 2020) enhances the prototype network by introducing text descriptions of Wikidata. 9) HCRP (Han et al., 2021a) distinguishes task complexity by introducing relation descriptions. 10) DRK (Wang et al., 2022) uses a rule-based knowledge method to alleviate prediction confusion. 11) SimpleFSRE (Liu et al., 2022) directly integrates relation descriptions into prototype representations. 12) GM_GEN (Li and Qian, 2022) constructs topological information to generate specific classification models.
In the group of PLMs-based baselines, 13) MTB
(Baldini Soares et al., 2019) is a pre-trained model for matching blank tasks based on BERTLARGE. 14) CP (Peng et al., 2020) proposes an entity masking pre-trained framework based on contrastive learning. 15) LDUR (Han et al., 2021b) develops a supervised contrastive pre-trained method for learning discriminative representations. 16) MapRE (Dong et al., 2021) additionally uses a relation encoder during pre-training to consider relation information. 17) LPD (Zhang and Lu, 2022) proposes a label prompt dropout method by directly concatenating labels and context sentences. In addition, HCRP (CP), SimpleFSRE (CP), and GM-GEN (CP) are standard CP-based baselines. To make a fair comparison with these baselines, our GRADUAL provides experimental results with BERTBASE, CP, and LPD as encoders.

heading: 5.3 Implementation Details
text: We conduct our experiments on servers equipped with 24GB NVIDIA RTX 3090. We use uncased BERTBASE, CP, and LPD as instance encoders for fair comparison with other models, and optimize our GRADUAL with AdamW (Loshchilov and Hutter, 2019). BERTBASE, CP, and LPD are all composed of 12 layers of transformer modules; in addition, CP is further pre-trained through contrastive learning, while LPD introduces a label prompt dropout method and combines it with contrastive learning for further pre-training. Table 5 shows the detailed hyperparameters. To obtain the accuracy of the test set, we follow the official evaluation settings and submit the predicted results to the FewRel leaderboard. In Table 1 and Table 2, we report the average accuracy and standard deviation of 5 runs with different random seeds.

heading: 6 Results and Analyses

heading: 6.1 Main Results
text: The comparison results of FewRel 1.0 and 2.0 are shown in Table 1 and Table 2, respectively. The detailed information of the baseline methods compared is provided in Chapter 5.2. In addition, we directly utilize the settings and results from GMGEN and LPD for FewRel 2.0. Our findings from the comparison results are as follows: (1) GRADUAL effectively addresses the FSRE problem. As shown in Table 1 and Table 2, our proposed GRADUAL significantly outperforms all methods that use the same encoder. Moreover, we find that among the compared baseline
methods, those based on LPD perform better than those using CP and BERT, and methods based on CP also perform better than those based on BERT. However, the accuracy of BERT-based GRADUAL can be higher than some of the CP-based baseline methods, and the accuracy of CP-based GRADUAL can be higher than some of the LPD-based baseline methods. This shows that compared to these advanced baseline methods, our GRADUAL can solve the FSRE problem more effectively. (2) GRADUAL makes better use of external information. As shown in Table 1, our proposed GRADUAL outperforms all BERT-based baselines that introduce external information. This is because our dual prototype learning method uses label infor-
mation to generate consistent prototype representations for each relation, and combines support-based prototype measurements and label-based prototype measurements into a new similarity measurement by constructing topological information between prototypes, which helps the model to obtain higher quality prototype representations.
(3) GRADUAL has robust generalization capabilities. As shown in Table 2, compared to other baseline methods, GRADUAL demonstrates better adaptability to unknown data from different domains. This superior adaptability is due to our introduction of a granularity-aware prototype learning method based on the dual prototype learning method. By transforming the imbalanced distribution of relations of different granularities in the same semantic space into a similar distribution, we construct a new semantic space with greater discrimination for FSRE. This new semantic space shows excellent adaptability to unknown data of relations of different granularities from different domains.
To further demonstrate the superiority of our model, an anomaly analysis is conducted on specific values of Table 2. Specifically, the accuracy of
GM_GEN using the BERT encoder is 84.84, which is lower than the accuracy of our CP-based GRADUAL at 86.19 but higher than our BERT-based GRADUAL at 83.72. Notably, among the four paradigms, the 10-way-1-shot and 5-way-1-shot paradigms are the most challenging, and our model achieves the highest accuracy in both paradigms using the same encoder. Therefore, when using the same BERT encoder in the FewRel 2.0 dataset, our model’s performance is indeed superior to GM_GEN.

heading: 6.2 Ablation Study
text: We conduct several ablation experiments on the Fewrel dataset using GRADUAL to examine the relative contributions of different components in the model shown in Table 3. Here, DUAL represents the dual prototype learning method, GRADUAL represents a granularity-aware prototype learning method built on DUAL, and DUAL_Base and GRADUAL_Base represent methods without the graph-based prototype adjustment module. (1) Graph-based prototype adjustment module. From Table 3, we find that after incorporating the graph-based prototype adjustment module into the method, the accuracy of the method significantly improved. This suggests that the graphbased prototype adjustment module in the dual prototype learning method can indeed enhance the prototype representation, thereby making the generated similarity measures more appropriate for FSRE. (2) Granularity-aware layer. We also find from Table 3 that the accuracy of GRADUAL increased relative to DUAL, demonstrating the effectiveness of the granularity-aware layer in GRADUAL. However, when BERT is used as the encoder in the experiments on the FewRel 2.0 dataset, we observe a decrease in accuracy in some results. The decrease in accuracy is due to the oversimplification of the granularity measurement method, indicating that there is potential for improvement in our
granularity measurement method.

heading: 7 Conclusions
text: In this work, we introduce GRADUAL, an innovative method designed for Few-Shot Relation Extraction (FSRE). GRADUAL enhances the performance and generalization capability of the model by generating more consistent prototype representations for each relation and constructing a more discriminative semantic space for different relations. Firstly, we first combine the metrics of supportbased prototypes and label-based prototypes into a new similarity metric by constructing topological information between prototypes, which helps the model to get high-quality prototype representations. Secondly, to enhance the expressive power of the semantic space, we measure the granularity of different relations by the area size between the prototype and the query instance. By transforming the imbalanced distribution of different granularity relations in the same semantic space into a similar distribution, we construct a more discriminative semantic space. Extensive experiments have demonstrated that our GRADUAL significantly outperforms previous works. In future research, we plan to apply GRADUAL to more information extraction tasks across various domains and examine its robustness.

heading: 8 Limitations
text: Despite GRADUAL achieves new state-of-the-art performance in FSRE, it still has several limitations. Firstly, we combine two prototype representations using simple topological information, but more advanced combination methods could yield higher quality prototype representations. Secondly, our method for measuring granularity is relatively simple. Although it is effective, we believe that more advanced methods for measuring granularity could further improve the model performance. Lastly, we have not yet explored the effectiveness of GRADUAL in other text classification tasks, such as intent classification. We believe these areas present promising directions for future research.

heading: Acknowledgments
text: This work has been partially supported by the grants from S&T Program of Hebei No.20375001D; Project of Hebei Key Laboratory of Software Engineering, No.22567637H, No.ZZYB2302.

heading: A Analysis of the Effectiveness of the granularity-aware layer
text: From Figure 4, we can find that the accuracy of GRADUAL is consistently higher than that of DUAL, indicating that the granularity-aware layer
can effectively help the model construct a more discriminative semantic space, thereby improving its performance in FSRE. In addition, due to the superior performance of the LPD encoder over BERT and CP encoders, the method using LPD generates fewer local optimal points during the training process. From Table 4, we find that the standard deviation of GRADUAL is generally lower than that of DUAL, suggesting that the granularity-aware layer can not only improve the performance of the model, but also further enhance the stability of the model.

heading: B Analysis of the Effectiveness of Graph-Based Prototype Adjustment Module
text: To help us study the importance of the graph-based prototype adjustment module in GRADUAL, we introduce a hyperparameter α into λ, hence the original Formula 9 now becomes as follows:
λ = ( dpsmin dpspr )α (14)
From Figure 5, we can observe that the variation of λ indeed significantly impacts the accuracy of GRADUAL. Since λ mainly affects the label-based prototype, this shows the necessity of the labelbased prototype, and also shows that our proposed dual prototype learning method can obtain higherquality prototype representations.

heading: C Hyperparameters of GRADUAL

heading: Future Work
text: We believe these areas present promising directions for future research