Ensuring that Large Language Models (LLMs) generate ethically aligned outputs is a critical objective in the field of AI ethics. One promising approach for LLM alignment is Direct Preference Optimization (DPO), which fine-tunes models using moral preferences to guide their behavior. However, the internal mechanisms by which DPO influences model behavior remain unclear. This study leverages mechanistic interpretability to investigate the structural effects of DPO fine-tuning on LLMs focusing at moral content. Key components such as attention heads, residual streams, and multilayer perceptrons (MLPs) are analyzed. Additionally, activation patching is employed to isolate and explore these components, shedding light on their role in generating ethically aligned outputs. (The full code for this research can be found on our github repository https://github.com/co-ai-cognitive-assistants/Mechanistic-Exploration- of-the-Architectural-Impact-of-DPO-Fine-Tuning-on-Ethical-Alignment- in-LLMs .)

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Mechanistic Exploration of the Architectural Impact of DPO Fine-Tuning on Ethical Alignment in LLMs

  • Fabian Maag,
  • Betiel Woldai,
  • Sigurd Schacht

摘要

Ensuring that Large Language Models (LLMs) generate ethically aligned outputs is a critical objective in the field of AI ethics. One promising approach for LLM alignment is Direct Preference Optimization (DPO), which fine-tunes models using moral preferences to guide their behavior. However, the internal mechanisms by which DPO influences model behavior remain unclear. This study leverages mechanistic interpretability to investigate the structural effects of DPO fine-tuning on LLMs focusing at moral content. Key components such as attention heads, residual streams, and multilayer perceptrons (MLPs) are analyzed. Additionally, activation patching is employed to isolate and explore these components, shedding light on their role in generating ethically aligned outputs. (The full code for this research can be found on our github repository https://github.com/co-ai-cognitive-assistants/Mechanistic-Exploration- of-the-Architectural-Impact-of-DPO-Fine-Tuning-on-Ethical-Alignment- in-LLMs .)