用图结构动态增强少样本社交文本分类的上下文信息。
GORAG: Graph-based Online Retrieval Augmented Generation for Dynamic Few-shot Social Media Text Classification
- 构建关键词与标签的加权图,捕捉语义关联。
- 通过最小代价生成树动态检索相关上下文,提升分类精度。
- 适合标签频繁变化的实时社交文本分类场景。
文本分类对网络向善应用(如仇恨言论和虚假信息检测)至关重要。然而,传统模型(如 BERT)在标注数据稀少且目标标签频繁演化的动态少样本场景中表现不佳。尽管大语言模型在少样本设置下展现潜力,但在动态演化场景中因输入规模增大而性能受限。为此,我们提出 GORAG:一种基于图的在线检索增强生成框架,用于动态少样本文本分类。GORAG 构建并维护一个关键词与文本标签的加权图,以边表示其相关性。为建模这些关联,采用边权重机制优先处理信息的重要性与可靠性,并针对每个输入动态使用定制的最小代价生成树进行上下文检索。实证评估表明,GORAG 通过提供更全面、精确的上下文信息,优于现有方法。代码已开源:https://github.com/Wyb0627/GORAG。
原文摘要 · Abstract (English)
Text classification is vital for Web for Good applications like hate speech and misinformation detection. However, traditional models (e.g., BERT) often fail in dynamic few-shot settings where labeled data are scarce, and target labels frequently evolve. While Large Language Models (LLMs) show promise in few-shot settings, their performance is often hindered by increased input size in dynamic evolving scenarios. To address these issues, we propose GORAG, a Graph-based Online Retrieval-Augmented Generation framework for dynamic few-shot text classification. GORAG constructs and maintains a weighted graph of keywords and text labels, representing their correlations as edges. To model these correlations, GORAG employs an edge weighting mechanism to prioritize the importance and reliability of extracted information and dynamically retrieves relevant context using a tailored minimum-cost spanning tree for each input. Empirical evaluations show GORAG outperforms existing approaches by providing more comprehensive and precise contextual information. Our code is released at: https://github.com/Wyb0627/GORAG.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。