Find data-quality failures before they distort models

A flood-warning system reports that a valley is safe while the water is rising. The problem is not an exotic model failure: a missing sensor reading has been mistaken for zero. This lesson follows that error from its original measurement through data preparation, prediction, and…

A river district has invested in a new warning system. It takes readings from gauges scattered across a large watershed, combines those readings with rainfall reports, and estimates which roads and neighborhoods may face flooding in the next few hours. On a day of heavy rain, the system reports that an upstream valley is relatively safe. A field crew knows something is wrong. Water is rising rapidly, and the gauge closest to that valley has been silent since the previous night.

The model did not invent a reassuring result out of nowhere. Earlier in the information pipeline, a missing reading was recorded as zero. To the model, zero meant that the water was low. To the field crew, silence meant that nobody knew the water level. Those are radically different situations, and the difference was lost before the prediction was made. This is why an auditor cannot judge data quality by asking whether a file was successfully loaded or whether the model produced an answer. The important question is whether the information still represents the conditions on which a consequential decision depends.

Imagine being asked to assess this system before the next storm season. The development team shows you months of clean-looking reports. Almost every field is populated. There are few rejected records, and most of the readings fall within the normal range. Those observations may be useful, but they say very little about the one condition that makes the warning system most valuable: what happens when heavy weather damages equipment and reliable measurements are difficult to obtain. A dataset can look orderly while systematically hiding the moments of greatest risk.

The Bare Metal Cyber AAIA study guide can be an optional follow-up after this lesson. Use its material on data governance and model evaluation to separate two questions that often get blended together: whether the stored information conforms to a rule, and whether that rule protects the decision being made. In the river example, a perfectly formatted zero can still be the wrong evidence. That distinction is worth practicing beyond this one scenario.

Start with what the district believes each reading means. A gauge reports a water level at a particular place and time. Someone must decide which measurement units are used, how old a reading may be before it loses its value, and how to indicate that no valid measurement arrived. The team may have a technically valid number, but a calibration fault could make it inaccurate. A sensor clock could be wrong, making an old reading appear current. Two stations could use different reference levels, so apparently comparable heights describe different physical conditions. These are not interchangeable defects. The right correction depends on why the reading is misleading.

Accuracy means that the information reflects the underlying event or measurement closely enough for the approved purpose. A calibration comparison or a trusted field observation may help establish that. Validity is narrower. A value can follow every approved format and range rule without being an accurate measurement of reality. The district could reject a negative water level when its instruments cannot physically report one, yet still accept a plausible reading from a sensor that has slipped out of calibration. If an auditor treats validity as proof of accuracy, the control may look stronger than it is.

Completeness creates another trap. Suppose the district reports that ninety-nine percent of all expected readings arrived last month. That sounds impressive until you learn that most missing readings came from three remote valleys and occurred during severe weather. The average describes the entire network, while the risk sits in a small, consequential part of it. The auditor needs to understand which readings are absent, under what conditions, and what those gaps do to the prediction. Missing information is sometimes harmless. Missing the only reliable gauge above a vulnerable bridge can change the decision completely.

The system must also distinguish a record that is late from a record that is unavailable. A gauge might send its observations in batches after a communications outage. The district then receives a real measurement, but one made several hours ago. If the model assumes that the latest received value is also the latest observed value, it can underestimate a rapidly changing flood. Freshness expectations should be tied to how quickly the underlying conditions change. A weekly update may suit a stable reference record; a flood warning may need much faster evidence. Neither interval is universally correct. The approved use determines the limit.

Now follow the information as it is prepared. The team combines gauge measurements, rainfall estimates, and historical flood outcomes. It removes duplicates, converts units, repairs apparently unusual values, and fills selected blanks. Each transformation has a reason, but each can also erase a warning. If a system automatically replaces an extreme measurement with the average because it appears to be an outlier, it may remove the first evidence of a genuine emergency. If it fills every missing gauge reading with the last known value, it may turn a communications failure into the appearance of stable conditions. The auditor should ask what the preparation method assumes, and whether that assumption still holds during the events that most need protection.

There are good reasons to use estimated values. A brief gap in a slowly changing measurement might be handled safely if the method is tested and uncertainty remains visible. But the district needs boundaries: which fields can be estimated, under what conditions, for how long, and with what warning to the people relying on the result. A rule that works during ordinary conditions may be prohibited when rainfall exceeds a defined operating range. The resulting control is more useful than a blanket instruction to eliminate all missing data, something no real monitoring network can guarantee.

Another failure can arise when records are joined together. A rainfall report from one valley may be linked to a gauge in another because their station identifiers were reused. A software change could silently shift the time window, matching yesterday's rainfall to today's water level. Each source may be accurate on its own. The combined record is wrong because the relationship between them is wrong. An auditor can challenge that claim of quality by following a small sample from original measurements through the transformations to the exact information the model receives. A successful pipeline execution is evidence that software ran, not that its meaning survived the journey.

For a second optional exercise, the Bare Metal Cyber Cyber Challenge associated with the AAIA course can help you test this reasoning through decisions rather than definitions. Imagine a sensor feed that is ninety-nine percent complete but loses readings mainly during storms. Then imagine a feed that is less complete overall but reliably identifies every missing observation and stops unsafe automated advice. Which system better supports the district's warning responsibility? The answer depends on the consequence of the gap and the response built around it, not on one attractive percentage.

