Differential Privacy Basics: Noisy Counts in Python
A made-up count of 412 told a simulated attacker whether one person was in the data.
Video #101 ยท AI security and governance
Steps in the video
Files
- compare.py (27 lines)
- dp.py (12 lines)
Tested with
Python 3.12.15
What this does not show
One made-up count and one made-up person; a seeded teaching simulation in plain Python against an attacker who knows both possible counts; not noise you should use in production.
Sources
Learning IT by Example.