Detecting uncivil language is crucial for maintaining safe, inclusive, and democratic online spaces. Yet existing classifiers often misinterpret posts containing uncivil cues but expressing civil intents, leading to inflated estimates of harmful incivility online. We introduce LinGO, a linguistic graph optimization framework for large language models (LLMs) that leverages linguistic structures and optimization techniques to classify multi-class intents of incivility that use various direct and indirect expressions. LinGO decomposes language into multi-step linguistic components, identifies targeted steps that cause the most errors, and iteratively optimizes prompt and/or example components for targeted steps. We evaluate it using a dataset collected during the 2022 Brazilian presidential election, encompassing four forms of political incivility: Impoliteness (IMP), Hate Speech and Stereotyping (HSST), Physical Harm and Violent Political Rhetoric (PHAVPR), and Threats to Democratic Institutions and Values (THREAT). Each instance is annotated with six types of civil/uncivil intent. We benchmark LinGO using three cost-efficient LLMs: GPT-5-mini, Gemini 2.5 Flash-Lite, and Claude 3 Haiku, and four optimization techniques: TextGrad, AdalFlow, DSPy, and Retrieval-Augmented Generation (RAG). The results show that, across all models, LinGO consistently improves accuracy and weighted F1 compared with zero-shot, chain-of-thought, direct optimization, and fine-tuning baselines. RAG is the strongest optimization technique and, when paired with Gemini model, achieves the best overall performance. These findings demonstrate that incorporating multi-step linguistic components into LLM instructions and optimize targeted components can help the models explain complex semantic meanings, which can be extended to other complex semantic explanation tasks in the future.


翻译:检测不文明语言对于维护安全、包容和民主的网络空间至关重要。然而,现有的分类器常常误判那些包含不文明线索但表达文明意图的帖子,导致对网络中有害不文明行为的高估。我们提出了LinGO,一种面向大语言模型的语言图优化框架,它利用语言结构和优化技术,对使用各种直接和间接表达方式的不文明言论的多类别意图进行分类。LinGO将语言分解为多步骤的语言组件,识别导致最多错误的目标步骤,并针对目标步骤迭代优化提示和/或示例组件。我们使用在2022年巴西总统选举期间收集的数据集对其进行了评估,该数据集涵盖了四种形式的政治不文明行为:不礼貌、仇恨言论与刻板印象、人身伤害与暴力政治言论,以及对民主制度和价值观的威胁。每个实例都标注了六种文明/不文明意图类型。我们使用三种高性价比的大语言模型对LinGO进行了基准测试:GPT-5-mini、Gemini 2.5 Flash-Lite和Claude 3 Haiku,以及四种优化技术:TextGrad、AdalFlow、DSPy和检索增强生成。结果表明,在所有模型中,与零样本、思维链、直接优化和微调基线相比,LinGO持续提高了准确率和加权F1分数。检索增强生成是最强的优化技术,当与Gemini模型配对时,实现了最佳的整体性能。这些发现表明,将多步骤语言组件纳入大语言模型指令并优化目标组件,可以帮助模型解释复杂的语义含义,未来可扩展到其他复杂的语义解释任务。

0
下载
关闭预览

相关内容

《以人为中心的大型语言模型(LLM)研究综述》
专知会员服务
41+阅读 · 2024年11月25日
《利用大型语言模型检测社交平台上的网络欺凌行为》
专知会员服务
44+阅读 · 2024年1月23日
NLP 与 NLU:从语言理解到语言处理
AI研习社
15+阅读 · 2019年5月29日
Jiagu:中文深度学习自然语言处理工具
AINLP
90+阅读 · 2019年2月20日
中文NLP福利!大规模中文自然语言处理语料
新智元
37+阅读 · 2019年2月13日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关VIP内容
《以人为中心的大型语言模型(LLM)研究综述》
专知会员服务
41+阅读 · 2024年11月25日
《利用大型语言模型检测社交平台上的网络欺凌行为》
专知会员服务
44+阅读 · 2024年1月23日
相关资讯
NLP 与 NLU:从语言理解到语言处理
AI研习社
15+阅读 · 2019年5月29日
Jiagu:中文深度学习自然语言处理工具
AINLP
90+阅读 · 2019年2月20日
中文NLP福利!大规模中文自然语言处理语料
新智元
37+阅读 · 2019年2月13日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员