Skip to content

Privacy and preparation

Policy dates in a deidentified dataset: 8 transforms, one join test

By SourceX Editorial · Reviewed by Noah Loul ·

9 sections

Short answer

To keep policy dates usable in a deidentified dataset, compute each event's policy version before any date is transformed, then release a format that hides the calendar without leaking it back. In our seeded test on 35,298 synthetic events, per-customer shifts of up to 30 days mislabeled 14.6 percent of events, while a version id plus relative day counts kept every label and exposed 0.9 percent of true dates.

Redaction

Policy dates deidentified

This page covers policy dates in a deidentified dataset: 8 transforms, one join test.Illustrative

Key takeaways

  • The label a policy dataset needs is the version in force on the event date, so compute it before any date is transformed.
  • Per-customer shifts of up to 30 days mislabeled 14.6 percent of synthetic events against the real calendar while every gap stayed exact, which hides the damage.
  • Coarse fields plus exact intervals can hand dates back: week-of-version buckets with relative days exposed 50.9 percent of true dates.
  • A version id with relative day counts kept every label and every gap, with 0.92 percent of dates exposed in the test world.
  • Record effective, announced and superseded dates and a version kind, so corrections and backdated rules are not mistaken for new tasks.

What does a policy date have to survive in a deidentified dataset?

It has to survive one join: from the date an event happened to the policy version in force that day. An agent that approves refunds, prices a renewal or reimburses mileage is right only if it applies the rule that was live when the customer acted, so the label in an evaluation set is the version, and the date is how you find it.

Public rule books show how sharp that join is. According to the IRS's 2022 Publication 463, the business mileage rate that year was 58.5 cents per mile from January 1 to June 30 and 62.5 cents from July 1 to December 31. An expense claim dated June 28 that a privacy step moves forward five days lands in the second half of the year, and a grader now marks the correct reimbursement wrong.

Deidentification moves exactly those dates. For health records covered by HIPAA, the Safe Harbor method in 45 CFR 164.514 removes all elements of dates except the year for dates directly related to an individual, such as admission and discharge dates. Business datasets outside HIPAA often shift or coarsen event dates as well, because a precise date tied to a customer can single that customer out. The policy calendar is a different kind of date: it is the company's rule book, identical for every customer.

So the decision is which date representation keeps the version label right without handing the real dates back. Three measurements settle it: the share of events whose released fields still identify the correct version, the share of one customer's gaps between events that stay exact, and the share of events whose true date an informed attacker can recover.

A shift moves the event and leaves the rule book where it was. Shifting tools are built to keep each person's own timeline intact, not to keep it aligned with a calendar that every person shares.

Google Cloud's Sensitive Data Protection reference shows a common design. Its date-shift transform accepts an optional context field, such as an entity ID, and when that field is set the shift is consistent for each context value. Nothing in the transform knows that a refund policy changed on a particular Tuesday, so the shifted date is never checked against the rules it will later be joined to.

MIMIC, a deidentified critical care database made available by researchers at the MIT Laboratory for Computational Physiology, spells out the trade. Its MIMIC-III documentation says date shifting kept time of day, day of the week and seasonality, and removed the year, the day of the month and inter-patient information: two patients shown in the ICU on the same shifted date were not there at the same time. MIMIC-IV adds an anchor_year_group column, a range of years in which each patient's shifted anchor year actually fell, which hands researchers back a coarse real calendar.

A policy version is inter-entity information by definition. Every customer who acted between two effective dates shares it, and that shared alignment is precisely what per-entity shifting is designed to erase.

Keeping exact dates is no escape either. Latanya Sweeney's Data Privacy Lab reports that 87 percent of the U.S. population, 216 million of 248 million people, was likely unique on five-digit ZIP code, gender and date of birth, and its page notes that a later study by Golle put the share at 64 percent. Dates work as quasi-identifiers, so the task is to transform them in a way the policy join can tolerate.

Eight ways to release the dates, scored on 35,298 synthetic events

