Free practice · No sign-up required

CY0 CompTIA SecAI+ Beta free practice test

20 questions with answer explanations. Choose an answer below to begin.

Question 1 of 20

A security analyst at a healthcare company is testing an image classification model that diagnoses skin conditions. The model misclassifies a benign mole as malignant after a small, imperceptible change to the image pixels. Which type of attack has occurred?

Show hint

1.1 Identify adversarial attacks on AI systems

0/20 answered · Bookmark questions to review later. Focus the practice area to use keys 1–9 and Enter.

Learn by doing

Put your answers into practice

Use official documentation and hands-on labs to work through topics you missed.

Explore all study resources →

All questions and explanations

Prefer to read at your own pace? Work through each question below, then open its answer to check your reasoning. You can link directly to a question or print this reference.

  1. A security analyst at a healthcare company is testing an image classification model that diagnoses skin conditions. The model misclassifies a benign mole as malignant after a small, imperceptible change to the image pixels. Which type of attack has occurred?

    1. Adversarial example

    2. Data poisoning

    3. Model inversion

    4. Model stealing

    Show answer and explanation

    Correct answer

    • Adversarial example

    An adversarial example involves adding small, deliberate perturbations to input data to cause a model to make incorrect predictions. Data poisoning corrupts training data, model inversion reconstructs private data, and model stealing extracts model parameters.

  2. Which attack aims to reconstruct sensitive training data by querying the model and analyzing its outputs?

    1. Membership inference

    2. Model inversion

    3. Adversarial attack

    4. Data poisoning

    Show answer and explanation

    Correct answer

    • Model inversion

    Model inversion attacks attempt to reconstruct representative samples of the training data, potentially revealing private information. Membership inference determines if a specific record was in training, adversarial attacks cause misclassification, and data poisoning corrupts training.

  3. During the training of a spam classifier, an attacker subtly alters thousands of spam emails to include common keywords from legitimate emails. Over time, the model begins to classify spam as legitimate. What is the primary attack vector?

    1. Model inversion

    2. Adversarial perturbation at inference

    3. Poisoning of training data

    4. Model stealing via API

    Show answer and explanation

    Correct answer

    • Poisoning of training data

    Data poisoning occurs when an attacker influences the training data to manipulate the model's behavior. Here, altering training samples to include legitimate keywords causes the model to learn incorrect associations. The other options describe different attacks.

  4. A company wants to train a model on user data but ensures that the model cannot reveal whether a specific individual's data was used in training. Which technique best achieves this?

    1. Federated learning

    2. Secure multi-party computation

    3. Homomorphic encryption

    4. Differential privacy

    Show answer and explanation

    Correct answer

    • Differential privacy

    Differential privacy adds noise to the training process to guarantee that the model's outputs do not reveal membership of any individual record. Federated learning trains locally, SMPC allows joint computation, and homomorphic encryption supports encrypted computation, but only differential privacy directly addresses membership privacy.

  5. In a scenario where multiple hospitals want to jointly train a model on their patient data without exposing the data to each other, which technique should be used?

    1. Federated learning with secure aggregation

    2. Differential privacy

    3. Secure multi-party computation (MPC)

    4. Model watermarking

    Show answer and explanation

    Correct answer

    • Federated learning with secure aggregation

    Federated learning trains models locally and aggregates updates without sharing raw data. Secure aggregation ensures that individual updates are encrypted and combined so no party sees others' updates. MPC is a broader cryptographic tool, but federated learning with secure aggregation is the standard approach for collaborative training.

  6. An attacker has black-box access to a model and can observe its predictions. They want to determine if a specific person's record was part of the training dataset. Which attack best describes this?

    1. Model inversion

    2. Membership inference

    3. Data poisoning

    4. Adversarial example

    Show answer and explanation

    Correct answer

    • Membership inference

    Membership inference attacks aim to infer whether a particular data point was used in training. Model inversion reconstructs data, poisoning corrupts training, and adversarial examples cause misclassifications.

  7. In a federated learning system, a malicious participant sends carefully crafted model updates that gradually steer the global model toward misclassifying certain inputs. What is this attack called?

    1. Inference attack

    2. Data poisoning

    3. Model poisoning

    4. Evasion attack

    Show answer and explanation

    Correct answer

    • Model poisoning

    Model poisoning attacks specifically target federated learning by corrupting local model updates to manipulate the global model. Data poisoning generally refers to corrupting training data, evasion attacks occur at inference, and inference attacks extract information.

  8. Which concept in AI security refers to the ability to understand and interpret why a model made a specific decision?

    1. Bias auditing

    2. Model validation

    3. Adversarial robustness

    4. Explainable AI (XAI)

    Show answer and explanation

    Correct answer

    • Explainable AI (XAI)

    Explainable AI provides insights into model decisions. Bias auditing detects unfairness, model validation evaluates performance, and adversarial robustness measures resistance to adversarial examples.

  9. A loan approval model is found to approve applications from one demographic group at a significantly lower rate than others, even when the applicants have similar financial profiles. Which step should be taken to address this issue?

    1. Perform bias testing and mitigation

    2. Apply differential privacy

    3. Add adversarial training

    4. Implement model inversion defense

    Show answer and explanation

    Correct answer

    • Perform bias testing and mitigation

    Bias testing and mitigation techniques, such as re-weighting or fairness constraints, address disparate impact. Differential privacy protects privacy, adversarial training improves robustness, and model inversion defense protects against reconstruction attacks.

  10. Question 10

    Link to question

    An attacker places a specially designed sticker on a stop sign, causing an autonomous vehicle's vision model to classify it as a speed limit sign. This is an example of:

    1. Data poisoning

    2. Adversarial patch

    3. Model inversion

    4. Membership inference

    Show answer and explanation

    Correct answer

    • Adversarial patch

    An adversarial patch is a physical object (like a sticker) that, when placed in the scene, causes the model to misclassify. Data poisoning corrupts training data, model inversion reconstructs data, and membership inference determines if a record was used.

  11. Question 11

    Link to question

    An attacker with API access to a cloud-based model repeatedly queries it with carefully chosen inputs to create a surrogate model that mimics the original. Which attack is this?

    1. Adversarial example

    2. Membership inference

    3. Model stealing

    4. Data poisoning

    Show answer and explanation

    Correct answer

    • Model stealing

    Model stealing attacks aim to copy the functionality of a model by querying it and training a replicate. Adversarial examples cause misclassification, membership inference determines if a record was in training, and data poisoning corrupts training.

  12. Question 12

    Link to question

    Which security measure ensures that model inference is performed in a hardware-protected environment that isolates it from the rest of the system?

    1. Secure multi-party computation

    2. Homomorphic encryption

    3. Differential privacy

    4. Trusted execution environment (TEE)

    Show answer and explanation

    Correct answer

    • Trusted execution environment (TEE)

    A TEE, such as Intel SGX or AMD SEV, provides hardware-based isolation for code and data during execution. SMPC and homomorphic encryption are cryptographic techniques, and differential privacy adds noise to data.

  13. Question 13

    Link to question

    When deploying an AI model that accepts user input, which practice is most critical to prevent injection attacks?

    1. Input validation and sanitization

    2. Regularizing the model

    3. Using differential privacy

    4. Implementing model watermarking

    Show answer and explanation

    Correct answer

    • Input validation and sanitization

    Input validation ensures that inputs are safe and within expected bounds, preventing injection attacks like SQL or prompt injection. Regularization reduces overfitting, differential privacy protects privacy, and watermarking disincentivizes theft.

  14. Question 14

    Link to question

    A model developer wants to embed a secret pattern into a model's outputs to prove ownership if the model is stolen. Which technique should be used?

    1. Differential privacy

    2. Model watermarking

    3. Federated learning

    4. Adversarial training

    Show answer and explanation

    Correct answer

    • Model watermarking

    Model watermarking embeds a unique signature into the model's behavior, allowing owners to verify theft. Differential privacy adds noise, federated learning trains distributively, and adversarial training improves robustness.

  15. Question 15

    Link to question

    A data scientist is cleaning a dataset for training a sentiment analysis model. They discover that many samples contain offensive language that could bias the model. What should be done first?

    1. Remove all offensive samples

    2. Use adversarial training to remove bias

    3. Apply data sanitization and filtering

    4. Ignore the issue as it will not affect the model

    Show answer and explanation

    Correct answer

    • Apply data sanitization and filtering

    Data sanitization involves filtering out inappropriate or biased content to prevent the model from learning harmful patterns. Simply removing all offensive samples may remove useful context; sanitization handles it more carefully. Adversarial training is not for bias removal, and ignoring the issue could lead to harmful biases.

  16. Question 16

    Link to question

    In a model evaluation, the team finds that accuracy is high but the model's decisions are easily swayed by small random noise added to inputs. Which property is lacking?

    1. Generalization

    2. Explainability

    3. Privacy

    4. Adversarial robustness

    Show answer and explanation

    Correct answer

    • Adversarial robustness

    Adversarial robustness measures how well a model resists small, intentional input perturbations. Generalization refers to performance on unseen data, explainability is about interpretability, and privacy concerns data leakage.

  17. Question 17

    Link to question

    A company is using an AI model to screen job applications. A candidate sues, claiming the model discriminated based on gender. The company cannot explain why the model made its decisions. What should the company have implemented to defend against such claims?

    1. Explainable AI (XAI) techniques

    2. Differential privacy during training

    3. Adversarial training to prevent attacks

    4. Secure aggregation of candidate data

    Show answer and explanation

    Correct answer

    • Explainable AI (XAI) techniques

    Explainable AI provides transparency into model decisions, which is essential for defending against discrimination claims by showing that decisions were based on relevant factors. Differential privacy protects privacy, adversarial training improves robustness, and secure aggregation is for federated learning.

  18. Question 18

    Link to question

    A financial institution wants to use homomorphic encryption for inference to protect client data. What is a major trade-off of this approach?

    1. Increased vulnerability to adversarial examples

    2. Significant computational overhead

    3. Loss of model accuracy due to noise

    4. Inability to update the model after deployment

    Show answer and explanation

    Correct answer

    • Significant computational overhead

    Homomorphic encryption allows computation on encrypted data but imposes high computational costs, making it impractical for real-time applications. It does not inherently increase vulnerability to adversarial examples, accuracy loss from noise is more related to differential privacy, and models can still be updated.

  19. Question 19

    Link to question

    A developer is using a pre-trained model from an online repository. Before integrating it into a critical system, what is the most important security step?

    1. Re-train the model on proprietary data

    2. Apply differential privacy to the model weights

    3. Validate the model's provenance and integrity

    4. Deploy the model in a sandbox for one week

    Show answer and explanation

    Correct answer

    • Validate the model's provenance and integrity

    Validating provenance ensures that the model has not been tampered with or contains backdoors. Checking integrity via checksums or signatures is crucial. Re-training may be advisable but is not the most important security step; differential privacy is for privacy, and sandbox testing is useful but not primary for trust.

  20. Question 20

    Link to question

    During an AI security audit, the team discovers that an image recognition model has a backdoor: it classifies any image with a specific yellow square as 'target'. How was the backdoor likely introduced?

    1. Using adversarial patches during inference

    2. Extracting the model via API queries

    3. Overfitting to training data noise

    4. Poisoning the training data with triggers

    Show answer and explanation

    Correct answer

    • Poisoning the training data with triggers

    A backdoor is typically introduced by data poisoning, where an attacker inserts specific patterns (triggers) into training samples and labels them incorrectly. Adversarial patches are applied at inference to cause misclassification, not training. Model extraction steals the model, and overfitting does not create intentional backdoors.

