Skip to content

Privacy and preparation

Dataset remediation semantic fidelity: prove a repair kept the meaning

By SourceX Editorial · Reviewed by Noah Loul ·

10 sections

Short answer

A dataset repair keeps semantic fidelity when the repaired copy would answer the buyer's task the same way as the original, minus the defect. Prove it with a before-and-after diff on three layers: relationships (links and join counts), outcomes (label shares and flips) and task context (order, intervals, roles, policy version). Any change outside the defect's footprint needs re-acceptance, a disclosed limitation or a new scope.

Retrieval

Dataset remediation semantic

This page covers dataset remediation semantic fidelity: prove a repair kept the meaning.Illustrative

Key takeaways

  • Write the defect footprint, the records and fields the rejection names, before writing the repair; every change outside it counts as a meaning change until shown otherwise.
  • Diff three layers before and after: relationships, outcomes and task context. Format validators alone pass repairs that quietly rewrite meaning.
  • Never recompute or impute an outcome the business recorded; keep the original value and put any corrected one beside it.
  • Re-run the buyer's acceptance test on paired before-and-after items, not just the validators.
  • A repair that adds sources, fields or uses beyond the approved scope is a scope change and needs the company's approval, not just a new file.

When does a repaired dataset still mean what it meant?

It does when every change sits inside the defect the buyer named, and the links between records, the outcomes they record and the context each decision was made in are unchanged everywhere else. A repair that fixes the named defect but moves an outcome, breaks a link or reorders events has produced a different dataset, even if every validator passes.

This matters most after a rejection, because the repaired copy goes back to a buyer who has already formed a view of the original. The buyer judged certain decisions with certain results, and the company approved a certain scope. If the repair changes what those records say, the re-delivery is a new offer under the old name, and its acceptance may not mean what either side thinks it means.

Three pieces of evidence settle the question: a frozen snapshot of the original, a written footprint of what the repair is allowed to change, and a before-and-after diff on the three layers described below. With those, a reviewer who never saw the repair can say whether it kept the meaning.

Which repairs are most likely to change meaning?

Repairs that touch keys, outcomes, time or which records are included carry the most risk; repairs that only change how a value is written carry the least. The trap is that the riskiest repairs look routine: converting timestamps, merging duplicate customers, correcting labels or generalizing dates for privacy.

Label correction is a useful warning. The team behind the label-errors project, which supplies corrected test labels for ten common machine learning benchmarks, notes that practitioners may make different correction choices, such as correcting a label only when five of five reviewers agree rather than three of five, or dropping multi-label examples, and it publishes the components rather than a single corrected set for that reason. Each choice yields a different dataset.

Privacy repairs are another. HHS guidance on the HIPAA Safe Harbor method requires removing every element of dates directly related to an individual except the year, so a full date can appear only as the year. A Safe Harbor pass therefore erases the intervals and sequence that many business tasks, such as time to resolution, depend on.

The table names each common repair, what it can change without anyone intending it and the check that catches the change:

Which repairs are most likely to change meaning?
RepairWhat it can silently changeLayer at riskCheck that catches it
Format normalization of dates, units or encodingsThe calendar day, reporting period or unit of values near a boundaryTask contextCount records whose day, period or unit changed and compare with the footprint
Deduplication and mergingLegitimate repeat events collapsed into one; child records re-pointed to the wrong parentRelationshipsLinks per case before and after; repeat-event rate by event type
Label correctionOutcome classes and their shares, and which cases count as hardOutcomesA flip matrix of old against new labels, inside and outside the footprint
Imputation of missing valuesInvented facts that look recorded, including outcomesOutcomesA flag on every imputed cell and zero imputed outcome fields
Re-keying or ID replacementJoins that silently drop or duplicate rowsRelationshipsA join cardinality check and an orphan count per table
De-identification and generalizationIntervals, event order and distinctions between rolesTask contextInterval and order checks run on the transformed copy

Draw the defect footprint before writing the repair

Write down which records and fields the repair may change, and how, before anyone writes code; that footprint is what makes a before-and-after diff readable. Without it, every difference looks either intended or alarming, depending on who reads the report.

A footprint has four parts: the rejection reason in the buyer's words, a selector that identifies the affected records (for example, work orders from one office with no time zone offset), the fields the repair may write, and the expected change in each field. Freeze the original as a hashed snapshot so the diff can be rerun later, then list the invariants that must not move: relationships, outcomes and context outside the footprint, and every recorded outcome inside it.

That last point is the one most often missed. A repair that fixes timestamps inside the footprint can still change outcomes inside the footprint if an outcome was derived from those timestamps. Outcomes the business recorded at the time, such as a service-level flag or an approval decision, are facts about what happened. Keep them as recorded, even when a corrected input would have produced a different value, and carry any recomputed value in a separate, labeled field.

The three-layer fidelity diff: relationships, outcomes, context

Compare the original and repaired copies on relationships, outcomes and task context, with tolerances fixed before the diff runs. Most checks take a few lines in tools teams already use, but two common tools hide exactly the failure this diff looks for unless they are set up deliberately.