Releasing the policy version computed before any transform, together with day counts measured from each customer's first event, kept every label right in our test and still left a median of 18 candidate dates per event. Every shift looked up against the real calendar lost labels, and one format that looked careful gave half of the real dates back.

The test is a seeded simulation on synthetic records, not a measurement of any real company. It builds one world: a collection window from January 1, 2023 to December 31, 2025, a public calendar of 13 policy versions (mean length 84.3 days, shortest 4, longest 371) and 5,000 customers with 2 to 12 events each, 35,298 events in all. Each release format is then scored on the same events.

An event counts as labeled right only if its released fields point to exactly one version and that version is the true one. An event counts as exposed when its true day is the only day consistent with everything an attacker knows: the public calendar, the collection window, the transform and its parameters, and every released field for that customer. The methods note lists every rule, and the script reruns in seconds.

Results for the eight formats, one row each:

Eight ways to release the dates, scored on 35,298 synthetic events
Release formatPolicy labels rightGaps exactDates exposed (median candidate days)Read
Exact dates100%100%100% (1)Not deidentified at all
Year only0%0%0% (365)Every year held at least one policy change
Month only72.6%0%0% (31)Fails in every month that contains a change
Per-customer shift up to 30 days, real calendar85.4%100%0.03% (61)Privacy holds; about one label in seven is wrong
Shift up to 30 days (new draw) plus the true version id100%100%1.27% (15)Labels fixed, but version windows narrow the offset
Version id plus days since first event100%100%0.92% (18)Best balance in this world
Version id, week of version, days since first event100%100%50.9% (1)Half of all true dates recovered
Shift up to 30 days, clamped inside each version window100%73.0%0.03% (29)Labels and privacy kept; about a quarter of gaps bent
Paired horizontal bars for eight date release formats, showing the share of policy labels kept right and the share of true dates exposed in a seeded synthetic test.
Policy labels kept against true dates exposed for eight release formats. Seeded simulation on 35,298 synthetic events, not company data.

How quickly do labels decay as the shift range widens?

Quickly, and in proportion to how long policy versions last. With per-customer offsets of up to 7 days, 96.1 percent of events still looked up the right version; at 30 days, 85.4 percent; at 90 days, 62.3 percent; at 182 days, 46.6 percent. Gaps between one customer's events stayed exact in every run, which is why the damage is easy to miss: timelines look healthy while labels quietly go wrong.

An event is mislabeled when its shift carries it across an effective date, so short versions suffer most. This world contains a 4-day version and a 6-day version, the kind a same-week correction produces, and almost any offset moves their events out. A team that sizes the shift against the average version length will still lose most of a short correction's events.

Three rules follow from the curve:

  • Size the shift range against the shortest version window you must keep, not the mean.
  • Compute the version label before shifting; a lookup after shifting inherits every boundary crossing.
  • Report label agreement per version, so short versions do not disappear inside an overall average.

Each field looked safe; together they handed back the dates

Coarse fields released together with exact intervals undo each other's protection. Each field alone hides the date, but combined they intersect until a single day remains, an effect worth calling joint narrowing.

The week-bucket format is the clearest case. A version id with the week since that version took effect leaves seven candidate days per event, and day counts since a customer's first event look harmless on their own. Together, every event's seven-day window has to fit the same starting day, and the other events' windows cut the candidates down: 50.9 percent of events had exactly one consistent true date, and the median was one.

Adding the true version to shifted dates does the same at lower strength. A customer shifted by up to 30 days had a median of 61 candidate dates, but once each event also carried its version, any offset that would push an event outside its version window was ruled out. The median fell to 15 and the exposed share rose from 0.03 to 1.27 percent.

Version ids with relative days still narrow, because each version window acts as a bucket, but the buckets are long: a median of 18 candidate days and 0.92 percent exposed in this world. Whether that residual is acceptable is a privacy reviewer's decision, made on the real calendar and real event counts, not on these synthetic numbers.