Read all flashcards

Recall the answer before opening each card.

What attack adds small, imperceptible perturbations to input to cause misclassification?

Adversarial example. It involves deliberate input modifications that are invisible to humans but cause the model to err. This differs from data poisoning (training corruption) and model inversion (data reconstruction).

Which attack reconstructs sensitive training data from model outputs?

Model inversion. It queries the model to infer representative samples of training data, potentially exposing private information. Membership inference only determines inclusion, not data content.

What attack corrupts training data to manipulate model behavior?

Data poisoning. It alters training samples or labels to cause the model to learn incorrect patterns. Adversarial examples affect inference, while model poisoning targets federated learning updates.

Which technique prevents a model from revealing if an individual's data was used in training?

Differential privacy. It adds noise to the training process to guarantee that outputs are insensitive to any single record. Federated learning trains locally without sharing data but does not by itself guarantee membership privacy.

How can multiple hospitals collaboratively train a model without sharing raw patient data?

Federated learning with secure aggregation. Each hospital trains locally and shares encrypted updates; aggregation combines them without exposing individual data. MPC is an alternative but less common for this scenario.

What attack determines if a specific record was in the training dataset?

Membership inference. It uses model predictions to infer inclusion. Model inversion reconstructs data, while poisoning attacks corrupt training. Adversarial examples cause misclassification.

