Unveiling the Risks: Security Engineering for Machine Learning

Introduction

Machine Learning (ML) has experienced remarkable growth in recent years, transforming various domains such as image classification, machine translation, and autonomous vehicles. However, the widespread adoption of ML also introduces systematic risks to our applications. In this blog post, I will delve into the captivating session on “Security Engineering for Machine Learning” presented by Dr. Gary McGraw at SecAppDev 2023. The session sheds light on the results of applying architectural risk analysis to identify the top risks associated with engineering ML systems.

Understanding ML Systems

To fully comprehend the risks associated with ML systems, it is crucial to grasp the fundamental aspects of this technology. Unlike traditional programming, where explicit instructions dictate how to accomplish a task, ML operates by determining what needs to be done and allowing the model to find a suitable solution. ML models often employ neural networks inspired by the human brain to process and analyze data. Although ML models have demonstrated remarkable effectiveness, they are still considerably less complex than the intricacies of the human brain.

Fig. I. A classic picture processing model inspired by the brain.

Equally important is understanding the underlying components of ML systems and how they interact. ML systems consist of various elements, including raw data, dataset assembly, datasets (training, validation, and test sets), learning algorithms, evaluation, inputs, models, inference algorithms, and outputs. Each component presents its own set of risks that need to be addressed to ensure the security and reliability of ML systems.

Fig. II. Underlying components and how they interact in Machine learning models

The ML Risk Landscape

Dr. McGraw’s research at the Berryville Institute of Machine Learning (BIIML) has identified a total of 78 risks associated with 10 components in a generic ML model. These risks encompass the entire ML pipeline, from the collection of raw data to the output of the model. Let’s delve into some of the key risks highlighted during the session:

  1. Raw Data in the World (13 risks):
    • Data confidentiality: ML systems trained on confidential or sensitive data can inadvertently embed aspects of that data, potentially leading to attacks aimed at extracting confidential information indirectly.
    • Trustworthiness: Data sources may lack reliability and trustworthiness, posing risks of tampering or poisoning of input data.
  2. Dataset Assembly (8 risks):
    • Encoding integrity: Pre-processing stages can introduce or exacerbate encoding integrity issues, potentially creating security problems.
    • Annotation biases: The tagging and annotation of data can be directly targeted by attackers, introducing biased examples that hinder the generalization capabilities of ML systems.
  3. Datasets (7 risks):
    • Poisoning: Adversaries may manipulate data in raw data, dataset assembly, and dataset components to disrupt the training process of ML models.
    • Transfer: Risks arise when reusing pre-trained models, as prior risks associated with the model can carry over, and the introduction of Trojans becomes a concern.
  4. Learning Algorithm (11 risks):
    • Online learning: Continual adjustments during online learning can lead to unintended deviations from the desired operational use case, creating potential vulnerabilities.
    • Reproducibility: Lack of reproducibility in ML work can undermine confidence in a particular ML system’s performance.
  5. Evaluation (7 risks):
    • Overfitting: Highly accurate learning on the training data can result in poor generalization outside of the training set, limiting the system’s effectiveness.
    • Improper evaluation data: Flawed evaluation datasets can provide misleading results, impacting the assessment of the model’s performance.
  6. Inputs (5 risks):
    • Adversarial examples: Malicious input, known as adversarial examples, poses a significant risk to ML systems.
    • Controlled input stream: Manipulation of input data from external sources can intentionally affect the behavior of ML systems.
  1. Model (5 risks):
    • Improper re-use: Risks associated with the transfer of ML models to different contexts or applications.
    • Trojan: Models used in transfer scenarios may be compromised, leading to the use of Trojaned or damaged versions of the intended models.
  2. Inference Algorithm (5 risks):
    • Online operation: Fielded models operating online can be pushed beyond their boundaries, potentially compromising their functionality.
    • Inscrutability: Insufficient understanding of ML system operations can pose risks when integrating ML systems into larger systems that rely on their proper functioning.
  3. Outputs (7 risks):
    • Direct attack: Attacks directly targeting the output stream of ML systems can have cascading effects on the larger systems they are integrated with.
    • Ensuring the trustworthiness of ML systems becomes crucial, as even temporary or partial attacks on the output can diminish trust.
  4. System-wide risks (10 risks):
    • Black box discrimination: Risks associated with biased behavior in ML systems that handle personal data or impact high-stakes decision-making processes.
    • Overconfidence: Integration of ML systems into larger systems can lead to overconfidence in their performance, fueled by limited understanding and vague descriptions of ML operations.

These risks, along with additional risks outlined in the research papers, underscore the importance of addressing and mitigating the various vulnerabilities inherent in ML systems throughout their lifecycle.

Key Takeaways

The session at SecAppDev highlights the top five ML security risks based on the architectural risk analysis conducted by BIML. These risks include:

  1. Adversarial Examples: Adversaries can manipulate ML systems by providing malicious inputs, causing false predictions or categorizations.
  2. Data Poisoning: Intentional manipulation of the data used by an ML system can compromise its entire functionality.
  3. Online System Manipulation: Attackers can nudge a learning ML system in the wrong direction, leading to improper retraining and undesirable behavior.
  4. Transfer Learning Attack: ML systems built on pre-trained models can be vulnerable to attacks when the base system is tampered with or contains hidden threats.
  5. data confidentiality: Risks that arise from interactions between components, such as black box discrimination and overconfidence in the ML system’s output, need to be carefully considered.

Conclusion

The adoption of ML brings both exciting opportunities and potential risks. It is crucial for security engineers and practitioners to be aware of the risks involved in engineering ML systems. The session on “Security Engineering for Machine Learning” at SecAppDev, presented by Dr. Gary McGraw, provided valuable insights into the top risks identified through architectural risk analysis. By addressing these risks and adopting robust security engineering practices, we can ensure the reliability and trustworthiness of ML applications.

Remember, security engineering for machine learning is an ongoing process, and staying informed about new developments and best practices is essential to protect ML systems from evolving threats. With a proactive approach and continuous improvement, we can build a secure and resilient ML ecosystem for the future.