Lesson 2 of 5 Choosing Modeling Approaches

Weighing Interpretability, Latency and Domain Performance

This lesson explains how interpretability, domain-specific performance and latency, criteria the exam guide names, can change which model is best when accuracy is not the only requirement.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose interpretable models when decisions must be explained.
  • Choose models that meet latency and footprint limits.
  • Account for domain-specific performance.

Interpretability

Some decisions must be explained to customers, auditors or regulators, such as credit, insurance and hiring. Intrinsically interpretable models, such as linear and logistic regression (coefficients show each feature's effect) and shallow decision trees (readable rules), are easiest to explain. Complex models such as gradient-boosted trees and neural networks are more accurate on many problems but need post-hoc explanations, such as SHAP values from SageMaker Clarify. When a scenario stresses transparency above all, prefer the interpretable model if its accuracy is acceptable.

The following diagram compares an XGBoost model and a logistic regression model against the requirements of a lending decision, where the choice depends on how explainability is defined.

The lending choice turns on the wording of the requirement. Both models meet the 200 ms limit. XGBoost is more accurate and Clarify SHAP values give a reason for each rejection, which suffices if post-hoc explanations are accepted. If the model's logic itself must be directly inspectable, logistic regression is the answer despite its lower AUC.
The scenario is illustrative.
Scenario questions

How explainable must it be?

Exam skills 2.1.3 · 2.3.4

Choose a model that meets each interpretability requirement.

Log in to try this activity Interactive activities are free with an account.

Latency and footprint

Some applications allow very little time per prediction. Real-time bidding or fraud checks during a payment may allow only tens of milliseconds. Smaller models, fewer trees in tree ensembles, lower numerical precision, algorithms that run efficiently on CPUs, and caching of frequent predictions all reduce latency.

For foundation models, smaller or distilled models, shorter outputs and streaming reduce latency, or at least the latency users perceive. Batch use cases, such as scoring all customers overnight, have no such constraint and can use larger, slower and more accurate models.

True or false

Fast and small

Exam skills 2.1.3 · 2.1.7

Check how model choice affects latency and footprint.

Log in to try this activity Interactive activities are free with an account.

Domain-specific performance

General-purpose models can underperform on specialist data, such as medical notes, legal contracts or industrial images, whose vocabulary and patterns differ from general training data. Several options improve domain performance: domain-specific pre-trained models, for example from SageMaker JumpStart; fine-tuning on domain data; specialised services such as Amazon Comprehend Medical for clinical text; and, for foundation models, RAG over domain documents.

Candidates should always be evaluated on test data from the domain, because general benchmarks say little about performance on specialist content.

The following table summarises how each criterion shifts the choice.

CriterionFavoursTypical trade-off
InterpretabilityLinear models, shallow trees, or SHAP for complex modelsMay lose some accuracy
Low latencySmall models, distilled FMs, CPU-efficient algorithmsMay lose some accuracy
Domain performanceDomain pre-trained or fine-tuned models, specialised servicesMore data and effort
Worked example

A lending decision

A lender compares two models for small-business loans: logistic regression with AUC 0.81 and XGBoost with AUC 0.84. Regulations require a clear reason for every rejection, and a decision must be returned within 200 ms.

Both models meet the latency target. XGBoost is more accurate, and Clarify SHAP values can provide per-applicant reasons, so it can satisfy the requirement if the regulator accepts post-hoc explanations. If the scenario states that the model's logic itself must be directly inspectable, the logistic regression model is the answer despite the small accuracy loss. The deciding words in the question are what determine which is correct.

Check yourself

How can a complex model's predictions be explained?

Show answer

With SHAP values from SageMaker Clarify.

Exam Tips

Remember for the exam

  • Logic must be directly inspectable: linear models or shallow trees.
  • Complex model with explanations: SageMaker Clarify SHAP values.
  • Strict latency: smaller or distilled models.
  • Specialist data: domain pre-trained or fine-tuned models.
  • Evaluate on domain test data, not general benchmarks.