Clamping each shifted date inside the event's own version window kept every label and held exposure at 0.03 percent, but it bent 27 percent of gaps, because clamped events pile up on window edges. It suits tasks that need calendar-like dates and can tolerate distorted durations.

Is a new policy version a new task or just noise?

It can be either, and the dataset should say which. When a version changes the correct answer, events before and after it are different exercises, and pooling them without the version id teaches a model an average of two rules.

Corrections are the noisy case. A four-day version that fixed a drafting error carries few events and little signal; scored on its own it inflates error rates, and folded silently into its neighbors it can hide a real rule change. A version kind field, rule change or correction, lets an evaluator decide which treatment fits.

Backdating is the case that breaks historical comparisons. A rule announced after its effective date was not knowable to the person who acted under the old one, so an agent graded against the new version is graded on information nobody had. Keep the announced date beside the effective date, and grade agents on what was known at the time.

Research on question answering shows the cost of losing the as-of date. SituatedQA, presented at EMNLP 2021, found that the same question can have different correct answers depending on when it is asked, and that models trained on older data lost roughly 15 points of accuracy on present-day answers even with an updated evidence corpus. A policy dataset built under last year's rule book carries the same risk in miniature.

A policy-calendar card and the checks before each re-release

A data card for this problem needs fields about the calendar, not only about the records: where the rule book came from, how versions are named, which date fields were transformed and how, and whether labels were computed before or after the transform. Reissue the card whenever any of its rows changes, and keep offsets, keys and seeds with the supplier rather than in the delivered files.

The checklist comes first, then the card it keeps current:

  • A new version took effect: recompute labels for events on and after its effective date, and confirm that no earlier label moved.
  • A version was corrected or backdated: record its announced date and version kind, then rerun the label pass for the affected window.
  • The shift range, bucket size or customer key changed: rerun the exposure test, and do not pool releases made under different parameters.
  • A new field carries a date or a duration (notes, file names, timers): test it for joint narrowing before it ships.
  • Label agreement for any single version fell below the floor agreed with the buyer: hold the release.
  • The exposed share or the candidate-day median crossed the privacy reviewer's limit: hold the release.
  • The buyer's task moved from applying rules to seasonality or cross-customer analysis: revisit the format choice itself.
  • The calendar extract was refreshed: diff it against the last one, because a silent edit to an old effective date relabels history.
A policy-calendar card and the checks before each re-release
Card fieldWhat to recordWhy the join needs it
Calendar sourceSystem and owner of the rule book, extract dateLabels are only as good as the calendar they came from
Version schemeId, effective date, announced date, superseded date, kindSeparates rule changes from corrections and backdating
Event date fieldsEvery date field, its transform and parametersOne untransformed field undoes the rest
Label timingComputed before or after the transformLabels computed after a shift inherit boundary errors
Label agreementShare right, overall and per versionShort versions hide inside an average
Exposure testAttacker knowledge assumed, share exposed, median candidatesShows whether combined fields narrow the dates
Gap fidelityShare of exact gaps between a customer's eventsClamped and bucketed formats bend durations
Release lineageParameters and calendar version for each releaseReleases made under different parameters cannot be pooled

Naming the date treatment in a data request

Put the date treatment into the requirement before any record is prepared. State the task (applying rules, measuring durations, seasonality or cross-customer patterns), the policy calendar the labels must match, the label agreement you will accept per version, and the exposure test you expect the supplier to run and report.

SourceX does not keep datasets on a shelf: it sources them for each request, and a buyer describes scope, volume, language, format, timing and licensing needs in the request form. Under its standing terms, de-identification is done by SourceX itself or by its processing partner, so a request that names the date representation and the acceptance test lets that work protect the join from the start instead of exposing the damage at review. Write the request around what the records must contain; whether a particular supplier's records can meet it is settled during preparation, not promised up front.

Methods note: the synthetic world, the seed and the counting rules

