[论文解读] ChatGraph: Interpretable Text Classification by Converting ChatGPT Knowledge to Graphs
该论文提出 ChatGraph,一种将 ChatGPT 中的知识转化为结构化知识图谱的框架,以实现可解释的文本分类。通过提示工程引导的 LLM 推理提取语义关系,并在图结构数据上训练线性分类器,ChatGraph 在直接使用 ChatGPT 的基础上表现更优,且优于现有可解释模型,同时通过特征重要性权重保持了模型的可解释性。
ChatGPT, as a recently launched large language model (LLM), has shown superior performance in various natural language processing (NLP) tasks. However, two major limitations hinder its potential applications: (1) the inflexibility of finetuning on downstream tasks and (2) the lack of interpretability in the decision-making process. To tackle these limitations, we propose a novel framework that leverages the power of ChatGPT for specific tasks, such as text classification, while improving its interpretability. The proposed framework conducts a knowledge graph extraction task to extract refined and structural knowledge from the raw data using ChatGPT. The rich knowledge is then converted into a graph, which is further used to train an interpretable linear classifier to make predictions. To evaluate the effectiveness of our proposed method, we conduct experiments on four datasets. The result shows that our method can significantly improve the performance compared to directly utilizing ChatGPT for text classification tasks. And our method provides a more transparent decision-making process compared with previous text classification methods.
研究动机与目标
- 为解决 ChatGPT 在文本分类中的局限性,特别是其微调灵活性不足和可解释性差的问题。
- 开发一种框架,利用预训练 LLM 的知识,同时实现模型透明度与可解释性。
- 通过将结构化知识提炼为可训练、可解释的模型,提升直接 LLM 推理的分类准确率。
- 提出一种以数据为中心的方法,在无需更新模型参数的情况下提升性能。
- 实现外部知识(如 TF-IDF)与知识图谱的集成,以进一步提升性能。
提出的方法
- 使用提示工程的 ChatGPT 对原始文本进行优化,纠正语法、拼写错误,并提升句子清晰度。
- 应用第二个提示,从优化后的文本中提取结构化的知识三元组(主语-谓语-宾语)。
- 将提取的知识图谱转换为适合训练线性分类器的文本图表示。
- 在文本图上训练具有可学习权重的线性模型以预测类别标签,从而支持特征重要性解释。
- 将外部知识(如 TF-IDF 权重)集成到文本图中,以增强模型性能。
- 通过特征掩码(随机特征 vs. 重要性最高的特征)评估可解释性,使用保真度指标。
实验结果
研究问题
- RQ1与直接使用 LLM 推理相比,将 ChatGPT 的知识提炼为结构化图谱格式是否能提升文本分类性能?
- RQ2所得到的模型是否能在保持竞争力准确率的同时维持高水平的可解释性?
- RQ3与现有可解释模型(如 TF-IDF 和 TextGCN)相比,所提框架的性能如何?
- RQ4集成外部知识(如 TF-IDF)在多大程度上增强了模型的预测能力?
- RQ5模型的特征重要性分数在多大程度上反映了词语对分类决策的真实贡献?
主要发现
- ChatGraph 在四个基准数据集(包括 20NG、R8、R52 和 Ohsumed)上显著优于直接使用 ChatGPT 的零样本和少样本推理。
- 在 R8 数据集上,当对前 0.1% 的重要特征进行掩码时,ChatGraph 的保真度得分为 24.44%,表明特征重要性与模型决策高度一致。
- 当对前 1% 的重要特征进行掩码时,ChatGraph 在 R8 上的保真度达到 38.46%,展示了在可解释性评估中的稳健性。
- 当结合 TF-IDF 特征时,模型性能进一步提升,证明了外部知识集成的有效性。
- ChatGraph 在准确率和可解释性两方面均优于内在可解释的基线模型(如 TF-IDF 和 TextGCN),实现了性能与透明度的平衡。
- 该方法通过在模型推理前提取知识,有效缓解了 ChatGPT 的 token 长度限制,使其能够处理长文本。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。