Separate training, validation, testing, and live use
A delivery company announces that it can predict late shipments with remarkable accuracy. Dispatchers are excited. Knowing a shipment will be late before a truck leaves the depot could let them change the route, notify the customer, or arrange another vehicle. When the auditor asks to see the evidence, the development team provides a strong test result. A closer look reveals that one of the model's inputs is a scan made after the truck reaches its destination. The model is excellent at recognizing a delay that has already occurred. It has not demonstrated that it can prevent one.
This is a useful way to understand data leakage. Information has crossed a boundary that should have kept the evaluation honest. In this case, the model is being judged as a departure-time predictor while using information that would only become available later. The test score may be calculated correctly. The data may even be perfectly recorded. The error is that the test does not represent the real decision. Before interpreting any performance figure, the auditor has to establish the exact moment when a prediction is supposed to be made and which information exists at that moment.
Machine-learning teams usually work through several distinct stages. During training, the model adjusts its learned parameters using examples. During development, a validation set may help the team compare designs or choose settings. A separate test set provides an estimate of how the selected model performs on examples that did not guide those decisions. Later, during live use, the deployed model receives new inputs and produces predictions. This last activity is often called inference. The words sound like a tidy sequence, but each stage has a different purpose and requires a different kind of evidence.
A practical review aid after listening is Bare Metal Cyber's AAIA flashcard companion. Use it to distinguish training, validation, testing, inference, and leakage, but give each word an operational event from the delivery example. The most valuable distinction is when evidence became available and what decision it could legitimately influence. A definition learned by itself will not reveal a future-information leak inside an otherwise impressive report.
The delivery company's first responsibility is to define the prediction contract in business terms. A prediction made at six in the morning before departure is different from a prediction made at noon after a truck has already missed its delivery window. Both could be useful, but they support different actions. If the business expects a departure-time warning, the permitted inputs might include the planned route, historical travel times, weather forecasts available then, vehicle assignments, and the shipment's scheduled destination. Actual arrival time, later customer calls, and scans taken after loading should not sneak into that early prediction.
Now trace how the data was prepared. The company begins with a large archive of delivery records. Engineers clean missing fields, turn addresses into meaningful geographic features, and attach a label indicating whether each shipment arrived late. They then divide the examples so the model can learn from some of them and be judged on others. This sounds reasonable. Yet the split alone says very little about whether the evaluation will be trustworthy. A poor split can make the test data look independent even when it contains information nearly identical to the training data.
For example, one delivery may generate several records: a pickup scan, a sorting event, a depot departure, and multiple route updates. If the team divides individual records randomly, one shipment may appear in training and testing under different rows. The model may effectively recognize that shipment rather than learn a general rule for future shipments. Two shipments can also share a route, customer, or scheduled run closely enough to make the test unusually easy. The auditor should ask what unit was separated. Rows, shipments, drivers, routes, and time periods answer different questions about generalization.
Suppose the company plans to deploy the model next month. A time-based evaluation using earlier deliveries for development and later deliveries for testing may better resemble the future task than a random mixture of old and new records. The team still has to consider whether the later period is representative. Holiday peaks, regional disruptions, and new depots may require separate analysis. Time separation is a useful defense against learning from the future, but it does not automatically prevent every form of leakage. Features can still contain information calculated using outcomes that occurred after the supposed prediction moment.
Another leakage path appears in aggregated information. Imagine a feature called typical delay for this driver. If it was calculated from the driver's entire history, including deliveries that took place after the shipment being predicted, it contains future knowledge. The same problem can occur with route averages, customer complaint rates, or statistics computed during data preparation. These summaries should be created using only information available as of the relevant historical decision time when that is what the live system will have. The auditor can test this principle by examining how features were constructed, not merely whether the final training and test files have different names.
The training set has a legitimate purpose: allow the model to learn. Its performance on those examples is useful for diagnosing training, but it is a weak measure of how the system will behave on unseen deliveries. A flexible model can memorize details. If it performs exceptionally well on familiar records and poorly on genuinely new routes, the training result is telling the company how closely it learned the past, not whether dispatchers can rely on it tomorrow. This is overfitting, and it can be caused by overly complex models, limited data, or a training process that has adapted too closely to incidental patterns.
The validation set supports development choices. Teams may compare algorithms, decide how much history to include, or adjust the threshold that triggers an early warning. Every choice influenced by a validation result makes that data part of the broader development process. Over time, repeated adjustment can fit the model to peculiarities of the validation examples. That is why a final test should be kept separate from the search for a good model. Even though the test contains no direct training labels used for parameter updates, it loses some independence if engineers repeatedly consult it and redesign the system to improve that exact score.
The word validation also means something else in governance. A risk or audit function may perform independent model validation, which can include questioning the business purpose, challenging the data, examining implementation, and evaluating whether the system behaves acceptably in its actual setting. That broader review is not identical to the machine-learning validation dataset. A team that says 'we used a validation set' has not demonstrated an independent assessment of its controls or decision consequences. The auditor should establish which meaning is intended before accepting the statement as evidence.
Consider a development team that has tested twelve model versions and selected the one with the best observed result. If the team also peeked at the final test after each attempt, the result may have become another tuning target. A better governance approach records the development process, protects a genuinely independent final evaluation, and defines how fresh testing will be obtained if the same test has already shaped too many decisions. No test set remains a perfect blind check after its detailed results have driven repeated redesign. This is a matter of maintaining honest evidence, not enforcing a magical percentage split between datasets.
At this stage, Bare Metal Cyber's Cyber Wiki material on AI model artifact audit trails offers an optional way to reinforce the chain of evidence. A useful audit trail connects a dataset snapshot, the transformations applied to it, the model version, the evaluation result, and the approval that permitted deployment. For the delivery company, the question is whether a reviewer could reproduce which information a particular version was allowed to use before a truck departed. If that chain is missing, a high score may be impossible to investigate when something goes wrong.
Even a genuinely held-out test can mislead when its population is wrong. Suppose the company evaluated only deliveries between major depots with stable schedules. The system will now be used for remote drop-offs, temporary holiday routes, and newly opened service areas. The evaluation may be honest yet incomplete. The auditor needs to compare intended deployment with test coverage, including rare but high-impact conditions. A small number of critical failures can disappear in a favorable average. The business may need separate acceptance criteria for priority shipments or routes where a missed warning has especially costly consequences.
The same attention applies to the label. Was a shipment 'late' when it missed its promised customer window, when a depot system recorded arrival, or when the customer confirmed receipt? The answer affects what the model learns. If a driver scans every parcel at the end of a shift, recorded arrival times may lag behind actual delivery. A model that predicts the scan time could penalize a delivery that was physically on time. Auditors should look for label definitions, exceptions, systematic missing records, and evidence that the measure reflects the experience the business cares about.
When the approved model goes live, an entirely new set of controls becomes important. The deployed system must receive the same kind of information that development assumed would be present. A field that was complete in historical archives might arrive late or be blank in the real-time application. A route identifier might change format when an upstream system is replaced. Engineers call the mismatch between training-time inputs and live inputs training-serving skew. The name is less important than the consequence: the model may be judged on data that the deployed application cannot faithfully supply.
A sound release package identifies the exact model and data-processing versions, the features expected at the decision time, and the conditions under which the system may be used. It also shows what happens when an essential input is missing. A delivery warning should not quietly become a firm promise if its estimated arrival depends on a broken tracking service. The system might fall back to a simpler rule, ask for dispatcher judgment, or decline to issue a prediction. The acceptable choice depends on the consequence of a wrong message and the operational alternatives available.
After deployment, performance can change for reasons unrelated to the original split. A major road closure alters travel times. A new distribution center changes route patterns. The company may give dispatchers new tools that make past delays less predictive. Monitoring should therefore examine whether inputs have changed, whether late-delivery outcomes are actually improving, and whether warnings lead to useful actions. A sudden drop in alert volume is not necessarily a success. It could signal missing data or a change that prevents the model from recognizing risky deliveries.
There is a subtle feedback effect, too. If dispatchers act on warnings and successfully prevent delays, the historical label for those shipments becomes 'on time.' A future model trained naively on those records may have difficulty distinguishing naturally safe shipments from shipments that would have been late without intervention. The system has changed the outcome it was built to predict. Understanding that intervention history may require separate evaluation of alerts, decisions, and results. Otherwise the company might retire a useful warning rule because the evidence no longer shows the delays it prevented.
An auditor does not need to pick the machine-learning team's preferred data split. The auditor does need enough evidence to judge whether the split and feature timeline support the claimed use. A useful review might sample particular predictions and ask what the company knew at the moment they were made, how the target was established, whether related records crossed training and testing, and which independent test supported the final release. The answers should be traceable to retained artifacts, access-controlled records, and a clear approval decision. A polished metrics slide without that trail does not provide the same level of assurance.
Return to the original demonstration. The late-delivery predictor looked extraordinary because it had been allowed to see the future. The repair is not simply to remove one offending field and announce a lower score. The company must rebuild the evaluation around the actual departure-time decision, review all derived features for hidden future information, use appropriate separation of related records, and confirm that live systems can supply the authorized inputs. A weaker but honest result can support a useful operational improvement. A stronger result based on information that will never be available cannot.
Training gives a model experience. Development validation helps the team make choices. Independent testing supplies evidence about behavior on unfamiliar examples. Live inference is where the organization accepts consequences from those choices. The boundaries between those stages are valuable because they keep learning, selection, judgment, and action from quietly contaminating one another. For an auditor, the decisive question is whether the evidence was available at the right time, independent for the purpose claimed, and relevant to the decision the organization is actually making.