Locked versus adaptive systems
Why This Matters
Testing assumes the thing you tested is the thing that runs. For a system that keeps learning after release, that assumption breaks the day it goes live. Whether a system is locked or adaptive decides whether your test results are a certificate or a snapshot, and how much testing has to continue in production.
What you will learn
- The difference between locked and adaptive AI-based systems, and the continuum in between
- Why locked systems are easier to test, and why even they can behave non-deterministically
- How to test a system that changes itself
Syllabus: AI-4.1.1.
Locked systems
A locked system gives the same output for the same input. Its model does not change while it is in use. A loan model trained in March and deployed unchanged is locked: until someone retrains it, it behaves as tested.
Locked systems are easier to test: the usual approach works. Test it, and the results stay valid. When a locked system is updated (a new model version), it is usually treated as a new system: it needs fresh testing, typically regression testing plus a comparison with the old version (back-to-back or A/B testing, lesson 49).
Adaptive systems
An adaptive system changes its behaviour in response to its environment while it is in use: a recommender that learns from every click, a spam filter that learns from every “this is spam”, a thermostat that learns your schedule, an engine controller that adapts to altitude.
Its behaviour cannot be fully tested in advance, because the behaviour that will run next month does not exist yet. The syllabus names three approaches:
- Simulate changes in the environment and test how the system adapts: does the recommender move to documentaries after three documentaries, and how fast (lesson 8)? Does it adapt back?
- Test the learning mechanism itself: what does it learn from, how fast may it change, which limits are there? A learning mechanism that can be fed manipulated data can be poisoned.
- Run automated test suites of the core functionality after significant changes: a regression suite that checks the behaviour that must never change, run regularly in production or whenever the system has adapted noticeably.
A continuum, not two boxes
Many systems sit in between. A typical GenAI chatbot is locked at runtime (the model does not learn from your conversation) but is updated periodically by the provider: new model versions, a changed system prompt, new safety filters. To the users it behaves as an adaptive system on a slower clock. If you build on a model from a provider, assume it can change without notice, and keep a regression suite running.
locked ─────────────────────────────────────────────────────── adaptive
loan model, chatbot: locked at runtime, recommender that
retrained yearly model updated every few weeks learns from every click
Locked is not always deterministic
Locked does not guarantee the same output every time. Large neural networks can behave non-deterministically in practice: floating-point arithmetic is not exactly associative, and GPUs run calculations in parallel in an order that can vary between runs, so tiny differences appear and can flip an answer near a boundary. LLMs add sampling on purpose (lesson 2). And the practice loan model in this course adds noise to every prediction (lesson 26).
So even for a locked system you may need repeated runs and statistics.
Testing continues after release
For both kinds, testing does not stop at release. It can check that performance has not degraded beyond a threshold:
- after every change (a new version, a retrained model, an adapted model)
- continuously, as part of monitoring in production
What “beyond a threshold” means must be agreed beforehand: an acceptance criterion such as “accuracy on the weekly labelled sample does not drop more than 2 percentage points below the release value” (lessons 8 and 47).
Exercise
A news app personalises the order of articles for each user, learning from what they read. Before release you can test it with simulated users. What can you still test before release, and what do you test after?
Show suggested answer
Before release:
- Simulate environment changes: synthetic users with a clear interest (they only read sport). Does sport move up, and within how many articles? Does it move back when the interest changes?
- Test the learning mechanism: what signals does it learn from (clicks, reading time)? Can a user or a bot manipulate it (click farms)? Are there limits, such as always showing some general news?
- Build the automated core regression suite: things that must always hold (breaking news is always shown at the top, no articles older than 7 days, nothing from blocked sources).
After release:
- Run the core suite regularly against the live system, and after model updates.
- Monitor the agreed thresholds: click-through rate, diversity of what users see, complaints.
- Watch for drift: the adapted behaviour of real users differs from the simulated ones (lesson 47).
The core idea: before release you test the mechanism and the invariants; after release you test the behaviour it adapted into.
Exam-style questions
1. Why is an adaptive AI-based system harder to test than a locked one?
- A. Adaptive systems cannot be tested at all
- B. Its behaviour changes in response to its environment after release, so it cannot be fully tested in advance
- C. Adaptive systems are always non-deterministic, while locked systems never are
- D. Adaptive systems do not use machine learning
Show answer
2. Which approach is suggested for testing adaptive systems?
- A. Test only once, before release
- B. Simulate environment changes, test the learning mechanism, and run automated core-functionality suites after significant changes
- C. Lock the system permanently
- D. Test only the user interface
Show answer
3. A locked image classifier running on GPUs occasionally gives a different answer for the same image. What is a possible explanation?
- A. The model is learning from each image
- B. Floating-point limits and parallel processing on the GPU can cause small differences that flip a borderline answer
- C. Locked systems always produce random output
- D. The image was labelled incorrectly