
Question bank
Google Professional Machine Learning Engineer
42 Google Professional Machine Learning Engineer questions with the correct answer and a written explanation, organised across 4 exam domains.
- 42 questions
- 4 domains
- Foundation level
Question index
Jump straight to any question. Answers and explanations are inline.
- Data engineering and preprocessing · 1, 2, 3, 4, 5, 6, 7, 8
- MLOps (pipeline automation, deployment, monitoring) · 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22
- Model development and evaluation · 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34
- Problem framing and solution design · 35, 36, 37, 38, 39, 40, 41, 42
Data engineering and preprocessing
8 questions in this domain
- Question 1Single Choice
What is the primary benefit of using transfer learning with a pre-trained model on a specialized dataset?
- AIt accelerates training and reduces data requirements.Correct answer
- BIt removes the need for any validation data.
- CIt always produces higher accuracy than training from scratch.
- DIt automatically sets all hyperparameters for the model.
Why this is the answer
Transfer learning reuses pre-trained models to speed up training and reduce the data needed for specialized tasks.
- Question 2Multiple Select
Which two strategies are commonly used to scale distributed training across multiple accelerators or nodes?
- AData parallelismCorrect answer
- BModel parallelismCorrect answer
- CBayesian optimization
- DEarly stopping
Why this is the answer
Distributed training scales by splitting data across workers or by splitting the model itself; Bayesian optimization and early stopping are tuning techniques.
- Question 3Interactive
In the code block, which configuration element determines the range and type of allowed values for each hyperparameter?
- AMetric specification
- BParameter specificationCorrect answer
- CMaximum trial count
- DParallel trial count
Why this is the answer
The parameter_spec defines the search space for Vertex AI Vizier, including discrete and continuous ranges for each hyperparameter.
- Question 4Single Choice
How does L1 regularization, also known as Lasso, control model complexity?
- AIt adds the absolute value of the weights as a penalty term.Correct answer
- BIt adds the squared magnitude of the weights as a penalty term.
- CIt randomly disables a fraction of neurons during training.
- DIt stops training when the validation loss stops improving.
Why this is the answer
L1 regularization penalizes the absolute value of weights, encouraging sparsity and reducing overfitting.
- Question 5Multiple Select
Which metrics are generally more informative than accuracy when evaluating a highly imbalanced classification dataset?
- APrecisionCorrect answer
- BRecallCorrect answer
- CF1-scoreCorrect answer
- DAccuracy
Why this is the answer
Accuracy is misleading when one class dominates; precision, recall, and F1-score provide a better view of performance on the minority class.
- Question 6Interactive
What type of prediction task is the model in the code block designed to solve?
- ABinary classificationCorrect answer
- BMulti-class classification
- CRegression
- DClustering
Why this is the answer
The binary_crossentropy loss is used for binary classification, where the target has two classes.
- Question 7Single Choice
What is the purpose of the objective function in a Vertex AI Vizier hyperparameter tuning job?
- AIt defines the search space for each hyperparameter.
- BIt specifies the evaluation metric to maximize or minimize.Correct answer
- CIt determines the number of parallel trials to run.
- DIt selects the training algorithm for the model.
Why this is the answer
The objective function specifies the metric that Vertex AI Vizier tries to optimize, aligning tuning with the business goal.
- Question 8Multiple Select
Which two statements about hyperparameters are correct?
- AThey are learned by the model during training.
- BThey control the training process.Correct answer
- CThey must be tuned using validation data.Correct answer
- DThey include weights and biases.
Why this is the answer
Hyperparameters like learning rate and batch size govern training and are selected with validation data, while weights and biases are learned parameters.
MLOps (pipeline automation, deployment, monitoring)
14 questions in this domain
- Question 9Single Choice
In the context of MLOps on Google Cloud, what is the primary purpose of transfer learning when applied to a specialized dataset?
- AReusing a pre-trained modelCorrect answer
- BStarting training from scratch
- CTuning hyperparameters automatically
- DAdding penalties to model weights
Why this is the answer
Transfer learning leverages a pre-trained model as a starting point, reducing training time and data requirements for specialized tasks.
- Question 10Multiple Select
According to the playbook, which of the following techniques are used to prevent overfitting by penalizing model complexity or improving generalization?
- AL1 (Lasso)Correct answer
- BL2 (Ridge)Correct answer
- CDropoutCorrect answer
- DData augmentation
Why this is the answer
L1, L2, and Dropout are regularization approaches mentioned; dropout randomly drops neurons, while L1/L2 penalize large weights.
- Question 11Interactive
Consider the following Keras snippet, where a pre-trained model is used to build a new classifier. What is the effect of setting the trainable attribute of the base model to False?
- AThe pre-trained weights are not updatedCorrect answer
- BThe pre-trained weights are updated with a low learning rate
- CThe pre-trained weights are randomly reinitialized
- DThe pre-trained weights are pruned to zero
Why this is the answer
When trainable is False, the layer weights are frozen and do not receive gradient updates, preserving their pre-trained representations.
- Question 12Single Choice
What is the role of Vertex AI Vizier in the Google Cloud MLOps workflow?
- AAutomates hyperparameter tuning with Bayesian optimizationCorrect answer
- BStores and versions trained model artifacts
- CTransforms raw data into engineered features
- DDeploys models to edge devices
Why this is the answer
Vertex AI Vizier is a black-box optimization service that uses Bayesian optimization to automatically find optimal hyperparameters.
- Question 13Multiple Select
Which of the following are hyperparameters that control the training process instead of being learned automatically from the data?
- ALearning rateCorrect answer
- BBatch sizeCorrect answer
- CWeights and biases
- DNumber of hidden layersCorrect answer
Why this is the answer
Learning rate, batch size, and number of layers are set before training, whereas weights and biases are learned from data.
- Question 14Interactive
Review the provided Vertex AI Vizier code block. What aspect of the tuning job is being configured?
- ASearch space definitionCorrect answer
- BObjective metric selection
- CEarly stopping policy
- DData validation schema
Why this is the answer
The code defines the search space by listing each hyperparameter and the range or set of values allowed for tuning.
- Question 15Single Choice
How is Precision defined in binary classification evaluation?
- AOf all predicted positive cases, how many were actually positiveCorrect answer
- BOf all actual positive cases, how many were predicted positive
- CThe accuracy across all predicted cases
- DThe area under the ROC curve
Why this is the answer
Precision, or positive predictive value, measures how many of the positively predicted instances are truly positive.
- Question 16Multiple Select
In which of the following situations is high Recall particularly important due to the high cost of false negatives?
- AMedical diagnosisCorrect answer
- BFraud detectionCorrect answer
- CSpam detection
- DDog breed classification
Why this is the answer
Recall matters most when false negatives are dangerous, such as medical diagnosis and fraud detection; spam detection prioritizes precision due to false-positive cost.
- Question 17Interactive
Given the Python variables in the code snippet, which evaluation metric is the resulting value?
- AF1-scoreCorrect answer
- BAccuracy
- CAUC-ROC
- DMean squared error
Why this is the answer
The code calculates F1-score, the harmonic mean of precision and recall, combining both metrics into a single value.
- Question 18Single Choice
In transfer learning, what distinguishes pure feature extraction from fine-tuning?
- AThe pre-trained backbone is frozen and only the new head is trainedCorrect answer
- BAll layers of the pre-trained model are unfrozen and retrained
- CThe entire model is trained from scratch with a low learning rate
- DThe model is pruned to reduce latency
Why this is the answer
In feature extraction, the pre-trained weights are frozen and only the task-specific head is trained on new data.
- Question 19Multiple Select
Which of the following are common MLOps traps described in the playbook?
- AChoosing the most complex model solely because it has high training accuracyCorrect answer
- BUsing the test set to tune hyperparametersCorrect answer
- CSelecting a model architecture incompatible with the deployment hardwareCorrect answer
- DMonitoring the training-validation gap
Why this is the answer
Tuning on the test set, ignoring hardware constraints, and selecting models based only on training accuracy are all common traps.
- Question 20Interactive
In the code snippet, an EarlyStopping callback is added to model training. What effect does it have?
- AIt stops training when validation loss stops improvingCorrect answer
- BIt increases the learning rate when accuracy drops
- CIt switches the optimizer during training
- DIt freezes layers after a fixed number of epochs
Why this is the answer
EarlyStopping monitors validation loss and halts training when it no longer improves, saving time and resources.
- Question 21Single Choice
What does the AUC-ROC metric represent in model evaluation?
- AThe ability to distinguish between classes across all thresholdsCorrect answer
- BThe accuracy at a single fixed threshold
- CThe harmonic mean of precision and recall
- DThe proportion of positive predictions that are correct
Why this is the answer
AUC-ROC measures how well a model separates classes across all possible thresholds; 0.5 corresponds to random guessing.
- Question 22Multiple Select
Which statements about model evaluation on highly imbalanced datasets are true, according to the playbook?
- AAccuracy can be misleading when one class dominatesCorrect answer
- BThe precision-recall curve focuses on the minority classCorrect answer
- CThe ROC curve can appear overly optimistic when the negative class dominatesCorrect answer
- DF1-score is the arithmetic mean of precision and recall
Why this is the answer
Accuracy hides majority-class bias; PR curves emphasize minority class and are more reliable than ROC for rare events; F1 is harmonic mean.
Model development and evaluation
12 questions in this domain
- Question 23Single Choice
What is transfer learning in machine learning?
- ATraining a model from scratch using randomly initialized weights
- BLeveraging pre-trained models on specialized datasets to accelerate training and reduce data requirementsCorrect answer
- CUsing a model's predictions to generate synthetic training data
- DAutomatically searching for optimal hyperparameters for a model
Why this is the answer
Transfer learning uses a pre-trained model as a starting point and adapts it to a specialized task, reducing training time and data requirements.
- Question 24Multiple Select
Which of the following are regularization techniques mentioned as ways to prevent overfitting?
- AL1 (Lasso)Correct answer
- BL2 (Ridge)Correct answer
- CDropoutCorrect answer
- DEarly stopping
Why this is the answer
The playbook lists L1 (Lasso), L2 (Ridge), and Dropout as regularization techniques used to prevent overfitting by penalizing model complexity.
- Question 25Interactive
Consider the code snippet used to construct a neural network. Which element in the snippet is considered a model parameter learned during training?
- Alearning_rate=0.01
- Bdropout_rate=0.2
- Chidden_units=128
- Dmodel.weightsCorrect answer
Why this is the answer
Model parameters are values like weights and biases that are learned during training. Hyperparameters such as learning rate, dropout rate, and hidden units control the training process.
- Question 26Single Choice
What is Vertex AI Vizier primarily used for on Google Cloud?
- AAutomating hyperparameter tuning using advanced algorithms like Bayesian optimizationCorrect answer
- BStoring and versioning trained model artifacts
- CManaging distributed training across multiple GPUs
- DMonitoring model performance in production
Why this is the answer
Vertex AI Vizier is the primary GCP tool for hyperparameter tuning, using algorithms like Bayesian optimization to find optimal configurations.
- Question 27Multiple Select
Which of the following statements about hyperparameters and model parameters are correct?
- AHyperparameters control the training process, such as learning rate and batch size.Correct answer
- BModel parameters, such as weights and biases, are learned during training.Correct answer
- CHyperparameters are tuned on validation data, not the test set.Correct answer
- DThe test set is the appropriate data for hyperparameter tuning.
Why this is the answer
Hyperparameters control training and are tuned on validation data. Model parameters (weights, biases) are learned during training. The test set is only for final unbiased evaluation.
- Question 28Interactive
Given the Vertex AI Vizier search space and budget shown in the snippet, what is the most likely consequence?
- AResults will be conclusive and optimal
- BThe tuning job may fail to converge because the search space is too large for the allocated budgetCorrect answer
- CThe model will automatically reduce the search space
- DThe search space must include categorical hyperparameters
Why this is the answer
A search space that is too large for the allocated budget can lead to inconclusive tuning results, as noted in the playbook's trap on neglecting search space complexity.
- Question 29Single Choice
Which evaluation metric answers: 'Of all actual positive instances, how many did the model correctly identify?'
- APrecision
- BRecallCorrect answer
- CF1-score
- DAUC-ROC
Why this is the answer
Recall, also called sensitivity or true positive rate, measures the proportion of actual positive instances correctly identified by the model.
- Question 30Multiple Select
In which of the following scenarios is high recall especially critical?
- AMedical diagnosis where missing a disease case is extremely dangerousCorrect answer
- BFraud detection where failing to identify fraudulent transactions has high costCorrect answer
- CSpam detection where incorrectly flagging a legitimate email is very harmful
- DA model where false positives are much more costly than false negatives
Why this is the answer
High recall is critical when false negatives are costly, such as in medical diagnosis and fraud detection. Spam detection with harmful false positives requires high precision.
- Question 31Interactive
The snippet computes an evaluation metric using precision and recall. What is the resulting value of the metric?
- A0.40
- B0.53Correct answer
- C0.60
- D0.80
Why this is the answer
The harmonic mean of precision and recall is 2 * (0.8 * 0.4) / (0.8 + 0.4) = 0.5333, approximately 0.53.
- Question 32Single Choice
When should the Precision-Recall curve be used instead of the ROC curve?
- AWhen the dataset is highly imbalancedCorrect answer
- BWhen the dataset is perfectly balanced
- CWhen the cost of false positives equals false negatives
- DWhen only accuracy is needed
Why this is the answer
The Precision-Recall curve focuses on the minority positive class and is more rigorous than ROC for highly imbalanced datasets, such as rare disease detection.
- Question 33Multiple Select
Which statements correctly distinguish feature extraction from fine-tuning in transfer learning?
- AIn feature extraction, the pre-trained model's early layers are frozen and only a new head is trained.Correct answer
- BIn fine-tuning, some or all of the pre-trained weights are unfrozen and trained with a very low learning rate.Correct answer
- CFine-tuning allows the model to adapt its internal representations to the target domain.Correct answer
- DIn feature extraction, all layers of the pre-trained model are trained on the new dataset.
Why this is the answer
Feature extraction freezes the pre-trained backbone and trains only a new head. Fine-tuning unfreezes some or all weights and trains with a low learning rate to adapt to the target domain.
- Question 34Interactive
Consider the snippet that modifies a pre-trained model's layers. What is the purpose of setting trainable to False for these layers?
- ATo freeze the layers and preserve generic pre-learned features during backpropagationCorrect answer
- BTo allow all weights to be updated during training
- CTo increase the learning rate during fine-tuning
- DTo remove the layers from the model architecture
Why this is the answer
Freezing layers marks them as non-trainable, preventing the loss of pre-learned hierarchical features when gradients from the new task are backpropagated.
Problem framing and solution design
8 questions in this domain
- Question 35Single Choice
What is the main benefit of using transfer learning when building a specialized model on a domain-specific dataset?
- AReduces data requirements and accelerates trainingCorrect answer
- BIncreases training time considerably
- CRemoves the need for validation data
- DGuarantees zero model loss
Why this is the answer
Transfer learning uses pre-trained models on specialized datasets to accelerate training and reduce data requirements, as noted in the foundational guide.
- Question 36Multiple Select
Which methods are regularization techniques used to prevent overfitting by penalizing model complexity? Choose all that apply.
- AL1 (Lasso)Correct answer
- BL2 (Ridge)Correct answer
- CDropoutCorrect answer
- DBatch size expansion
Why this is the answer
The playbook lists L1, L2, and Dropout as regularization techniques that prevent overfitting by penalizing model complexity or adding noise.
- Question 37Interactive
Review the code block and identify the Vertex AI service that is used to create the hyperparameter tuning job shown in the snippet.
- AVertex AI VizierCorrect answer
- BVertex AI Model Garden
- CVertex AI Feature Store
- DVertex AI Pipelines
Why this is the answer
This code creates a HyperparameterTuningJob with metric and parameter specs, which is part of Vertex AI Vizier's managed tuning service.
- Question 38Single Choice
Why is it risky to choose a model solely because it has the highest training accuracy without checking validation performance?
- AIt may overfit and fail on validation dataCorrect answer
- BIt is always too slow to train
- CIt will use too little memory
- DIt produces only false negatives
Why this is the answer
The guide warns that choosing a model solely for high training accuracy ignores the training-validation gap and can cause overfitting.
- Question 39Multiple Select
Which statements about hyperparameters and the tuning process are correct according to the playbook? Choose all that apply.
- AThey are not learned during trainingCorrect answer
- BThey control the training processCorrect answer
- CThey should be tuned on validation dataCorrect answer
- DThey include weights and biases learned by the model
Why this is the answer
Hyperparameters control training, are not learned from data, and should be tuned on validation data, not the test set.
- Question 40Interactive
Inspect the code block and identify the operation being applied to the layers of the pre-trained neural network.
- AFreezing layersCorrect answer
- BLayer normalization
- CData augmentation
- DHyperparameter tuning
Why this is the answer
Setting trainable to False freezes layers, preventing backpropagation from destroying pre-learned hierarchical features during the new task.
- Question 41Single Choice
In spam detection, which evaluation metric is most important when false positives are highly costly to the business?
- APrecisionCorrect answer
- BRecall
- CF1-score
- DRoot mean squared error
Why this is the answer
Precision captures how many predicted positives are truly positive, making it the critical metric when false positives are very costly.
- Question 42Multiple Select
Which statements about AUC-ROC characteristics are true according to the playbook? Choose all that apply.
- AIt measures class discrimination across thresholdsCorrect answer
- BAn AUC of 1.0 indicates perfect classificationCorrect answer
- CAn AUC of 0.5 indicates random guessingCorrect answer
- DIt should always be used for imbalanced datasets
Why this is the answer
AUC-ROC measures discrimination across thresholds, with 1.0 perfect and 0.5 random; it should not always be used for imbalanced data.
Frequently asked questions
Everything about the Google Professional Machine Learning Engineer question bank and how to use it.