dbt's relationships test checks that every record in a child table has a matching parent, and its documentation notes that the test excludes null values, consistent with how foreign key constraints behave. A repair that blanks a foreign key therefore passes it, so pair it with a not-null test on the same column. In pandas, a merge raises nothing about cardinality unless asked: the validate argument checks that merge keys are unique on one or both sides (one-to-one, one-to-many or many-to-one), which catches a re-keying repair that split one parent into two.

The ledger lists the invariants by layer. Tolerances are editable assumptions for each project rather than standards, except that recorded outcomes outside the footprint should never change:

The three-layer fidelity diff: relationships, outcomes, context
LayerInvariantHow to compute itDefault tolerance (editable)
RelationshipsEvery child still has its parent, and no key was blankedRelationships test plus a not-null test on each foreign key, before and afterZero new orphans or blanked keys
RelationshipsJoin cardinality is unchangedMerge with a declared cardinality check; compare row counts after each documented joinIdentical row counts after every join
OutcomesNo recorded outcome changed outside the footprintFlip matrix of original against repaired labels, split inside and outside the footprintZero flips outside; every flip inside explained
OutcomesOutcome shares by stratum are stableShare of each outcome class by stratum, before and afterWithin an agreed band, for example one percentage point (Illustrative)
Task contextEvent order is preservedCount records in which a later event now precedes an earlier oneZero new order violations
Task contextIntervals and periods are stableDuration distributions; records that changed day or reporting periodEvery change inside the footprint and listed
Task contextRoles and policy versions remain attachedShare of decisions carrying actor role and policy version, before and afterNo decrease

Re-run the buyer's acceptance test on paired items

Validators prove the structure held; only the buyer's acceptance test, run on the same items before and after, shows that the task still reads the same. Draw a sample from inside and outside the footprint, run the test on both copies and compare results item by item.

Anthropic's January 2026 guidance on agent evaluations draws a distinction that carries over: the outcome of a trial is the final state of the environment, not what the transcript claims, so a booking is checked by whether the reservation exists in the database rather than by a message saying it was booked. A repaired dataset should be graded the same way, on what the records now say happened rather than on what the repair log says the repair did.

Expect three kinds of item. Items outside the footprint should score identically. Items inside should change only in the way the footprint predicted, such as a corrected timestamp. Any other change is a finding: either the footprint was wrong or the repair reached further than intended, and the flip matrix from the ledger shows which items to read first.

Acceptance decision tree for a repaired dataset

Run the repaired copy through six questions in order; the answer at the first failing question is the decision. The tree separates three outcomes that teams often blur: re-delivery under the original acceptance terms, re-delivery with a disclosed limitation, and a scope change that needs new approval.

Record each answer and its evidence in the repair log described in the next section:

Acceptance decision tree for a repaired dataset
QuestionEvidenceIf yesIf no
1. Is every change inside the written footprint?Diff summary by field, inside versus outsideGo to question 2Revise the repair, or widen the footprint with the buyer's agreement
2. Do relationship invariants hold?Orphan, blanked-key and cardinality resultsGo to question 3Fix the repair; do not ship
3. Are recorded outcomes unchanged, or changed only as predicted?Flip matrix and outcome shares by stratumGo to question 4Restore recorded outcomes and carry recomputed values in a new field
4. Does task context hold?Order, interval, role and policy checksGo to question 5List each change as a disclosed limitation, or narrow the scope, then go to question 5
5. Does the paired acceptance sample match the prediction?Item-level results before and afterGo to question 6Return to the footprint; the repair reached further than intended
6. Does the repair stay inside the approved scope and terms?Sources, fields and uses compared with what the company approvedRe-deliver under the original acceptance terms, with any disclosed limitationsTreat it as a scope change and seek the company's approval first

The repair log that travels with the re-delivery

Ship a repair log with every re-delivery, so the buyer can audit the repair without rerunning it. The same log is the rejection reason log for the next offer: across several rejections it shows which defects keep returning and which repairs keep changing meaning.

Keep one row per rejection reason and the buyer's words verbatim. These fields are the minimum, with Illustrative example values:

The repair log that travels with the re-delivery
FieldWhat to recordExample (Illustrative)
Reason and buyer's wordsRejection reason code and verbatim textOffice B stores local time with no offset
FootprintSelector, fields allowed to change, expected changeOffice B work orders; timestamp fields; add offset and convert to UTC
SnapshotsHashes of the original and repaired copies, plus the code versionTwo SHA-256 hashes and a commit ID
Ledger resultsEach invariant with before, after and toleranceZero orphans; zero outcome flips outside the footprint
Changes outside the footprintCount and description, or noneNone after revision
Tree exit and verdictThe last question reached and the decisionQuestion 6: re-deliver with one disclosed limitation
Approvals and disclosureWho signed off on each side and the limitation text sent46 orders in the repeated daylight-saving hour flagged as ambiguous

When no repair can answer the rejection

Some rejections cannot be repaired without turning the dataset into something the company never approved or the buyer never asked for. Test for three before writing code.

