Google Professional Machine Learning Engineer Question 216
Single answerGoogle Cloud PlatformYou are building a real-time fraud detection system for a financial institution using Google Cloud. The system needs to handle high-volume transaction data and provide predictions in under 100 milliseconds. Which ML framework and model architecture should you choose to meet the latency and performance requirements?
- A
TensorFlow with a deep neural network (DNN) architecture deployed on AI Platform Prediction
- B
Scikit-learn with a decision tree model deployed on a Compute Engine instance
- C
TensorFlow with a lightweight convolutional neural network (CNN) model deployed on Vertex AI Prediction with GPU acceleration
- D
XGBoost with a gradient boosted trees model deployed on Vertex AI Prediction
Show answer and explanation
Correct answer: D
Explanation
For real-time fraud detection on tabular data, XGBoost is an excellent choice due to its efficiency and ability to handle high-throughput, low-latency inference. Deploying the model on Vertex AI Prediction ensures scalability, optimized infrastructure, and the ability to meet the latency requirements of under 100ms. Other options either do not align with the use case or introduce unnecessary complexity and overhead.
- A. Incorrect.
TensorFlow with a deep neural network (DNN) may provide high accuracy, but DNNs tend to have higher latency, especially for real-time predictions. AI Platform Prediction is also less optimized for low-latency, high-throughput use cases compared to Vertex AI Prediction.
- B. Incorrect.
Scikit-learn is not ideal for high-volume, low-latency requirements because its models are not optimized for parallelized inference. Additionally, deploying on a Compute Engine instance may not meet the sub-100ms latency requirement.
- C. Incorrect.
While TensorFlow with a lightweight CNN could be optimized for certain tasks, CNNs are typically used for image processing tasks rather than tabular data like transaction records. Moreover, using GPU acceleration for this use case may introduce unnecessary overhead.
- D. Correct.
XGBoost with a gradient boosted trees model is well-suited for tabular data and is known for its efficiency and low-latency inference. Deploying it on Vertex AI Prediction ensures scalability and sub-100ms latency for real-time predictions.