A privacy analysis must specify whether it protects one event, one account or an entire person’s contributions across time.
Privacy units and bounded contribution: count people, not events
Select the neighbor relation
If one learner can create 400 events, protecting one event says little about that learner’s complete activity. A learner-level neighboring dataset differs by all allowed events for one learner. Define the protection unit before selecting a mechanism or quoting a privacy parameter. The threat model should make that choice relevant to a real observer.
Bound contributions
For a weekly completion count, cap each learner at one qualifying contribution to that week’s released statistic, then define how many weeks can be released. A per-week cap does not by itself bound a learner’s total contribution across a long series. Apply the bound before aggregation; deleting extra rows after publishing a noisy output does not repair the sensitivity calculation.
Control identifiers
Deduplication requires a stable learner key inside the protected computation, even if the published output omits it. Do not expose the key in logs or sample outputs. If one person can hold multiple accounts, an account-level unit may fail to match the intended person-level protection; state that limit explicitly rather than claiming a broader guarantee.
Run a fixture
Learner L-47 completes three lessons in one week and L-48 completes one. Under a one-contribution-per-learner weekly count, the bounded count is two, not four. Add L-47 in the next week and decide whether the release protects each week independently or the learner across both weeks; the answer changes the accounting plan.
Implementation
def bounded_weekly_count(completion_rows, week_id):
learners = {row["learner_id"] for row in completion_rows
if row["week_id"] == week_id and row["qualifies"]}
return len(learners)Performance and operating cost
A pass over N events costs O(N) expected time and O(U) memory for U distinct learners in the week. This code enforces one weekly count per learner; it does not add noise or establish differential privacy by itself.
Common Mistakes
- Do not describe event-level protection as person-level protection.
- Do not ignore repeated contributions across released periods.
- Do not present deduplication alone as a private release mechanism.