Consider the historical examples used to train the warning model. The district labels some earlier hours as flood events and others as ordinary conditions. Where did those labels come from? Perhaps a flood was recorded only when a resident reported property damage. A remote road could have been underwater without generating a claim or an incident ticket. If unreported flooding is labeled as a safe outcome, the model may learn the wrong connection between measurements and harm. That is a label-quality problem, not simply a measurement problem. It needs an investigation into how the outcomes were defined and what evidence was available to confirm them.

Coverage matters as well. A network may contain many observations from mild seasons and very few from unusually intense storms. A prediction can perform well on familiar conditions but be poorly supported when the district expands service into a steep tributary or a newly developed floodplain. More rows are not automatically better if they repeat the same easy cases. Auditors should ask whether the data includes the people, locations, operating conditions, and rare events that the system is expected to handle. When evidence is scarce, honest limits on automation may be safer than expressing unwarranted certainty.

Suppose the engineers respond by generating artificial examples of severe flooding. That may help test certain behaviors or supplement training, but it cannot by itself prove how the system will perform when real rivers behave in ways the generator did not anticipate. Synthetic examples inherit assumptions from the method used to create them. A defensible assessment separates the performance observed on actual cases from performance observed on constructed ones and records what remains uncertain. That is a more credible result than combining every test into a single reassuring score.

One source of quality failure sits outside the sensors. The district changes the definition of a closed road. Previously, a road was marked closed only when crews installed physical barriers. Now it is marked closed as soon as an emergency manager issues an advisory. Historical data under the old rule and new data under the new rule may look like one consistent field. In fact, the label has changed meaning. When definitions shift, model behavior can shift even if the code never changes. Quality governance has to include changes in business practice, not only changes in technical file formats.

A credible control program therefore sets expectations for the fields that influence important decisions. The district identifies which inputs must be present, which measurements require calibration, what freshness means, and how the system handles conflicting sources. It determines who may approve a change to a quality rule and what evidence is required before the change reaches production. Notice that those decisions need cooperation. A data engineer can implement a missing-value check, but the emergency manager knows when incomplete evidence should stop an automated recommendation. Neither role can make the whole judgment alone.

How should an auditor test whether the controls operate? One useful approach is to introduce a known failure in a controlled test. What happens if a gauge goes offline while rainfall rises? Does the pipeline clearly mark the reading as unavailable, or quietly insert zero? Does the warning system continue to produce an unqualified estimate? Can operators tell that important evidence is missing? Who receives the problem report, and what safe alternative is available while the sensor is repaired? That kind of test connects a technical control to the real response it is supposed to protect.

Testing only known bad input is not enough. A valid extreme reading can look suspicious. The district should also test whether the controls allow plausible emergency evidence to pass without being flattened into ordinary values. Imagine two competing risks: accepting a broken gauge as a true flood signal, and rejecting a genuine rapid rise as a sensor malfunction. Both can cause harm, but the harm differs. Control design must account for false alarms, missed warnings, and the practical ability of responders to investigate. An auditor should understand why the district selected its limits and what experience would justify changing them.

There is a monitoring problem after launch. Gauges age. New stations are installed. Maintenance contracts change. Weather patterns and land use change. A quality rule designed for last year's network may become unreliable. The district might monitor late feeds, rejected readings, calibration failures, missing values by watershed, and differences between warnings and observed conditions. But a collection of charts accomplishes little unless someone reviews the signals, investigates emerging patterns, and has authority to take action. A useful measure leads to a decision before failure becomes routine.

Imagine that the system begins issuing unusually few warnings in one valley. The model's overall accuracy report remains steady because most other valleys are unaffected. A team that watches only the aggregate number may miss a deterioration that is both localized and serious. The auditor can ask whether monitoring segments the results by places and conditions that actually change the risk. The response could include inspecting particular sensors, limiting automated predictions in that valley, using field observations more heavily, or retraining only after the data fault is understood. Retraining on corrupted information would merely teach the system to become confidently wrong in a new way.

Data-quality incidents also need a clear history. If an invalid reading influenced yesterday's advisory, correcting today's feed does not tell the district which earlier decisions may have been affected. The organization may need to identify the period of bad data, determine the models and outputs that used it, and assess whether public advice or operational action requires correction. That means preserving enough provenance, version information, and decision records to reconstruct the impact. The lineage concepts from the previous lesson now become a way to investigate a concrete failure rather than an inventory exercise.

Finally, consider what the auditor should report. Saying that data quality is poor is too broad to support a responsible decision. A stronger finding explains that a disconnected upstream gauge is translated into a low-water reading, that the substitution was not tested under severe-weather conditions, and that the warning team receives no indication that the estimate relies on missing evidence. The finding connects a cause to an affected decision and a plausible consequence. It also makes a meaningful corrective action possible: distinguish absence from zero, establish an operating limit, alert the right people, and test the fallback.

The river district will never have perfect information during every storm. That is not the standard. The question is whether its people know when the available information supports a warning, when the evidence is too weak, and what to do differently in either case. An AI system becomes more trustworthy when its missing, old, inaccurate, or poorly understood data cannot quietly masquerade as certainty. The best data-quality program does not merely keep records tidy. It preserves the meaning of the evidence at the moment someone needs to act.

Find data-quality failures before they distort models
Broadcast by