Paper Reading AI Learner

Hierarchical Text Classification Using Black Box Large Language Models

2025-08-06 08:53:50
Kosuke Yoshimura, Hisashi Kashima

Abstract

Hierarchical Text Classification (HTC) aims to assign texts to structured label hierarchies; however, it faces challenges due to data scarcity and model complexity. This study explores the feasibility of using black box Large Language Models (LLMs) accessed via APIs for HTC, as an alternative to traditional machine learning methods that require extensive labeled data and computational resources. We evaluate three prompting strategies -- Direct Leaf Label Prediction (DL), Direct Hierarchical Label Prediction (DH), and Top-down Multi-step Hierarchical Label Prediction (TMH) -- in both zero-shot and few-shot settings, comparing the accuracy and cost-effectiveness of these strategies. Experiments on two datasets show that a few-shot setting consistently improves classification accuracy compared to a zero-shot setting. While a traditional machine learning model achieves high accuracy on a dataset with a shallow hierarchy, LLMs, especially DH strategy, tend to outperform the machine learning model on a dataset with a deeper hierarchy. API costs increase significantly due to the higher input tokens required for deeper label hierarchies on DH strategy. These results emphasize the trade-off between accuracy improvement and the computational cost of prompt strategy. These findings highlight the potential of black box LLMs for HTC while underscoring the need to carefully select a prompt strategy to balance performance and cost.

Abstract (translated)

层次文本分类(HTC)旨在将文本分配到结构化的标签层级体系中;然而,由于数据稀缺和模型复杂性的问题,HTC面临着挑战。这项研究探讨了使用通过API访问的黑盒大规模语言模型(LLMs)进行HTC的可行性,作为传统机器学习方法的一种替代方案,后者需要大量的标注数据和计算资源。我们评估了三种提示策略——直接叶标签预测(DL)、直接层级标签预测(DH)以及自顶向下的多步层级标签预测(TMH),在零样本和少量样本设置下进行性能对比,比较这些策略的准确性和成本效益。 实验使用两个数据集表明,在少数样本设置中,分类准确性相比零样本设置始终有所提高。传统机器学习模型在一个浅层层级的数据集中表现出了高精度;然而,LLMs(尤其是DH策略)在深层层级结构的数据集中往往优于传统的机器学习模型。API费用由于更深层次的标签体系所需的输入令牌更多而在DH策略下显著增加。这些结果强调了准确性改进与提示策略计算成本之间的权衡。 这项研究突显了黑盒大规模语言模型在HTC中的潜力,同时也强调了选择合适的提示策略以平衡性能和成本的重要性。

URL

https://arxiv.org/abs/2508.04219

PDF

https://arxiv.org/pdf/2508.04219.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot