Multi-Head Hierarchical Attention Framework with Multi-Level Learning Optimization Strategy for Legal Text Recognition  
[PERSON]  
1 Big Data Research and Development Center, North China Institute of Computing Technology,  
flat classification methods, hierarchical multi-label classification tasks require capturing the associations between texts and categories, as well as taking into account the hierarchical relationships and correlations between categories. However, increasing the number of categories and hierarchical levels introduces challenges such as an imbalanced sample distribution and semantic similarity between hierarchical labels [3; 4], further complicating the task. Legal text classification tasks exhibit distinct characteristics compared with traditional multi-label text classification, including stronger semantic reasoning logic embedded in labels and limited labeled samples. Identifying these labels requires contextual semantic analysis combined with factual content and underlying legal logic, further increasing task complexity. An example of a legal text classification task is shown in Figure 1. For a factual description of a loan relationship case, the deep-level labels (level-3) include \"joint liability guarantee, scope of guarantee, other costs for realizing creditor's rights, guarantee period, attorney fee\". The intermediate-level labels (level-2) are \"guarantee, scope of guarantee, other costs, period of duty guarantee, other costs\", while the shallow-level labels (level-1) comprise \"guarantee, guarantee, calculation of private lending principal,'statute of limitations, period of duty guarantee, exclusion period', calculation of private lending principal\". Here, the level-3 labels \"joint liability guarantee\" and \"scope of guarantee\" both fall under the level-1 category \"guarantee\", whereas the level-3 label \"guarantee period\" belongs to the level-1 category \"statute of limitations, period of duty guarantee, exclusion period\". Although \"joint liability guarantee\", \"scope of guarantee\", and \"guarantee period\" all appear to relate to \"guarantee\" on the surface, legally, they belong to two distinct categories. Accurate classification requires literal interpretation and precise legal semantic analysis. Scholars have dedicated efforts to exploring efficient and accurate hierarchical text classification methods to address the aforementioned challenges. Several studies have proposed model design strategies incorporating hierarchical structures to tackle issues such as class imbalance and hierarchical relationship modeling. [PERSON] et al. [5] employed directed graphs to represent hierarchical labels and used a hierarchy-sensitive structural encoder to model labels, effectively integrating hierarchical label information into text and label semantics. [PERSON] et al. [6]'s hierarchy-aware semantics matching network (Hi-Match) performs representation learning on texts and hierarchical labels, using separate text and label encoders to extract semantic features. The model then calculates correlations between text and label embeddings within a joint semantic embedding space to identify multi-label types, defining distinct optimization objectives based on the two representation vectors to enhance hierarchical multi-label text classification performance. However, these methods suffer from insufficient semantic representation of label hierarchies and the inability to resolve imbalanced sample distribution. An increasing number of researchers have recently adopted contrastive learning approaches to optimize hier  
Figure 1: The task of multi-label recognition of legal text. representation and address sample distribution imbalance. [PERSON] et al. [7] introduced a hierarchy-aware and label balanced model (HALB), which utilizes multi-label negative supervision to push text representations of samples with different labels further apart.