Rights come first. If the buyer rejected the delivery because records lack documented permission, no transformation creates it. Public AI datasets show how common the gap is: when the Data Provenance Initiative looked at more than 1,800 text datasets for a 2024 Nature Machine Intelligence paper, about 70 percent of the datasets on popular hosting sites had no license recorded. De-identification does not close the gap either, because it addresses privacy, not the authority to license.

Scope and terms come second. In SourceX's process, the company's approval of the scope and terms and its signature on the agreement both come before any data reaches SourceX, so a repair that pulls in a new system, adds fields or enables a new use is a scope question before it is an engineering one; the fix is an approval, not a commit. Commercial objections behave the same way: a buyer that wants a lower price or exclusivity will not be satisfied by a cleaner file.

Task mismatch comes third. If the buyer needs outcomes the business never recorded, imputing them fabricates the very signal the buyer is paying for. Record the gap and stop; the log will show whether the same request keeps arriving.

Worked example: a time zone repair that moved outcomes

Illustrative and fictional. A field service company delivers 52,000 work orders from two offices. The buyer rejects the delivery because 9,300 orders from office B carry local timestamps with no offset, which makes response times unreliable. The footprint: office B orders, timestamp fields only, add the office offset and convert to UTC.

The first repair converts the timestamps and then recomputes the service-level flag from the corrected times. The diff catches it: links between orders, visits and invoices are unchanged, but 2,080 orders changed calendar day, 410 moved into a different month and 130 service-level flags flipped, all inside the footprint but none predicted by it. The dispatch system had recorded those flags at the time, reflecting what the business believed and acted on, so recomputing them rewrote outcomes.

The revised repair keeps the recorded flag, stores the UTC instant beside the original local time and offset, and adds a recomputed flag in a separate, labeled field that the buyer may use or ignore. The rerun shows zero relationship failures, zero outcome flips and every date change listed. Forty-six orders fall in the repeated hour when clocks go back and cannot be placed with certainty, so they are flagged rather than guessed. The tree ends at question 6: re-delivery under the original acceptance terms with one disclosed limitation.

Every number in this example is invented to show the method; nothing here is a measured result from SourceX or any company.

Before-and-after panels comparing a first time zone repair, which flipped 130 recorded outcomes and moved 410 orders into another month, with a revised repair that kept every recorded outcome and flagged 46 ambiguous orders.
Illustrative: the worked example's two repairs scored on relationships, outcomes and task context.

Asking for repairable data in the first request

Ask for repairability at the start: a request that names the outcome fields to keep as recorded, the context the task needs and the acceptance test lets the supplier plan repairs that keep meaning. SourceX runs data preparation as part of turning selected business records into licensed datasets, de-identifying them itself or through its processing partner, and it keeps no dataset stock: each buyer's dataset is sourced from U.S. businesses once requested.

Three lines make the difference in a request: which fields are recorded outcomes that must never be recomputed, which context (event order, intervals, roles, policy versions) the task depends on, and the acceptance test with its tolerances. With those agreed, a later rejection becomes a scoped repair rather than a renegotiation.

Frequently asked questions

What is semantic fidelity in data cleaning?

Semantic fidelity means a cleaned or repaired dataset still says what the original said about relationships, outcomes and context, apart from the defect that was fixed. It is checked with a before-and-after diff against a written footprint of allowed changes, not by format validators alone.

Can a repair pass data validation and still change meaning?

Yes. dbt's relationships test excludes null values, so a repair that blanks a foreign key passes it, and a pandas merge does not check cardinality unless its validate argument is set. Recomputed outcomes and shifted dates also pass type and range checks.

Does a repaired dataset need acceptance testing again?

It should go through at least the paired part of the buyer's acceptance test. If every change is inside the agreed footprint and the paired items behave as predicted, the original acceptance terms can usually apply; if not, treat it as a new delivery or a scope change.

Can de-identification change what a dataset means?

Yes. Under the HIPAA Safe Harbor method, for example, every element of dates directly related to an individual except the year must be removed, which erases intervals and sequence detail. Check order and interval invariants on the de-identified copy and disclose what was lost.

Who approves a repair that changes a dataset's scope?

The company that owns the records. Under SourceX's process that company signed the agreement and approved its scope and terms before anything was delivered, so a repair that adds sources, fields or uses goes back to it first.

Sources

  • dbt's relationships test validates that every child record has a parent and excludes null values, consistent with database foreign key constraints; a separate not_null test is needed to fail on nulls. Source
  • pandas merge accepts a validate argument that checks whether merge keys are unique in the left, right or both datasets (one_to_one, one_to_many, many_to_one). Source
  • The label-errors project releases components to build corrected test sets for ten benchmarks because practitioners may choose different correction rules, such as 5-of-5 versus 3-of-5 agreement or removing multi-label examples. Source
  • HHS guidance on HIPAA Safe Harbor de-identification requires removing all elements of dates directly related to an individual except the year. Source
  • Anthropic's January 2026 guidance on agent evaluations defines the outcome as the final state of the environment, such as whether a reservation exists in the database, rather than what the transcript says. Source
  • The Data Provenance Initiative's audit of more than 1,800 text datasets (Nature Machine Intelligence, 2024) found license omission around 70 percent on popular dataset hosting sites. Source

Tell us what data you need

Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.

See if your company qualifies