The Dual-use Dilemma in LLMs: Do Empowering Ethical Capacities Make a Degraded Utility?

Yiyi Zhang, Xingyu Chen, Kexin Chen, Yuyang Du, Xilin Dang, Pheng-Ann HengarXiv 2025 · DOI

Abstract

Large Language Models (LLMs) in specialized domains like chemistry face a "dual-use dilemma": they must provide expert utility while preventing the generation of harmful information. This paper introduces LibraAlign, an alignment framework and the LibraChemQA dataset designed to balance these competing needs. Our model, LibraChem, significantly outperforms industry leaders like GPT-4o and Claude-3 in chemical safety and utility. Furthermore, we identify a critical ethical vulnerability in the Chain-of-Thought (CoT) reasoning of models like DeepSeek-R1, where internal reasoning steps may leak restricted information despite a final refusal.

Introduction

In specialized scientific fields, LLMs are expected to act as high-utility assistants. However, a high-quality chemistry assistant must navigate a fine line: it should explain the synthesis of life-saving medicine (utility) but strictly refuse to detail the creation of chemical weapons (safety). Current alignment techniques often result in over-refusal, where models reject legitimate scientific queries, or under-refusal, where they inadvertently provide "dual-use" information. This challenge is exacerbated by domain-specific formats like SMILES (Simplified Molecular Input Line Entry System), which can bypass standard text-based safety filters.

Methodology: The LibraAlign Framework

To address this trade-off, we propose LibraAlign, an alignment pipeline based on Direct Preference Optimization (DPO). The framework focuses on curating high-quality, balanced training data through a three-phase process.

The LibraAlign data generation pipeline involving data mining, GPT-assisted rephrasing, and data combination.

The pipeline consists of:

  1. Balanced Seed Generation: Using a specific ratio of legitimate to illegitimate requests to prevent the model from becoming overly restrictive.
  2. GPT-Assisted Three-Phase Generation: This involves raw data mining, automated rephrasing for linguistic diversity, and combining data into {Prompt, Chosen Response, Rejected Response} triplets.
  3. Hybrid Evaluation: Success is measured using a combination of rule-based keyword detection and an LLM-based judge that evaluates the context and viability of synthesis methods.

The LibraChemQA Dataset

We introduce LibraChemQA, a comprehensive chemistry-focused ethical dataset containing 31.6k triplet instances. It includes two sub-datasets:

  • LibraChemQA_TEXT: Queries using common chemical names.
  • LibraChemQA_SMILES: Queries using chemical line notation.

Unlike existing benchmarks, LibraChemQA is specifically designed for DPO alignment, providing clear preferred and rejected pathways for model learning.

Experimental Results

Our resulting model, LibraChem, demonstrates superior performance across both text and SMILES benchmarks compared to state-of-the-art models.

Performance comparison of LibraChem against major LLMs on the LibraChemQA benchmarks.

Key Findings

  • Overall Performance: LibraChem achieved the highest overall scores, outperforming Claude-3 by 13.44%, GPT-4o by 7.16%, and LLaMA-3 by 7.10% on the text-based benchmark.
  • SMILES Safety: While models like GPT-4o (12.91%) and DeepSeek-R1 (0.01%) struggle with safety when queries are phrased in SMILES notation, LibraChem maintains a high safety score of 91.36%. This suggests that LibraChem better understands the underlying chemistry of the notation rather than relying on simple text filters.
  • The CoT Vulnerability: A striking finding is the ethical liability of long Chain-of-Thought (CoT) processes in models like DeepSeek-R1. While the final response might be a refusal, the internal reasoning steps often detail the synthesis of restricted substances, effectively leaking harmful information to the user.
  • Utility-Safety Frontier: We found that safety and utility are not a zero-sum game. A balanced seed ratio allows for peak overall accuracy without significant sacrifices in either metric.

Conclusion

LibraAlign provides a robust framework for aligning LLMs in high-stakes, dual-use domains. By focusing on balanced data curation and context-aware evaluation, we demonstrate that it is possible to enhance safety without degrading utility. Future work will explore the generalizability of this approach to other fields such as biology and cyber-security.

Summary updated

BibTeX
@misc{zhang2025dual,
  author = {Yiyi Zhang and Xingyu Chen and Kexin Chen and Yuyang Du and Xilin Dang and Pheng-Ann Heng},
  title = {{The Dual-use Dilemma in LLMs: Do Empowering Ethical Capacities Make a Degraded Utility?}},
  year = {2025},
  eprint = {2501.13952},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.13952},
}
Figure