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 domain knowledge difficulty and a huge number of 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.
翻译:分层文本分类(HTC)旨在将文档分配到预定义分类法的多个层级中。自动化专利主题分类因其领域知识难度高且标签数量庞大,成为最具挑战性的HTC场景之一。现有方法仅输出扁平化的标签集合,难以揭示预测背后的决策依据。为此,我们提出分层分类推理框架(RHC),该创新框架将HTC重构为逐步推理任务,通过序列化推演实现分层标签的递进式判定。RHC通过两阶段训练大型语言模型(LLM):冷启动阶段将输出与思维链(CoT)推理格式对齐,强化学习(RL)阶段则用于增强多步推理能力。实验表明RHC具备四大优势:(1)有效性:RHC在准确率和宏观F1值上超越现有基线方法,较监督微调模型提升约3%;(2)可解释性:RHC在预测前生成自然语言决策依据,便于人工审查;(3)可扩展性:相较于标准微调方法,RHC随模型规模扩大呈现更显著的性能增益;(4)普适性:除专利领域外,RHC在其他广泛使用的HTC基准测试中均达到最先进性能,彰显其广泛适用性。