大语言模型(LLM)推动了文本生成、翻译等各类自然语言处理(NLP)任务的发展。然而,这些模型往往会生成可能延续偏见的文本。现有缓解这些偏见的方法通常会损害知识保留。本研究探讨LLM能否在不牺牲知识或理解能力的情况下生成安全、无偏见的输出。我们提出了安全且负责任的大语言模型(Safe and Responsible Large Language Model,SR_LLM),该模型在经过安全微调的自回归仅解码器LLM之上进行指令微调,以减少生成文本中的偏见。我们构建了一个专门数据集,其中包含不安全示例及其相应的安全改写版本,用于训练SR_LLM识别并纠正带有偏见的文本。在专门数据集和分布外测试集上的实验表明,SR_LLM能够有效减少偏见,同时保持知识完整性。这一表现优于对较小语言模型进行传统微调,以及仅依赖提示技术的基础LLM。研究结果表明,在为去偏见等任务定制的数据集上进行指令微调,是在最大限度减少LLM偏见的同时保留其固有知识与能力的高效策略。代码和数据集可在SR-LLM获取:https://github.com/shainarazavi/Safe-Responsible-LLM。
英文摘要:
Large Language Models (LLMs) have advanced various Natural Language Processing (NLP) tasks, such as text generation and translation, among others. However, these models often generate texts that can perpetuate biases. Existing approaches to mitigate these biases usually compromise knowledge retention. This study explores whether LLMs can produce safe, unbiased outputs without sacrificing knowledge or comprehension. We introduce the Safe and Responsible Large Language Model (\textbf{SR}$_{\text{LLM}}$), which has been instruction fine-tuned atop of a safe fine-tuned auto-regressive decoder-only LLM to reduce biases in generated texts. We developed a specialized dataset with examples of unsafe and corresponding safe variations to train \textbf{SR}$_{\text{LLM}}$ to identify and correct biased text. Experiments on our specialized dataset and out-of-distribution test sets reveal that \textbf{SR}$_{\text{LLM}}$ effectively reduces biases while preserving knowledge integrity. This performance surpasses that of traditional fine-tuning of smaller language models and base LLMs that merely reply on prompting techniques. Our findings demonstrate that instruction fine-tuning on custom datasets tailored for tasks such as debiasing is a highly effective strategy for minimizing bias in LLM while preserving their inherent knowledge and capabilities. The code and dataset are accessible at \href{https://github.com/shainarazavi/Safe-Responsible-LLM}{SR-LLM}
Libra-Leaderboard: Towards Responsible AI through a Balanced Leaderboard of Safety and Capability
LibrAI;MBZUAI(穆罕默德·本·扎耶德人工智能大学);Oracle(甲骨文公司);The University of Melbourne(墨尔本大学);Tsinghua University(清华大学);Princeton University(普林斯顿大学);Peking University(北京大学);CUHK(香港中文大学);BUPT(北京邮电大学);UCSC(加利福尼亚大学圣克鲁兹分校);SUTD(新加坡科技设计大学);University of Edinburgh(爱丁堡大学);Concordia AI;NTU(南洋理工大学);King Abdulaziz University(阿卜杜勒阿齐兹国王大学);Shanghai Jiao Tong University(上海交通大学)
Jailbreak Antidote: Runtime Safety-Utility Balance via Sparse Representation Adjustment in Large Language Models
Beijing Institute of AI Safety and Governance(北京人工智能安全与治理研究院);Beijing Key Laboratory of Artificial Intelligence Safety and Superalignment(北京人工智能安全与超级对齐重点实验室);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);Center for Long-term Artificial Intelligence(长期人工智能中心)
Rethinking the Evaluation of Alignment Methods: Insights into Diversity, Generalisation, and Safety
Wroclaw University of Science and Technology (WUST)(沃拉布大学科学与技术学院);National Research Institute (NASK)(国家研究 institute);Institute of Computer Science, Polish Academy of Sciences (IPI PAN)(波兰科学院计算机科学研究所)
Towards Understanding Safety Alignment: A Mechanistic Perspective from Safety Neurons
Department of Computer Science and Technology, BNRist(计算机科学与技术系,BNRist);Shenzhen International Graduate School(深圳国际研究生院);KIRC, Institute for Artificial Intelligence, Tsinghua University(人工智能研究院,清华大学)
WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Models
Allen Institute for Artificial Intelligence(艾伦人工智能研究所);Seoul National University(首尔大学);Carnegie Mellon University(卡内基梅隆大学);University of Washington(华盛顿大学)