What attack in federated learning involves sending malicious model updates to corrupt the global model?

Model poisoning. It targets the aggregation process by sending crafted updates that gradually degrade performance or introduce backdoors. Data poisoning corrupts training data directly.

What field provides insights into why a model made a specific decision?

Explainable AI (XAI). It uses techniques like feature importance or saliency maps to make model decisions interpretable, crucial for trust and compliance. Bias auditing detects discrimination but does not explain individual decisions.

A loan model approves one demographic group at a lower rate than others, all else equal. How should this be addressed?

Perform bias testing and mitigation. Techniques like re-weighting or fairness constraints reduce disparate impact. Differential privacy does not address fairness; adversarial training improves robustness.

What is a physical adversarial attack where a sticker causes misclassification?

Adversarial patch. A physical object (e.g., sticker) placed in the scene can fool a model. Data poisoning corrupts training; model inversion reconstructs data; membership inference checks inclusion.

An attacker queries a cloud model repeatedly to train a substitute model. What attack?

Model stealing. It aims to replicate the model's functionality by observing input-output pairs. Adversarial examples cause misclassification; membership inference checks training inclusion; data poisoning corrupts training.

What hardware-based isolation protects model inference from system compromise?

Trusted execution environment (TEE). It provides a secure enclave (e.g., Intel SGX) for code and data. Cryptographic techniques like SMPC require no special hardware but are slower.