Script: policy_date_transforms_sim.py, Python standard library only, seed 20261027, run on 2026-10-27; it writes results_policy_sim.json, and both files are kept for reviewers. Collection days run from 0 to 1,095 (January 1, 2023 to December 31, 2025). Twelve change days are drawn without replacement from days 1 to 1,095, giving versions v1 to v13. Each of 5,000 customers gets an event count drawn uniformly from 2 to 12 and event days drawn uniformly with replacement, then sorted. Offsets come from the same generator after the world is built, drawn in this order: 7-, 30-, 90- and 182-day shifts (the 30-day run is the table row), a new 30-day draw for the version-id row, one unreported global offset, then the clamped shift.

Labels right: the released fields determine exactly one version and it is the true one. For year or month releases the whole period must sit inside one version window; for shifted dates looked up against the real calendar, the version in force on the shifted day, with shifted days outside the collection window taking the nearer end version. Gaps exact: consecutive pairs of one customer's events whose released gap equals the true gap, with undetermined gaps counted as not exact and same-day pairs counted like any other. Exposed: the true day is the only day consistent with the public calendar, the collection window, the transform and its parameters, and every released field for that customer. Candidate days: the number of such consistent days, with the median taken over events.

Not measured: real company calendars or event densities, attackers holding outside information such as one known transaction date, dates inside free text, and legal adequacy under any standard. The figures describe this synthetic world only. A different seed, calendar or event density will move them, and the shift results depend on version lengths, which average 84.3 days here.

Frequently asked questions

Do policy effective dates have to be shifted along with event dates?

Usually not, because a company-wide rule's effective date describes the business rather than any one customer, and the join needs it on the real calendar. The customer's event dates are the identifying part. Whether a given date counts as personal information depends on the law and the facts, so a privacy reviewer or counsel makes that call.

Is it enough to remove names and keep exact dates?

Rarely. The Data Privacy Lab reports that ZIP code, gender and date of birth alone likely made 87 percent of the U.S. population unique, and exact event dates can work the same way when combined with other fields. Transform event dates, then test what the combination of released fields reveals.

How large a date shift can policy labels tolerate?

It depends on how long your policy versions last, especially the shortest ones. In our synthetic test, shifts of up to 7 days kept 96.1 percent of labels and shifts of up to 30 days kept 85.4 percent. Computing the label before shifting avoids the loss entirely, but check what the added label reveals.

Why not release only the policy version and drop dates entirely?

A version id alone keeps the label but loses every duration, such as time to resolve or days past a deadline. Adding day counts since each customer's first event kept both in our test and left a median of 18 candidate dates per event. Run the same exposure test on your own calendar before choosing it.

What should a buyer ask a supplier about date treatment?

Ask when labels were computed relative to the transform, which fields were shifted or coarsened and with what parameters, label agreement per version, and the exposure test result with its attacker assumptions. Also ask how corrections and backdated versions are marked, because they change what a correct answer was at the time.

Sources

  • The IRS's 2022 Publication 463 sets the business mileage rate at 58.5 cents per mile from January 1 to June 30, 2022 and 62.5 cents from July 1 to December 31, 2022. Source
  • The HIPAA Safe Harbor method in 45 CFR 164.514 removes all elements of dates except the year for dates directly related to an individual, including admission and discharge dates. Source
  • Google Cloud Sensitive Data Protection's date-shift configuration accepts a context field, such as an entity ID, that makes the shift consistent for each context value. Source
  • MIMIC-III documentation says date shifting preserved time of day, day of the week and seasonality, and removed the year, the day of the month and inter-patient information. Source
  • MIMIC-IV's anchor_year_group gives the range of real years in which a patient's shifted anchor year occurred. Source
  • The Data Privacy Lab reports that 87 percent of the U.S. population was likely unique on five-digit ZIP code, gender and date of birth, and notes a later estimate of 64 percent by Golle. Source
  • SituatedQA shows that correct answers can depend on when a question is asked and that models trained on older data lose about 15 points of accuracy on present-day answers. 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