Reasoning for Hierarchical Text Classification: The Case of Patents
Organizations: University of Cambridge · National Science Library, Chinese Academy of Sciences · Department of Information Resources Management, School of Economics and Management, University of Chinese Academy of Sciences
Abstract
Hierarchical text classification (HTC) assigns documents to multiple levels of a pre-defined taxonomy. Automated patent subject classification represents one of the hardest HTC scenarios because of professional difficulties and extensive labels. Prior approaches only output a flat label set, which offers little insight into the reason behind predictions. Therefore, we propose Reasoning for Hierarchical Classification (RHC), a novel framework that reformulates HTC as a step-by-step reasoning task to sequentially deduce hierarchical labels. RHC trains large language models (LLMs) in two stages: a cold-start stage that aligns outputs with chain-of-thought (CoT) reasoning format and a reinforcement learning (RL) stage to enhance multi-step reasoning ability. RHC demonstrates four advantages in our experiments. (1) Effectiveness: RHC surpasses previous baselines and outperforms the supervised fine-tuning counterparts by approximately 3% in accuracy and macro F1. (2) Explainability: RHC produces natural-language justifications before prediction to facilitate human inspection. (3) Scalability: RHC scales favorably with model size with larger gains compared to standard fine-tuning. (4) Applicability: Beyond patents, we further demonstrate that RHC achieves state-of-the-art performance on other widely used HTC benchmarks, which highlights its broad applicability.
Figures & tables
| Hierarchical Level | #Labels | Example Label | Example Label Description |
| Section | 8 | A | Human necessities |
| Class | 129 | A01 | Agriculture; forestry; animal husbandry; hunting; trapping; fishing |
| Subclass | 639 | A01C | Planting; sowing; fertilising |
| Group | 7,314 | A01C 3 | Treating manure; manuring |
| Subgroup | 61,397 | A01C 3/06 | Manure distributors, e.g., dung distributors |
| Dataset Split | Source | Year | #Section | #Class | #Subclass | #Docs | Text Type |
| US Patents (Train) | USPTO | 2011–2017 | 8 | 117 | 500 | 22,500 | Claims |
| US Patents (Test) | USPTO | 2011–2017 | 8 | 117 | 500 | 2,500 | Claims |
| EU Patents (Test) | EPO | 2024 | 8 | 115 | 437 | 2,845 | Claims |
| US Patents | EU Patents | |||||||||||
| Model / Setting | Section | Class | Subclass | Section | Class | Subclass | ||||||
| Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | |
| Baselines (SFT) | ||||||||||||
| BERT ( Lee and Hsiang, 2020 ) | 77.1 | 76.0 | 60.8 | 55.0 | 45.5 | 44.1 | 69.1 | 66.7 | 50.8 | 45.8 | 36.9 | 30.8 |
| XLNET ( Haghighian Roudsari et al., 2022 ) | 77.8 | 77.2 | 62.4 | 59.4 | 49.2 | 48.5 | 71.8 | 69.8 | 55.8 | 50.7 | 42.4 | 37.2 |
| BERT-for-Patent ( Chikkamath et al., 2022 ) | 82.1 | 82.1 | 68.7 | 66.7 | 56.7 | 56.1 | 76.1 | 74.6 | 61.6 | 58.0 | 49.6 | 43.9 |
| Input Claim: 1. A multi-phase clock signal generator, comprising: a delay-locked loop having a first multi-tap adjustable delay line configured to delay a reference signal to provide a plurality of clock signals having different phases relative to the reference clock signal; and a second multi-tap adjustable delay line coupled to the delay-locked loop to receive a delay control signal and a periodic signal having a 50-percent duty cycle and the same period as the reference clock signal, the second multi-tap adjustable delay line configured to delay the periodic signal according to the delay control signal from the delay-locked loop to provide a plurality of clock signals having different phases relative to the periodic signal. |
| Gold Main Label: H03L |
| Model Output: Step 1 — Section Brief Justification: The invention concerns electronic signal generation and control using electronic circuits (delay-locked loop, delay lines). Decision: H . Step 2 — Class Brief Justification: It focuses on fundamental electronic circuitry for generating and manipulating clock signals, which falls under basic electronic circuit arrangements. Decision: H03 . Step 3 — Subclass Brief Justification: The core is a delay-locked loop with delay lines for phase control—i.e., automatic control of signal phase/oscillation frequency. Decision: H03L . |
| H: Electricity |
| H03: Electronic circuitry |
| H03L: Automatic control, starting, synchronisation, or stabilisation of generators of electronic oscillations or pulses |
| Model / Setting | Micro F1 | Macro F1 |
| Previous SOTA | ||
| HCL-MTC ( Zhang et al., 2025 ) | 86.47 | 81.02 |
| Ours | ||
| Qwen-2.5-7B-SFT | 85.15 | 82.54 |
| Qwen-2.5-7B-RHC | 87.13 | 83.82 |
| US Patents | EU Patents | |||||||||||
| Model / Setting | Section | Class | Subclass | Section | Class | Subclass | ||||||
| Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | |
| Llama-3.1-8B-RHC | 83.1 | 82.5 | 70.9 | 66.0 | 59.0 | 57.1 | 75.5 | 73.6 | 61.2 | 55.9 | 48.4 | 41.4 |
| w/o Base SFT | 81.6 | 81.3 | 68.0 | 61.8 | 53.5 | 49.2 | 76.1 | 75.0 | 60.3 | 53.4 | 46.9 | 38.5 |
| w/o Cold Start | N/A | |||||||||||
| w/o GRPO | 75.4 | 74.7 | 58.5 | 50.1 | 45.2 | 39.4 | 71.1 | 70.0 | 54.2 | 46.5 | 40.6 | 32.1 |
| US Patents | EU Patents | |||||||||||
| Model | Section | Class | Subclass | Section | Class | Subclass | ||||||
| Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | |
| Qwen-2.5-0.5B-SFT | 80.6 | 80.2 | 66.5 | 63.1 | 53.2 | 52.4 | 74.7 | 72.6 | 57.6 | 52.9 | 44.3 | 39.1 |
| Qwen-2.5-0.5B-RHC | 80.9 | 80.5 | 66.4 | 62.2 | 52.8 | 51.1 | 74.4 | 72.7 | 57.9 | 52.1 | 45.2 | 38.4 |
| Qwen-2.5-3B-SFT | 81.0 | 80.6 | 68.5 | 65.4 | 56.0 | 55.3 | 74.3 | 73.2 | 59.6 | 54.8 | 47.6 | 42.0 |
| Qwen-2.5-3B-RHC | 81.8 | 81.8 | 69.2 | 64.5 | 57.3 | 56.4 | 75.6 | 73.6 | 60.8 | 56.1 | 48.6 | 42.6 |
| Example 1 |
| Input Claim: 1. An isolated regulatory element that drives transcription in a constitutive manner, wherein the regulatory element comprises a nucleotide sequence selected from the group consisting of: a) the nucleotide sequence of SEQ ID NO: 1, 2 or 3; and b) a sequence comprising a functional fragment of the nucleotide sequence set forth in a) 2. An expression cassette comprising a regulatory element operably linked to a nucleotide sequence wherein the regulatory element comprises the nucleotide sequence of claim 1. 3. A plant stably transformed with an expression cassette of claim 2. 4. The plant of claim 3, wherein said plant is a monocot. 5. The plant of claim 3, wherein said monocot is maize, wheat, rice, barley, sorghum or rye. 6. Seed of the plant of claim 3 wherein the seed comprises the expression cassette. 7. A method for selectively expressing a nucleotide sequence in a plant cell, the method comprising: a) transforming a plant cell with an expression cassette, the expression cassette comprising a regulatory element operably linked to a nucleotide sequence wherein the regulatory element comprises a nucleotide sequence selected from the group consisting of: i) the nucleotide sequence set forth in SEQ ID NO: 1, 2 or 3; and ii) a functional fragment of i); and b) growing the plant cell to selectively express the nucleotide sequence. 8. The method of claim 7 wherein the regulatory element initiates expression of the nucleotide sequence in plant tissue. 9. The method of claim 7 further comprising regenerating a stably transformed plant from the plant cell; wherein expression of the nucleotide sequence alters the phenotype of a plant. 10. The plant of claim 9, wherein said plant is a monocot. 11. The plant of claim 9, wherein said monocot is maize, wheat, rice, barley, sorghum or rye. 12. Seed of the plant of claim 9 wherein the seed comprises the expression cassette. |
| Gold Main Label: A01H |
| Model Output: Step 1 — Section Brief Justification: The invention concerns genetic elements (nucleotide sequences, regulatory elements) used to modify gene expression in plants, which falls under biotechnology and genetic engineering. Decision: C . Step 2 — Class Brief Justification: It specifically relates to biotechnology and genetic engineering constructs (expression cassettes, transformed plant cells) used to alter phenotypes. Decision: C12 . Step 3 — Subclass Brief Justification: The core is DNA/RNA sequences and expression constructs (regulatory elements, nucleotide sequences) for transforming plant cells and obtaining stably transformed plants, including seeds and methods of expression. Decision: C12N . |
| A: Human necessities |
| A01: Agriculture; forestry; animal husbandry; hunting; trapping; fishing |
| A01H: New plants or processes for obtaining them; plant reproduction by tissue culture techniques |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| CoT Prompt: |
| You are an expert patent classification specialist. Your task is to predict a patent’s main IPC (International Patent Classification) code step by step, based on patent claims. |
| - Reason through each hierarchical level: Section Class Subclass. |
| - Output exactly one decision per level. |
| - Wrap the code of each level in \box{} . |
| - Provide a brief justification before predicting the code at each step. |
| CoT Prompt: |
| You are an expert scientific topic classification specialist (Web of Science style). |
| Your task is to predict Level-1 field and Level-2 subfield labels step by step, based on abstracts. You must reason through each hierarchical level: field → subfield. |
| Instructions: |
| - Output exactly one decision per level. |
Hierarchical Classification
Hierarchical classification uses relationships among labels to predict categories at multiple levels, from broad groups to fine-grained classes.
See all 89 papers