《计算机应用》唯一官方网站 ›› 2024, Vol. 44 ›› Issue (2): 490-495.DOI: 10.11772/j.issn.1001-9081.2023020172

• 网络空间安全 • 上一篇    

基于量子局部内在维度的对抗样本检测算法

张瑜1,2, 昌燕1,2(), 张仕斌1,2   

  1. 1.成都信息工程大学 网络空间安全学院, 成都 610225
    2.先进密码技术与系统安全四川省重点实验室(成都信息工程大学), 成都 610225
  • 收稿日期:2023-02-23 修回日期:2023-04-23 接受日期:2023-05-06 发布日期:2023-08-14 出版日期:2024-02-10
  • 通讯作者: 昌燕
  • 作者简介:张瑜(1998—),女,重庆丰都人,硕士研究生,主要研究方向:量子计算、量子机器学习隐私保护
    张仕斌(1971—),男,重庆丰都人,教授,博士,CCF会员,主要研究方向:量子计算、信息安全。
  • 基金资助:
    国家自然科学基金资助项目(62272068);成都市重点研发支撑计划项目(2021?YF09?00114?GX)

Adversarial example detection algorithm based on quantum local intrinsic dimensionality

Yu ZHANG1,2, Yan CHANG1,2(), Shibin ZHANG1,2   

  1. 1.School of Cybersecurity,Chengdu University of Information Technology,Chengdu Sichuan 610225,China
    2.Sichuan Provincial Key Laboratory of Advanced Cryptography and System Security (Chengdu University of Information Technology),Chengdu Sichuan 610225,China
  • Received:2023-02-23 Revised:2023-04-23 Accepted:2023-05-06 Online:2023-08-14 Published:2024-02-10
  • Contact: Yan CHANG
  • About author:ZHANG Yu, born in 1998, M. S. candidate. Her research interests include quantum computing, privacy protection in quantum machine learning.
    ZHANG Shibin, born in 1971, Ph. D., professor. His research interests include quantum computing, information security.
  • Supported by:
    National Natural Science Foundation of China(62272068);Key Research and Development Support Plan of Chengdu(2021-YF09-00114-GX)

摘要:

为解决基于局部内在维度(LID)的对抗样本检测算法高时间复杂度问题,结合量子计算优势,提出一种基于量子LID的对抗样本检测算法。首先,使用SWAP-Test量子算法一次性计算待测样本与所有样本间的相似度,避免了经典算法中的冗余计算;然后,结合量子相位估计(QPE)算法和量子Grover搜索算法计算待测样本的局部内在维度;最后,以LID作为二分类检测器的评判依据,检测区分出对抗样本。分别使用IRIS、MNIST、股票时序数据集测试和验证所提算法,仿真实验结果表明,均能通过计算出的LID值突出对抗样本与正常样本之间的差异性,并能作为检测依据区分样本属性。理论研究证明,所提算法时间复杂度与Grover算子迭代次数及邻近样本数和训练样本数的平方根的积同一数量级,明显优于基于LID的对抗样本检测算法,实现了指数级加速。

关键词: 局部内在维度, 对抗样本, 二分类检测, 量子计算, 股价预测

Abstract:

In order to solve the high time complexity problem of the adversarial example detection algorithm based on Local Intrinsic Dimensionality (LID), combined with the advantages of quantum computing, an adversarial example detection algorithm based on quantum LID was proposed. First, the SWAP-Test quantum algorithm was used to calculate the similarity between the measured example and all examples in one time, avoiding the redundant calculation in the classical algorithm. Then Quantum Phase Estimation (QPE) algorithm and quantum Grover search algorithm were combined to calculate the local intrinsic dimension of the measured example. Finally, LID was used as the evaluation basis of the binary detector to detect and distinguish the adversarial examples. The detection algorithm was tested and verified on IRIS, MNIST, and stock time series datasets. The simulation experimental results show that the calculated LID values can highlight the difference between adversarial examples and normal examples, and can be used as a detection basis to differentiate example attributes. Theoretical research proves that the time complexity of the proposed detection algorithm is the same order of magnitude as the product of the number of iterations of Grover operator and the square root of the number of adjacent examples and the number of training examples, which is obviously better than that of the adversarial example detection algorithm based on LID and achieves exponential acceleration.

Key words: Local Intrinsic Dimensionality (LID), adversarial example, binary detection, quantum computing, stock prediction

中图分类号: