A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training
  and Deployment
Authors: name: Kun Wang, name: Guibin Zhang, name: Zhenhong Zhou, name: Jiahao Wu, name: Miao Yu, name: Shiqian Zhao, name: Chenlong Yin, name: Jinhu Fu, name: Yibo Yan, name: Hanjun Luo, name: Liang Lin, name: Zhihao Xu, name: Haolang Lu, name: Xinye Cao, name: Xinyun Zhou, name: Weifei Jin, name: Fanci Meng, name: Junyuan Mao, name: Hao Wu, name: Minghe Wang, name: Fan Zhang, name: Junfeng Fang, name: Chengwei Liu, name: Yifan Zhang, name: Qiankun Li, name: Chongye Guo, name: Yalan Qin, name: Yi Ding, name: Donghai Hong, name: Jiaming Ji, name: Xinfeng Li, name: Yifan Jiang, name: Dongxia Wang, name: Yihao Huang, name: Yufei Guo, name: Jen-tse Huang, name: Yanwei Yue, name: Wenke Huang, name: Guancheng Wan, name: Tianlin Li, name: Lei Bai, name: Jie Zhang, name: Qing Guo, name: Jingyi Wang, name: Tianlong Chen, name: Joey Tianyi Zhou, name: Xiaojun Jia, name: Weisong Sun, name: Cong Wu, name: Jing Chen, name: Xuming Hu, name: Yiming Li, name: Xiao Wang, name: Ningyu Zhang, name: Luu Anh Tuan, name: Guowen Xu, name: Tianwei Zhang, name: Xingjun Ma, name: Xiang Wang, name: Bo An, name: Jun Sun, name: Mohit Bansal, name: Shirui Pan, name: Yuval Elovici, name: Bhavya Kailkhura, name: Bo Li, name: Yaodong Yang, name: Hongwei Li, name: Wenyuan Xu, name: Yizhou Sun, name: Wei Wang, name: Qing Li, name: Ke Tang, name: Yu-Gang Jiang, name: Felix Juefei-Xu, name: Hui Xiong, name: Xiaofeng Wang, name: Shuicheng Yan, name: Dacheng Tao, name: Philip S. Yu, name: Qingsong Wen, name: Yang Liu

The remarkable success of Large Language Models (LLMs) has illuminated a
promising pathway toward achieving Artificial General Intelligence for both
academic and industrial communities, owing to their unprecedented performance
across various applications. As LLMs continue to gain prominence in both
research and commercial domains, their security and safety implications have
become a growing concern, not only for researchers and corporations but also
for every nation. Currently, existing surveys on LLM safety primarily focus on
specific stages of the LLM lifecycle, e.g., deployment phase or fine-tuning
phase, lacking a comprehensive understanding of the entire "lifechain" of LLMs.
To address this gap, this paper introduces, for the first time, the concept of
"full-stack" safety to systematically consider safety issues throughout the
entire process of LLM training, deployment, and eventual commercialization.
Compared to the off-the-shelf LLM safety surveys, our work demonstrates several
distinctive advantages: (I) Comprehensive Perspective. We define the complete
LLM lifecycle as encompassing data preparation, pre-training, post-training,
deployment and final commercialization. To our knowledge, this represents the
first safety survey to encompass the entire lifecycle of LLMs. (II) Extensive
Literature Support. Our research is grounded in an exhaustive review of over
800+ papers, ensuring comprehensive coverage and systematic organization of
security issues within a more holistic understanding. (III) Unique Insights.
Through systematic literature analysis, we have developed reliable roadmaps and
perspectives for each chapter. Our work identifies promising research
directions, including safety in data generation, alignment techniques, model
editing, and LLM-based agent systems. These insights provide valuable guidance
for researchers pursuing future work in this field.