What is the most critical practice to prevent injection attacks when a model accepts user input?

Input validation and sanitization. It ensures inputs are safe, preventing SQL or prompt injection. Regularization reduces overfitting; differential privacy protects privacy; watermarking deters theft.

What technique embeds a secret pattern in model outputs to prove ownership?

Model watermarking. It inserts a unique signature detectable only by the owner. Differential privacy adds noise; federated learning trains distributively; adversarial training improves robustness.

A dataset contains offensive language that could bias a sentiment model. What first step?

Apply data sanitization and filtering. Remove or appropriately handle harmful content to avoid learning biases. Adversarial training is for robustness; ignoring the issue may cause harmful biases.

A model has high accuracy but is easily fooled by small input noise. What property is lacking?

Adversarial robustness. It measures resistance to intentional perturbations. Generalization is about unseen data; explainability is interpretability; privacy concerns data leakage.

What should a company implement to defend against discrimination claims from an AI screening tool?

Explainable AI (XAI) techniques. They provide transparency into why decisions were made, showing reliance on job-relevant factors. Differential privacy protects privacy; adversarial training improves robustness.

What is a major trade-off of using homomorphic encryption for inference?

Significant computational overhead. It allows computation on encrypted data but is too slow for real-time use. Accuracy loss from noise is more typical of differential privacy; models can still be updated.

Before integrating a pre-trained model from an online repository, what security step is most important?

Validate the model's provenance and integrity. Check for tampering or backdoors using checksums or signatures. Re-training may be needed but is secondary; differential privacy is for privacy; sandboxing is useful but not primary.

An image model classifies any image with a yellow square as 'target'. How was this backdoor likely introduced?

Poisoning the training data with triggers. An attacker inserts a specific pattern into training samples and labels them incorrectly. Adversarial patches are inference-time; model extraction steals the model; overfitting does not create intentional backdoors.

Active recall deck

Practice CY0 CompTIA SecAI+ Beta with real flashcards

Read the prompt, commit to an answer, then flip the card. Move through the deck at your own pace and repeat any topic that does not come back quickly.

20 free cards

Card 1 of 20

1 reviewed this session

Connect the concepts

Your CY0 CompTIA SecAI+ Beta study mind map

Open a branch to connect a topic with its practice questions and explanations. Use the map to choose your next review topic.

CY0 CompTIA SecAI+ Beta20 questions in this practice set
1.1 Identify adversarial attacks on AI systems(2)
1.2 Describe privacy attacks on machine learning models(2)
1.3 Distinguish data poisoning from other attacks(2)
2.1 Apply privacy-preserving techniques(1)
2.2 Implement secure collaborative learning(1)
1.4 Differentiate model poisoning in federated learning(1)
3.1 Explain the importance of explainable AI(2)
3.2 Apply fairness and bias mitigation(1)
1.5 Describe model extraction attacks(1)
4.1 Implement secure deployment environments(1)
4.2 Apply secure coding practices for AI(1)
4.3 Describe model provenance and watermarking(2)
More practice connections(3)
Exam-focused analysis

What this CY0 practice set measures

This is an analysis of the practice bank, not a claim about the vendor's live exam blueprint. Use it to identify the knowledge, judgment, and recall patterns exercised here, then verify your coverage against the current official exam guide.

1.1 Identify Adversarial Attacks on AI Systems

Adversarial attacks manipulate inputs to cause misclassification. An adversarial example adds small, imperceptible perturbations to data, while an adversarial patch is a physical object like a sticker that induces errors. These attacks exploit model sensitivity and are distinct from data poisoning (training data corruption). Understanding these vectors is critical for defending against inference-time threats.

  • Adversarial examples use subtle input perturbations to trigger misclassification.
  • Adversarial patches are physical objects that cause model errors when present in the scene.
  • Both attacks target model prediction rather than training data.

