Online Safety Analysis for LLMs: A Benchmark, an Assessment, and a Path Forward
While Large Language Models (LLMs) have seen widespread applications across numerous fields, their limited interpretability poses concerns regarding their safe operations from multiple aspects, e.g., truthfulness and toxicity. Recent research has started developing quality assurance methods for LLMs, introducing techniques such as offline detectors or uncertainty estimation methods. However, these approaches mainly focus on post-generation analysis, leaving the online safety analysis for LLMs during the generation phase an unexplored area. To bridge this gap, we conduct in this work a comprehensive evaluation of the effectiveness of existing online safety analysis methods on LLMs. We begin with a pilot study that validates the feasibility of detecting unsafe outputs in the early generation process. Following this, we establish the first publicly available benchmark of online safety analysis for LLMs, including a broad spectrum of methods, models, tasks, datasets, and evaluation metrics. Utilizing this benchmark, we extensively analyze the performance of state-of-the-art online safety analysis methods on both open-source and closed-source LLMs. This analysis reveals the strengths and weaknesses of individual methods and offers valuable insights into selecting the most appropriate method based on specific application scenarios and task requirements. Furthermore, we also explore the potential of using hybridization methods, i.e., combining multiple methods to derive a collective safety conclusion, to enhance the efficacy of online safety analysis. Our findings indicate a promising direction for the development of trustworthy assurance methodologies for LLMs, facilitating their reliable deployments across diverse domains.
Authors
- Zhehua Zhou (ORCID: https://orcid.org/0000-0001-9542-4858)
- Xuan Xie (ORCID: https://orcid.org/0000-0003-3981-8515)
- Da Song (ORCID: https://orcid.org/0000-0001-8064-3409)
- Yuheng Huang (ORCID: https://orcid.org/0000-0003-3666-4020)
- Lei Ma
- Jiayang Song (ORCID: https://orcid.org/0009-0008-7093-9781)
Institutions
- Macau University of Science and Technology (MO)
- University of Macau (MO)
- Mila - Quebec Artificial Intelligence Institute (CA)
- The University of Tokyo (JP)
Publication Details
- Journal
- IEEE Transactions on Artificial Intelligence
- Published
- 2025-08-29
- DOI
- https://doi.org/10.1109/tai.2025.3603547
- Citations
- 2
- Primary Topic
- Digital Rights Management and Security
- Type
- article
- Field-Weighted Citation Impact
- 6.49