用轻量LLM+图神经网络,低成本高效完成少标签文本分类。
Text2Graph: Combining Lightweight LLMs and GNNs for Efficient Text Classification in Label-Scarce Scenarios
- 结合LLM部分标注与GNN传播,实现低资源文本分类。
- 在5个数据集上性能媲美主流方法,能耗降低数倍。
- 适合算力有限或注重碳排放的科研/工业场景使用。
大型语言模型(LLMs)已成为有效的零样本分类器,但其高计算需求和环境成本限制了其在高性能计算(HPC)环境中大规模标注的实用性。为支持更可持续的工作流,我们提出Text2Graph,一个开源的Python工具包,提供现有文本到图分类方法的模块化实现。该框架允许用户灵活组合基于LLM的部分标注与图神经网络(GNN)的标签传播,可轻松替换特征提取器、边构建方法及采样策略等组件。我们在五个涵盖主题分类与情感分析任务的数据集上进行了零样本设置下的基准测试,对比了多种变体与其他零样本文本分类方法。除报告性能外,还提供了详细的能源消耗与碳排放估算,结果表明基于图的传播方法可在远低于传统方法的能源与环境成本下获得具有竞争力的结果。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have become effective zero-shot classifiers, but their high computational requirements and environmental costs limit their practicality for large-scale annotation in high-performance computing (HPC) environments. To support more sustainable workflows, we present Text2Graph, an open-source Python package that provides a modular implementation of existing text-to-graph classification approaches. The framework enables users to combine LLM-based partial annotation with Graph Neural Network (GNN) label propagation in a flexible manner, making it straightforward to swap components such as feature extractors, edge construction methods, and sampling strategies. We benchmark Text2Graph on a zero-shot setting using five datasets spanning topic classification and sentiment analysis tasks, comparing multiple variants against other zero-shot approaches for text classification. In addition to reporting performance, we provide detailed estimates of energy consumption and carbon emissions, showing that graph-based propagation achieves competitive results at a fraction of the energy and environmental cost.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。