## 3 Materials and Methods
### Features Extracted through XLNet Model  
XLNet is an improved model for BERT proposed by scholars from Carnegie Mellon University and the Google AI Brain Team in 2019 [18]. Unlike the self-coding language model method based on BERT dependency masks, XLNet adopts an autoregressive language model to avoid the problem of ignoring dependencies between mask positions in BERT and the negative impact of artificially introducing \"[MASK]\" markers. Meanwhile, XLNet overcomes the drawbacks of traditional autoregressive models, which can only utilize unidirectional information, by introducing a bidirectional context learning method based on self-coding language models. In addition, it replaces the Transformer in BERT with Transformer XL. This new neural network framework has a segment-level recurrence mechanism (segment-level recurrence with state reuse) and a new location coding strategy (relative positional encoding), which can not only break through the limitation of fixed context length in language modeling of Transformer, thus learning long-distance dependencies in text sequences, but also solve the problem of context fragmentation [17] and improve the overall performance of the model. The most prominent feature of XLNet compared to BERT and other models is that it introduces the Transformer XL framework to solve the problem of long text dependencies. This is of great significance for the research presented in this paper: PGTs are long, structurally complex, and diverse. However, owing to fixed length limitations, the traditional Transformer framework cannot effectively capture the semantic connections between segments, leading to BERT's inability in terms of long-term text dependency. Regarding specific methods, Transformer-XL introduces a recurrence mechanism between segments so that each segment does not need to start entirely from scratch during calculation but can learn from the information of the previous segment [17]. The output of the hidden layer in the previous section enables the model to accumulate long-term dependencies during the training phase. Furthermore, the model can learn longer distance dependencies in the text during testing. For the HTMC-PGT problem (see Definition 3 in Section 2 of this paper), each classifier in the classifier tree must use XLNet for feature extraction, which is time-consuming. Therefore, this study separates the feature extraction layers that commonly exist in a single classifier in other studies and places them in the data preprocessing stage to maintain the simplicity of each classifier in the next stage, thereby improving the overall training and testing efficiency of the model. In the data preprocessing stage, the PGT is first split into paragraphs of consistent length. Then, the words of each paragraph are input into XLNet's pretraining model to extract the corresponding char-level semantic features, forming a char-level semantic feature matrix based on segments. Meanwhile, based on the algorithmic advantages of XLNet for solving long-distance dependencies, the hidden layer information of the previous paragraph is also input into XLNet's pretraining model when calculating each paragraph, thus preserving the long-distance dependencies between the long-text paragraphs [17] (Figure 5). The preprocessing first involves cropping all texts in the PGT set to a fixed length and dividing them into multiple segments. If the length of the text is insufficient, it is filled with placeholders. Then, the fixed length document set is denoted as \(D\) and the individual documents in the set are denoted as \(D_{i}\), where the number of PGT set \(D\) is noted as \(m\), and \(i=1,\cdots,m\). Therefore, the PGT set \(D\) can be represented as a matrix form of \(D_{i}\):  
\[D=|D_{1}D_{2}\cdots D_{m}| \tag{5}\]  
Each PGT \(D_{i}\) can be divided into several fixed-length segments, the number of which is \(n\).