1.2 and 1.4 Describe Privacy Attacks and Model Poisoning

Privacy attacks extract sensitive information from models. Model inversion reconstructs training data, membership inference determines if a record was used, and model stealing replicates functionality. In federated learning, model poisoning corrupts local updates to manipulate the global model. These attacks highlight the need for data protection and robust aggregation.

  • Model inversion reconstructs representative samples from training data.
  • Membership inference checks if a specific data point was in training.
  • Model stealing copies model behavior via querying.
  • Model poisoning attacks target federated learning by altering local model updates.

2.1, 2.2, 2.3 Privacy Preservation and Collaborative Learning

Differential privacy adds noise to training to prevent membership inference. Federated learning with secure aggregation allows collaborative training without sharing raw data. Homomorphic encryption enables computation on encrypted data but incurs high computational overhead. Choosing the right technique balances privacy, functionality, and performance.

  • Differential privacy guarantees that model outputs do not reveal individual record membership.
  • Federated learning trains models locally; secure aggregation encrypts updates.
  • Homomorphic encryption allows inference on encrypted data but is computationally expensive.

3.1, 3.2, 3.3 Explainability, Fairness, and Data Quality

Explainable AI provides transparency into model decisions, essential for defending against discrimination claims. Bias testing and mitigation address disparate impact. Data sanitization removes offensive or biased content to prevent harmful patterns. These practices ensure ethical and robust AI deployment.

  • Explainable AI (XAI) helps interpret model decisions and defend against bias allegations.
  • Bias testing and mitigation techniques reduce unfair outcomes across demographic groups.
  • Data sanitization filters inappropriate content to avoid learning harmful biases.

Study workflow

Turn one CY0 attempt into a study plan

  1. 1

    Validate and Sanitize Training Data

    Before training, inspect data for biases, offensive language, or potential poisoning triggers. Remove or appropriately handle harmful samples to prevent the model from learning undesirable patterns. Use automated filtering and manual review to ensure data integrity.

  2. 2

    Implement Differential Privacy During Training

    Add calibrated noise to the training process or gradients to bound the model's sensitivity to individual records. This protects against membership inference even if an attacker gains access to the model. Choose privacy budget (ε) appropriate for the use case.

  3. 3

    Use Federated Learning with Secure Aggregation

    When training across multiple data owners, keep data local and only share encrypted model updates. Secure aggregation combines these updates without revealing individual contributions, preventing data leakage and model poisoning.

  4. 4

    Deploy Models in Trusted Execution Environments (TEEs)

    Run model inference inside a hardware-enclave like Intel SGX to isolate computations from the host OS. This protects model parameters and user data from unauthorized access, even if the system is compromised.

  5. 5

    Apply Input Validation and Sanitization at Inference

    Validate all inputs against expected schemas, ranges, and types. Use sanitization libraries to strip potentially malicious content (e.g., SQL injection, prompt injection). This prevents attackers from manipulating model behavior through crafted inputs.

FAQ

Questions about this CY0 practice page

Clear boundaries on what the bank covers, how to use it, and where official vendor information still matters.

What is the difference between data poisoning and model poisoning?+

Data poisoning corrupts the training data itself, causing the model to learn incorrect associations. Model poisoning specifically targets federated learning by sending malicious local model updates to manipulate the global model. Both aim to degrade model performance but differ in the attack vector.

How does differential privacy protect against membership inference?+

Differential privacy adds noise to training algorithms so that the model's outputs are approximately the same whether any individual record is included or not. This makes it infeasible for an attacker to determine if a specific person's data was used, preserving membership privacy.

What is a trusted execution environment (TEE) and why is it important for AI security?+

A TEE is a hardware-isolated environment (e.g., Intel SGX) that protects code and data during execution. It ensures that even if the operating system is compromised, the model and its inputs remain confidential and tamper-free, crucial for sensitive inference tasks.

What are the trade-offs of using homomorphic encryption for inference?+

Homomorphic encryption allows computation on encrypted data, preserving privacy. However, it imposes significant computational overhead, making it impractical for real-time applications. It also does not protect against adversarial examples or model theft on its own.

Why is explainable AI (XAI) important for regulatory compliance?+

XAI provides transparency into how models reach decisions. In regulated sectors like finance and healthcare, this is essential for demonstrating fairness, avoiding discrimination claims, and meeting legal requirements to explain adverse outcomes.

Keep studying

Build the next review session

Browse another free bank or use the study strategy guide to turn your misses into spaced review.