Skip to main content

Cybernetic Sentinels: Unveiling the Impact of Safety Data Selection on Model Security in Supervised Fine-Tuning

  • Conference paper
  • First Online:
Advanced Intelligent Computing Technology and Applications (ICIC 2024)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 14877))

Included in the following conference series:

  • 767 Accesses

  • 1 Citation

Abstract

Large Language Models (LLMs) continue to advance in capabilities, yet this progress comes with an expanding array of safety risks. This paper discusses concerns related to models that prioritize being helpful over ensuring safety in the process of instruction-tuning. We investigate the comparative effects of randomly selecting guidance data versus clustering safety guidance data during fine-tuning on LLaMA2-7B. Results indicate that the latter can more effectively mitigate security risks of open-source models with minimal performance impact. Additionally, we examine the impact of various response combinations on model security performance. Experimental results show that concise refusal responses moderately enhance model security defense capabilities, albeit at the potential expense of response quality in regular question-answering tasks. Finally, this selected 2000 fine-tuning data for model security training is available for researchers’ use, which can be found at https://github.com/wangruihui0429/Security-through-Strategic-Data-Selection.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+
from $39.99 /Month
  • Starting from 10 chapters or articles per month
  • Access and download chapters and articles from more than 300k books and 2,500 journals
  • Cancel anytime
View plans

Buy Now

Chapter
USD 29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 74.99
Price excludes VAT (Canada)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. GPT-4 Homepage. https://openai.com/research/gpt-4. Accessed 15 May 2024

  2. Chowdhery, A., et al.: PaLM: scaling language modeling with pathways. J. Mach. Learn. Res. 24(240), 1–113 (2023)

    Google Scholar 

  3. Touvron, H., Martin, L., Stone, K., et al.: Llama 2: open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288 (2023)

  4. Bender, E.M., Gebru, T., McMillan-Major, A., Shmitchell, S.: On the dangers of stochastic parrots: can language models be too big? In: Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, pp. 610–623. ACM, New York (2021)

    Google Scholar 

  5. Hutchinson, B., et al.: Social biases in NLP models as barriers for persons with disabilities. In: Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 5491–5501, Association for Computational Linguistics (2020)

    Google Scholar 

  6. Abid, A., Farooqi, M., Zou, J.: Large language models associate Muslims with violence. Nat. Mach. Intelligence, 3(6), 461–463 (2021)

    Google Scholar 

  7. Wang, Y., et al.: Self-instruct: aligning language models with self-generated instructions. In: Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics, pp. 13484–13508, Association for Computational Linguistics, Toronto (2023)

    Google Scholar 

  8. Zheng, Y., Zhang, R., Zhang, J., et al.: LLaMA factory: unified efficient fine-tuning of 100+ language models. arXiv preprint arXiv:2403.13372 (2024)

  9. Ouyang, L., Wu, J., Jiang, X., et al.: Training language models to follow instructions with human feedback. Adv. Neural Inform. Process. Syst. 35, 27730–27744. New Orleans (2022)

    Google Scholar 

  10. Federico, B., et al.: Safety-tuned LLaMAs: lessons from improving the safety of large language models that follow instructions. In: The Twelfth International Conference on Learning Representations (2023)

    Google Scholar 

  11. Zhou, C., et al.: LIMA: less is more for alignment. In: Thirty-seventh Conference on Neural Information Processing Systems (2023)

    Google Scholar 

  12. Xu, G., Liu, J., Yan, M., et al.: CValues: measuring the values of Chinese large language models from safety to responsibility. arXiv preprint arXiv:2307.09705 (2023)

  13. Deep, G., et al.: Red teaming language models to reduce harms: methods, scaling behaviors, and lessons learned. arXiv preprint arXiv:2209.07858 (2022)

  14. Ge, S., et al.: Mart: improving LLM safety with multi-round automatic red-teaming. arXiv preprint arXiv:2311.07689 (2023)

  15. Wei, A., Haghtalab, N., Steinhardt, J.: Jailbroken: how does LLM safety training fail? In: Advances in Neural Information Processing Systems, vol. 36 (2024)

    Google Scholar 

  16. Lin, B.Y., Ravichander, A., Lu, X., et al.: The unlocking spell on base LLMS: rethinking alignment via in-context learning. arXiv preprint arXiv:2312.01552 (2023)

  17. Ji, J., Liu, M., Dai, J., et al.: Beavertails: towards improved safety alignment of llm via a human-preference dataset. In: Advances in Neural Information Processing Systems, vol. 36 (2024)

    Google Scholar 

  18. Wang, W., Wei, F., Dong, L., et al.: Minilm: deep self-attention distillation for task-agnostic compression of pre-trained transformers. In: Advances in Neural Information Processing Systems, vol. 33, pp. 5776–5788. Vancouver (2020)

    Google Scholar 

  19. Shaikh, O., et al.: On second thought, let’s not think step by step! bias and toxicity in zero-shot reasoning. In: Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics, pp. 4454–4470. Association for Computational Linguistics, Toronto (2023)

    Google Scholar 

  20. Zou, A., Wang, Z., Kolter, J.Z., et al.: Universal and transferable adversarial attacks on aligned language models. arXiv preprint arXiv:2307.15043 (2023)

  21. Wang, Y., Li, H., et al.: Do-not-answer: evaluating safeguards in LLMs. In: Findings of the Association for Computational Linguistics, pp. 896–911. Association for Computational Linguistics, Malta (2024)

    Google Scholar 

  22. Gao, L., Tow, J., et al.: A framework for few-shot language model evaluation (2021)

    Google Scholar 

  23. Bisk, Y., Zellers, R., Gao, J., et al.: Piqa: reasoning about physical commonsense in natural language. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 34, issue 5, pp. 7432–7439, Association for the Advancement of Artificial Intelligence (2020)

    Google Scholar 

  24. Clark, C., Lee, K., et al.: BoolQ: exploring the surprising difficulty of natural yes/no questions. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, vol. 1, pp. 2924–2936. Association for Computational Linguistics, Minneapolis (2019)

    Google Scholar 

  25. Mihaylov, T., Clark, P., et al.: Can a suit of armor conduct electricity? A new dataset for open book question answering. In: Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2381–2391, Association for Computational Linguistics, Brussels (2018)

    Google Scholar 

  26. Hu, E.J., Wallis, P., Allen-Zhu, Z., et al.: LoRA: low-rank adaptation of large language models. In: International Conference on Learning Representations (2021)

    Google Scholar 

Download references

Acknowledgments

This work is supported by the National Nature Science Foundation (61972436), the National Social Science Foundation (22&ZD035), and the Minzu University of China Foundation (GRSCP202316, 2023QNYL22, 2024GJYY43).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yuan Sun .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Wang, R., He, H., Sun, Y. (2024). Cybernetic Sentinels: Unveiling the Impact of Safety Data Selection on Model Security in Supervised Fine-Tuning. In: Huang, DS., Si, Z., Zhang, Q. (eds) Advanced Intelligent Computing Technology and Applications. ICIC 2024. Lecture Notes in Computer Science(), vol 14877. Springer, Singapore. https://doi.org/10.1007/978-981-97-5669-8_23

Download citation

  • DOI: https://doi.org/10.1007/978-981-97-5669-8_23

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-97-5668-1

  • Online ISBN: 978-981-97-5669-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Keywords

Publish with us

Policies and ethics

Morty Proxy This is a proxified and sanitized view of the page, visit original site.