8.1 Choosing the Model Type: ARIMA, Trees, DNNs & LLMs
Key Takeaways
- Gradient-boosted trees are usually the strongest first choice for structured tabular data, while DNNs lead on images, audio, and raw text.
- ARIMA_PLUS in BigQuery ML trains one statistical model per time series and trains faster than neural forecasting, which makes it a good baseline.
- Neural forecasting methods such as TiDE and Temporal Fusion Transformer fit many related series with covariates, at higher training cost.
- LLMs such as Gemini fit open-ended language, reasoning, and multimodal tasks, but a small supervised model is often cheaper and faster for narrow, high-volume predictions.
- Model choice balances four exam constraints: cost, complexity, latency, and scalability.
The exam guide lists choosing the model type (for example, ARIMA, DNN, and LLM) while considering cost, complexity, latency, and scalability. Most wrong answers pick a technique that could work but is too expensive, too slow, or too complex for the stated constraint.
Start with the Problem, Not the Model
- Is ML needed at all? If a stable rule solves it ("flag orders over the card limit"), rules are cheaper and easier to explain.
- What is the output? A class, a number, a sequence over time, a ranked list, a group, an anomaly flag, or generated content.
- What is the input? Structured tables, time series, images, audio, text, or a mix.
- What are the constraints? Latency, request volume, budget, labeled data, interpretability, and update frequency.
Model Families and When They Fit
| Family | Strengths | Weaknesses | Typical use |
|---|---|---|---|
| Linear / logistic regression | Fast, cheap, interpretable, good baseline | Misses non-linear interactions unless you engineer features | Credit scoring with explanation requirements, quick baselines |
| Gradient-boosted trees / random forests (XGBoost) | Top accuracy on tabular data, handle mixed types and missing values | Larger models, less transparent than linear | Churn, fraud, propensity, pricing on structured data |
| Deep neural networks (DNN) | Learn complex patterns from large data, including images, audio, text, and embeddings | Need more data, compute, tuning, and effort to explain | Image classification, speech, wide-and-deep recommendations |
| CNNs / vision transformers | Spatial patterns in images | GPU/TPU training cost | Defect detection, medical imaging |
| Sequence models / transformers | Order and context in sequences | Compute-heavy | Text classification, custom sequence tasks |
| Statistical time series (ARIMA_PLUS) | Fast, decomposable (trend, seasonality, holidays), one model per series | Limited cross-series learning | Store or SKU forecasts, anomaly detection on metrics |
| Neural forecasting (TiDE, TFT, Seq2Seq+) | Learn across many related series, use covariates | Slower, costlier training | Large retail demand planning with promotions |
Time-series foundation model (TimesFM via AI.FORECAST) | No training, instant baseline | Low customization and explainability | Quick forecasts across many metrics |
| Matrix factorization / two-tower retrieval | Learn user-item preferences | Cold start for new users and items | Recommendations |
| k-means clustering | Unsupervised segments | Choosing k, and business meaning isn't guaranteed | Customer segmentation |
| Autoencoders / PCA | Compression, anomaly detection by reconstruction error | Need tuning to separate normal from rare | Sensor anomaly detection |
| Embeddings + vector search | Semantic similarity across text, images, and products | Embedding model choice, index maintenance | Semantic search, RAG retrieval, deduplication |
| LLMs (Gemini, partner, open) | Open-ended generation, reasoning, extraction, multimodal understanding, zero-shot tasks | Per-token cost, latency, output variability, need for evaluation and safety controls | Summarization, conversational agents, document Q&A, complex extraction |
Weighing the Four Constraints
| Constraint | Pushes toward | Pushes away from |
|---|---|---|
| Low cost | Linear models, trees, BigQuery ML, small models, batch scoring | Large LLM calls per record, big GPU training |
| Low complexity / small team | BigQuery ML, AutoML, pre-trained APIs, Gemini prompting | Custom distributed deep learning |
| Low latency (ms) | Small trees or linear models, distilled or quantized networks, precomputed features | Large LLM generation on the request path |
| High scalability | Models that parallelize and serve on autoscaling endpoints, batch inference | Stateful, single-machine models |
ARIMA vs. DNN vs. LLM: Worked Comparisons
Forecasting weekly sales for 2,000 stores
- ARIMA_PLUS in BigQuery ML: one statement fits one model per store, trains quickly, and explains trend, seasonality, and holidays. It's the best first choice when explanations matter and covariates are limited.
- Neural forecasting (TiDE or TFT through AutoML): consider it when promotions, prices, and weather drive demand across related stores and the extra accuracy justifies the training cost.
- LLM: not a forecasting tool for this job. It adds cost and variability without the statistical structure.
Classifying 50 million support tickets a month into 12 categories
- Gemini with prompting gets high quality quickly with no training data, but per-token cost at 50 million requests is significant.
- Tuned smaller model (Flash-Lite, or distillation into a smaller model) cuts cost and latency once labeled examples exist.
- A supervised text classifier is cheapest per prediction at huge scale, but it needs labeled data and maintenance.
- A common pattern: start with Gemini to launch fast and generate labels, then tune or distill to a cheaper model as volume grows.
Detecting defects on an assembly line at 30 frames per second
- A CNN or AutoML Edge image model running at the edge meets the latency need.
- A cloud LLM call per frame is too slow and too expensive.
Data Volume and Label Availability
| Labeled data available | Reasonable options |
|---|---|
| None | Pre-trained APIs, Gemini zero-shot or few-shot, unsupervised methods (clustering, anomaly detection), TimesFM |
| Hundreds of examples | Gemini supervised tuning, transfer learning from pre-trained vision or text models |
| Thousands to millions of rows | Trees, DNNs, AutoML, custom training |
Latency Budget Thinking
When a scenario gives a latency target, add up the request path: feature retrieval (Feature Store lookup), preprocessing, model inference, and postprocessing. A 50 ms budget with a 20 ms feature lookup leaves about 30 ms for inference, which rules out a large generative model call but fits a tree ensemble on a CPU endpoint.
Exam Traps
- Picking a DNN for a small tabular dataset where boosted trees are faster and usually more accurate.
- Using an LLM for numeric forecasting or high-volume, fixed-label classification when cheaper models meet the bar.
- Ignoring interpretability requirements (Section 8.3) when a regulated decision is involved.
- Forgetting cold start in recommendations. New items need content-based features or embeddings.
A manufacturer needs forecasts for 800 production lines, with explanations of trend, weekly seasonality, and holiday effects for plant managers. Data lives in BigQuery and the team prefers SQL. Which model type is the best first choice?
A payments company must score each card authorization within 40 ms at 20,000 requests per second using 60 structured features. Which model type best fits these constraints?
A company launches a ticket classifier with Gemini prompting because it has no labeled data. Six months later, volume is 40 million tickets a month and costs are too high, but it now has 500,000 human-verified labels. What is the most sensible evolution?