Dynamic
Last reviewed
May 11, 2026
Sources
6 citations
Review status
Source-backed
Revision
v2 · 2,197 words
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation.
Last reviewed
May 11, 2026
Sources
6 citations
Review status
Source-backed
Revision
v2 · 2,197 words
Add missing citations, update stale details, or suggest a clearer explanation.
See also: Machine learning terms
In machine learning, the word dynamic describes anything that happens frequently or continuously, as opposed to something that happens once and stays fixed. Google's Machine Learning Glossary states it plainly: "The terms dynamic and online are synonyms in machine learning." The opposite, static, is itself a synonym for offline.
The label shows up in three related places: the model itself, the way it is trained, and the way it generates predictions. A dynamic model gets retrained on a schedule or continuously as new data arrives. Dynamic training is the process of running those retrains. Dynamic inference is the practice of computing each prediction on demand instead of looking it up in a cache. Each has a static counterpart that trains once, deploys a frozen artifact, and serves predictions from a stored table.
The distinction matters because production systems live in a world that does not hold still. User preferences change with the seasons. Fraudsters change tactics. Prices, fashion, and language shift over weeks or hours. A dynamic model trades operational simplicity for the ability to keep up.
| Term | Synonym | Opposite |
|---|---|---|
| Dynamic | Online | Static / Offline |
| Dynamic model | Online model | Static model |
| Dynamic training | Online training | Static training (offline training) |
| Dynamic inference | Online inference / real-time inference | Static inference / offline inference / batch inference |
The word "online" here has nothing to do with the internet. It comes from statistics and stream-processing literature, where an online algorithm consumes its input one piece at a time, in the order it arrives, without needing the full dataset up front. Wikipedia defines online machine learning as "a method of machine learning in which data becomes available in a sequential order and is used to update the best predictor for future data at each step." Batch learning, the opposite, "generates the best predictor by learning on the entire training data set at once."
"Dynamic" emphasizes the model's ability to change; "online" emphasizes the sequential data feed. In practice the two are interchangeable.
This ML sense of "dynamic" should not be confused with other uses in computer science. Dynamic programming is an algorithm design technique. Dynamic typing is a property of programming languages where type checks happen at runtime. Dynamic computation graphs are a feature of frameworks like PyTorch where the graph is built during forward passes. None of those have anything to do with the online-versus-batch distinction.
A dynamic model, in Google's words, is "a model that is frequently (maybe even continuously) retrained. A dynamic model is a 'lifelong learner' that constantly adapts to evolving data." That phrasing covers both ends of the spectrum: from a model retrained every hour on the last 24 hours of data, to a true online learner whose weights update with every new labeled example. Both count as dynamic. The shared feature is that today's deployed weights are not yesterday's.
The argument for going dynamic is that the world is moving and the model needs to keep up. Google's production ML course uses a flower-purchasing example: a model trained only on July and August data "performed well initially but failed dramatically around Valentine's Day when user behavior changed seasonally."
Static training, per Google's crash course, means "train once; serve the same built model multiple times." Dynamic training means "retrain frequently; serve the most recently built model."
Static training is simpler. You assemble a dataset, run your training job, evaluate against a holdout, and ship. The model then sits there serving traffic, with no retraining job to babysit.
Dynamic training is more demanding. You need a pipeline that runs unattended, monitoring to catch broken inputs, validation gates to refuse models that score worse than the previous version, and rollback machinery for when something still goes wrong. In exchange, the model does not go stale.
| Aspect | Static training | Dynamic training |
|---|---|---|
| Cost to build | Lower | Higher (continuous pipeline, monitoring) |
| Cost to operate | Lower | Higher (always running) |
| Adapts to drift | No, unless re-run manually | Yes, by design |
| Verification before deploy | Easy, ample time | Harder, must be automated |
| Risk of bad model going live | Low | Higher, mitigated by validation gates |
| Good fit for | Stationary relationships | Shifting relationships |
Google's guidance is direct: "If the relationship you're trying to model is one that's constant, then a statically trained model may be sufficient; if the relationship is one that changes, then a dynamically trained model may be more appropriate." Even with static training, monitoring input data still matters, because if the distribution shifts and the model never sees it, accuracy quietly degrades.
Inference, in this context, is the act of producing a prediction from a trained model. Static inference and dynamic inference describe two different operational patterns for that step.
Static inference, also called offline inference or batch inference, means the model runs through a list of inputs in bulk, produces predictions for all of them, and stores those predictions in a cache or table. When a downstream system needs a prediction, it looks up the answer from the cache instead of running the model. Google's definition: "The model makes predictions on a bunch of common unlabeled examples and then caches those predictions somewhere."
Dynamic inference, also called online inference or real-time inference, means the model only produces a prediction when something asks for one. Google's definition: "The model only makes predictions on demand, for example, when a client requests a prediction."
The choice between them is usually decided by two factors: how many unique inputs you might see, and how quickly you need to respond.
Static inference is cheap to serve, because lookups are fast and the heavy compute happened during the batch job. It also gives you time to inspect predictions before they go live. The downside is that it cannot handle inputs you did not pre-compute; an unseen query falls back to a default or a real-time call.
Dynamic inference handles any input, including the rare and never-before-seen, which is why recommendation systems and large language models rely on it. The cost is computational: each request runs the model, so latency and throughput become hard constraints. Google's crash course frames it bluntly. "A complex model requiring one hour per prediction" only makes sense as static inference; no client will wait an hour. "A fast 2-millisecond model suits dynamic inference, delivering quick on-demand predictions to clients."
| Aspect | Static (offline / batch) | Dynamic (online / real-time) |
|---|---|---|
| Compute timing | Ahead of time, in bulk | On demand, per request |
| Latency to user | Very low (cache hit) | Variable, model dependent |
| Coverage | Only pre-computed inputs | Any input |
| Cost per prediction | Amortized | Per request |
| Inspection before serving | Yes | No |
| Good fit for | Common, predictable inputs | Long-tail and novel inputs |
The simplest online learning algorithm is stochastic gradient descent. Instead of computing a gradient over the full dataset, SGD computes a gradient from a single example (or a small mini-batch) and applies an update. Each new observation moves the weight vector a little. The perceptron follows the same pattern: see an example, predict, update if wrong, move on.
Production dynamic training is rarely that pure. A common pattern is incremental retraining on a sliding window of recent data (the last week, the last million events). This is still "dynamic" because the model is refreshed frequently, but it does not update weight by weight on every observation.
Wikipedia defines incremental learning as a method where "input data is continuously used to extend the existing model's knowledge." The same article flags continual learning, which targets "learning from a sequence of tasks while limiting catastrophic forgetting." These three terms (online, incremental, continual) are not perfectly interchangeable, but they all describe systems that keep learning after deployment.
The main reason teams accept the extra operational cost of dynamic models is concept drift. Wikipedia defines it as a phenomenon that "happens when the statistical properties of the target variable, which the model is trying to predict, change over time in unforeseen ways." A frozen model trained on yesterday's distribution starts making worse predictions, because it is being asked about a world it has not seen.
The Wikipedia article on concept drift lists two main remedies, both forms of dynamism. Reactive methods use a change-detection test that watches for a drop in accuracy or a shift in input statistics; when it fires, the model is retrained. Tracking methods continuously update the model through online learning, frequent retraining on recent samples, or an ensemble where old classifiers are gradually replaced.
Real examples are easy to find. Retail demand changes with the seasons. Malware authors change their obfuscation tricks. Spam senders rewrite their bait when filters catch on. Fraud rings rotate tactics as soon as old ones get blocked. In each case a static model trained six months ago will be measurably worse than a dynamic one that retrained last night.
Dynamic models, training, and inference appear in a few recognizable settings:
Dynamic is not automatically better. There are problem classes where static wins on simplicity, cost, and predictability:
Many real pipelines mix the two: trained statically but served dynamically, or trained continuously with online updates while validating against a frozen reference. The dynamic versus static distinction is best understood as a property of each step in the pipeline, not a single global setting.
A video-platform recommender illustrates the pieces. New episodes appear daily, and user tastes shift. A static recommender would lose accuracy within weeks. The platform addresses this with dynamic training: a pipeline retrains the ranker nightly on the last 30 days of interactions and validates against the previous version before promoting it.
Serving also runs dynamically. When a user opens the app, the system calls the model to rank candidate videos for that user, that time of day, and that recent watch history. Pre-computing ranks for every user would be wasteful, and the moment a user watches one more video the old ranking is partly out of date.
The platform may still use static inference for parts of the system. Embeddings of the full video catalog can be computed in a nightly batch job, since videos do not change fast, and the cached embedding feeds the dynamic ranker as a feature. That is the common hybrid: heavy work runs statically ahead of time, and the serving step stays light.