DDIA·واژه‌هاTERMS

نقشه راهRoadmap/ واژه‌نامهGlossary/ فصل ۱۴Chapter 14

۱۴14کار درست را انجام بدهDoing the Right Thing

۱۱ واژه از فصل ۱۴ — هر کدام با یک مثال روزمره، یک نمودار و تلهٔ رایج.11 terms from chapter 14, each with an everyday example, a diagram and the usual trap.

ترازو همیشه یک کیلو و نیم کم می‌گوید. مشکل چیست؟The scale is always a kilo and a half light. So what is wrong?

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

ترازوی خانهٔ مادربزرگ هر بار که رویش می‌روی، یک کیلو و نیم کمتر از ترازوی مطب نشان می‌دهد. یک بار که اشتباه کند می‌گویی خطا بود و رد می‌شوی؛ ولی وقتی هر بار همین‌قدر کم می‌گوید، دیگر خطا نیست، عادتِ ترازو است. مدل هم همین‌طور است: اگر همیشه یک گروه را بدتر ببیند، هزار بار که نتیجه‌ها را جمع بزنی آن کجی از بین نمی‌رود.The scale at your grandmother's house reads a kilo and a half lighter than the one at the clinic, every single time. One bad reading is an error you shrug off; the same shortfall every time is the scale's habit. A model is like that too: if it always reads one group as worse, a thousand reports averaged together will not flatten that lean.

تشبیه و تصویر ذهنیThe analogy

ترازوی دیجیتال دو نوع اشتباه دارد. یک نوعش تصادفی است: رویش می‌روی، یک عدد می‌دهد؛ دوباره می‌روی، چند صد گرم بالاتر. میانگین این خطا نزدیک صفر است، پس اگر چند بار بایستی و میانگین بگیری به وزن واقعی نزدیک می‌شوی. نوع دوم این است که دستگاه صفرش رفته و هر بار یک کیلو و نیم کم می‌گوید. اینجا هر چه بیشتر اندازه بگیری، همان‌قدر مطمئن‌تر اشتباه می‌کنی، چون نمونهٔ بیشتری از همان کجی جمع کرده‌ای. سوگیری در داده همین نوع دوم است: نه نویز، بلکه کجیِ ثابت. و بدترین ویژگی‌اش این است که از داخل داده دیده نمی‌شود؛ ترازو خودش نمی‌داند که صفرش رفته.A digital scale makes two kinds of mistake. One is random: you step on, it reads something; you step on again and it is a few hundred grams off. That error averages near zero, so several weighings and an average get you close to the truth. The other kind is a scale whose zero has drifted: it reads a kilo and a half light every time. Weigh yourself more often and you are not more accurate, only more confident in the same tilt, because you have collected more samples of it. Bias in data is the second kind: not noise, but a fixed lean. Its worst property is that it is invisible from inside the data; the scale does not know its zero has drifted.

خطا · تصادفیRandom errorدو طرفِ عدد پخش استscattered around the valueبا میانگین گرفتن کم می‌شودaverages outاز خود داده دیده می‌شودvisible in the dataسوگیری · یک‌طرفهBias · one-sidedهمیشه به یک طرفalways the same sideبا دادهٔ بیشتر بدتر می‌شودworse with more dataباید بیرون از داده سنجیدmust be checked outside
خطای تصادفی با تکرار کم می‌شود؛ سوگیری با تکرار بیشتر، مطمئن‌تر می‌شود.Random error shrinks with repetition; bias only becomes more confident.

و بعدش، فنیAnd now, technically

در آمار، سوگیری یعنی میانگین خطا صفر نیست: خطا یک طرفِ مقدار واقعی می‌نشیند و با زیاد کردن نمونه کوچک نمی‌شود. در یادگیری ماشین معمولاً از سه جا وارد می‌شود. اول، انتخاب: چه کسانی در داده هستند و چه کسانی نیستند؛ اگر دادهٔ آموزشی از کاربران یک اپلیکیشن خاص بیاید، مدل دربارهٔ کسانی که آن اپلیکیشن را ندارند چیزی نمی‌داند و با اطمینان اشتباه می‌کند. دوم، برچسب: برچسب را گذشتهٔ ما می‌سازد؛ اگر در گذشته به یک گروه وام کمتری داده شده و آن گروه بیشتر نکول کرده، مدل یاد می‌گیرد که به آن گروه وام ندهد و اسمش را «ریسک» می‌گذارد. سوم، سنجش: اگر فقط روی بخشی از داده بسنجی که مدل از قبل در آن خوب است، سوگیری را هرگز نمی‌بینی. راه عملی این است که داده را بر اساس زیرگروه بشکنی، خطا را جدا برای هر گروه اندازه بگیری و فاصلهٔ اطمینانش را هم بنویسی؛ اختلاف بزرگ میان گروه‌ها همان جایی است که سوگیری می‌نشیند.Statistically, bias means the mean error is not zero: errors sit on one side of the true value and do not shrink with sample size. In machine learning it enters from three places. First, selection: who is in the data and who is missing; train on the users of one app and the model knows nothing about people without it, while sounding certain about them. Second, labels: the label is a record of what we did, not of what was true. If one group was historically given fewer loans and defaulted more, the model learns to refuse that group and calls it risk. Third, measurement: test only on the slice where the model already works and you will never see the bias. The practical move is to cut the data by subgroup, measure the error separately for each, and report the interval next to it; the large gap between groups is where bias is sitting.

0سوگیری یعنی میانگین خطا صفر نیستbias means the mean error is not zero
1 subgroupخطا را جدا برای هر زیرگروه اندازه بگیرmeasure error per subgroup, separately
n ↑دادهٔ بیشتر نویز را کم می‌کند، سوگیری را نهmore data shrinks noise, not bias

برچسب، گذشته را تکرار می‌کندLabels repeat the past

وقتی از دادهٔ تاریخی یاد می‌گیری، برچسب‌ها تصمیم‌های گذشتهٔ آدم‌ها هستند، نه حقیقت. اگر بانک در ده سال گذشته به یک محله وام کمتری داده، داده نشان می‌دهد که وام‌های آن محله کم بوده؛ مدل این را «ریسک بالاتر» می‌خواند و همان الگو را ادامه می‌دهد. مشکل این نیست که مدل دروغ می‌گوید؛ مشکل این است که مدل چیزی را پیش‌بینی می‌کند که خودمان ساخته‌ایم. برای همین پیش از هر مدل باید بپرسی برچسب از کجا آمده و چه کسی آن را ساخته؛ اگر جوابش «تصمیم قبلی خودمان» بود، احتمالاً داری تاریخ را تکرار می‌کنی، نه آینده را پیش‌بینی.When you learn from historical data, the labels are records of past human decisions, not of truth. If a bank gave one neighbourhood fewer loans for ten years, the data shows few loans there; the model reads that as higher risk and continues the pattern. The problem is not that the model lies. The problem is that it predicts something we built ourselves. So before any model, ask where the label came from and who made it; if the answer is “our own earlier decision”, you are probably repeating history rather than predicting the future.

سنجش، جایی است که سوگیری لو می‌رودMeasurement is where bias shows up

یک عدد کلی هیچ‌وقت سوگیری را نشان نمی‌دهد، چون گروه بزرگ‌تر عدد را می‌پوشاند. کاری که جواب می‌دهد این است: هر زیرگروه را جدا بشمار، برای هر کدام هم نرخ خطا و هم تعداد نمونه را بنویس. گروه‌های کوچک فاصلهٔ اطمینان پهن دارند؛ اگر گروهی فقط چند ده رکورد دارد، اختلافش با بقیه می‌تواند شانس باشد. پس دو کار لازم است: نمونهٔ کافی برای هر گروه، و گزارشِ فاصلهٔ اطمینان در کنار هر عدد. بدون این دو، «منصف» و «غیرمنصف» هر دو حرف‌های بی‌پشتوانه‌اند.An overall figure never shows bias, because the larger group hides it. What works is counting each subgroup on its own, with both the error rate and the sample size written down. Small groups have wide intervals; a group with a few dozen records can differ from the rest by pure chance. Two things are needed: enough samples per group, and the interval reported beside every number. Without them, “fair” and “unfair” are both unsupported claims.

تلهٔ رایجThe usual trap

قانع شدن با دقت کلی. مدلی که روی همهٔ داده خوب کار می‌کند می‌تواند برای یک گروه کوچک فاجعه باشد، و همان گروه معمولاً همان کسی است که خطا برایش گران تمام می‌شود. دقت کلی میانگینی است که خطای گروه کوچک را در خودش حل می‌کند.Being satisfied with overall accuracy. A model that scores well across the board can be broken for a small group — and that group is usually the one paying for the error. The overall figure is an average that dissolves the failure.

برچسب معاینهٔ فنی یعنی ماشین سالم است؟Does the inspection sticker mean the car is safe?

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

ماشین را می‌بری معاینهٔ فنی. آقای مسئول چراغ‌ها را نگاه می‌کند، بوق را می‌زند، برگه‌ای پر می‌کند و برچسبی می‌چسباند. برچسب می‌گوید آن روز ماشین از در رد شد؛ نمی‌گوید لنت ترمز ماه بعد سالم است. انطباق قانونی هم همان برچسب است: مدرکی که می‌گوید کارها انجام شد، نه اینکه نتیجه درست از آب درآمد.You take the car for its roadworthiness inspection. The officer checks the lights, honks the horn, fills in a form and sticks a sticker on the windscreen. The sticker says the car passed that day; it does not say the brake pads will be fine next month. Compliance is that sticker: proof the steps were done, not proof the outcome is good.

تشبیه و تصویر ذهنیThe analogy

کارخانه‌ای را تصور کن که بازرس به آن می‌آید. مدیر دستور می‌دهد برگه‌ها را در پوشه‌ای مرتب کنند، امضاها را کامل کنند و کپسول آتش‌نشانی را ببرند شارژ. بازرس پوشه را می‌بیند و می‌رود. این پوشه لازم است و ارزش دارد؛ بدون آن کارخانه تعطیل می‌شود. ولی هدف نبوده: هدف این بود که کارگر شیفت شب نسوزد. کسی که فقط پوشه می‌سازد، روز اول می‌گوید «مطابقیم» و روز حادثه می‌فهمد مطابقِ چه چیزی بوده. در داده هم ماجرا همین است: برگهٔ رضایت امضا شده، پوشه مرتب است، ولی پرسشی که قانون می‌خواست جواب بدهد — که آدم‌ها بدانند داده‌شان کجاست و چه کسی می‌بیندش — بی‌جواب مانده.Picture a factory the day the inspector comes. The manager has the paperwork filed, the signatures completed and the fire extinguishers recharged. The inspector looks at the folder and leaves. The folder matters; without it the factory closes. But it was never the point — the point was that the night-shift worker does not get burned. The team that only builds the folder says “we are compliant” on day one and learns which part on the day of the fire. Data works the same way: the consent forms are signed and the folder is tidy, while the question the law actually asked — can people see where their data is and who looks at it — is still unanswered.

قانون · آنچه لازم استLaw · what is requiredسیاست · خوانش ما از آنPolicy · our reading of itکنترل · آنچه واقعاً می‌کنیمControl · what we actually doمدرک · آنچه نشان می‌دهیمEvidence · what we can show
انطباق چهار پله است؛ پلهٔ آخر چیزی است که بازرس می‌بیند، نه چیزی که اتفاق می‌افتد.Compliance is four rungs; the last one is what the auditor sees, not what happens.

و بعدش، فنیAnd now, technically

انطباق قانونی در یک محصول داده سه لایه دارد که روی هم می‌نشینند. لایهٔ اول، پایهٔ قانونی است: برای هر نوع داده باید بتوانی بگویی چرا آن را داری — چون برای اجرای قرارداد لازم است، چون قانون می‌خواهد، چون کاربر رضایت داده، یا چون منفعت مشروعی داری که با حق او سنجیده شده. لایهٔ دوم، حقوق افراد است: دیدن دادهٔ خودش، تصحیحش، حذفش و بردنش به جای دیگر؛ هر کدام یک مسیر فنی می‌خواهد که در جدول‌ها، پشتیبان‌ها و دریاچهٔ داده هم کار کند. لایهٔ سوم، پاسخ‌گویی است: فهرست فعالیت‌های پردازش، نگهداشت محدود و مستند، ارزیابی پیش از شروع کارهای پرخطر، و اعلام نشت در مهلت مقرر. GDPR در اروپا و CCPA در کالیفرنیا همین سه لایه را با جزئیات متفاوت می‌خواهند، و EU AI Act برای سیستم‌های پرخطر لایهٔ چهارمی اضافه می‌کند. نکتهٔ مهندسی این است که هیچ‌کدام با یک سند PDF حل نمی‌شود؛ باید در کد باشد: برچسب روی هر ستون، دسترسی نقش‌محور، و گزارشی که در دو روز بسازی، نه دو ماه.Compliance in a data product has three layers stacked on each other. First, the lawful basis: for every kind of data you must be able to say why you hold it — it is needed to perform a contract, the law requires it, the person consented, or you have a legitimate interest weighed against their rights. Second, individual rights: see your data, correct it, delete it, take it elsewhere; each needs an engineering path that also works across tables, backups and the warehouse. Third, accountability: a record of processing, documented retention limits, an assessment before risky work, and breach notification within the required window. GDPR in Europe and CCPA in California ask for those three layers with different details, and the EU AI Act adds a fourth for high-risk systems. The engineering point is that none of it is solved by a PDF; it has to live in code — a label on every column, role-based access, and a report you can produce in two days rather than two months.

1 basisبرای هر داده یک پایهٔ قانونی مشخص لازم استevery data set needs one stated lawful basis
per columnبرچسب روی هر ستون، نه روی کل جدولa label per column, not per table

چرا گذشتن از بازرسی، امنیت نیستWhy passing an audit is not safety

بازرسی یک نمونه می‌بیند، در یک روز، از کسی که از قبل می‌دانسته بازرس می‌آید. سیستم تولیدی اما هر روز با حالتی کار می‌کند که در بازرسی نبوده. به همین دلیل شرکت‌هایی که همهٔ آزمون‌های انطباق را پاس کرده‌اند باز هم داده لو می‌دهند؛ نه چون دروغ گفته‌اند، بلکه چون سند یک عکس است و سیستم یک فیلم. راه بستن این شکاف، ساختن شاهد در لحظه است: لاگ دسترسی که خودکار جمع می‌شود، آزمون دوره‌ای که خودش اجرا می‌شود، و هشداری که وقتی نگهداشت رد شد صدا می‌دهد. مدرکی که خودش را می‌سازد، از مدرکی که برای بازرس نوشته می‌شود قابل اعتمادتر است.An audit sees a sample, on one day, from someone who knew the auditor was coming. Production runs in the state the audit did not see. That is why companies that pass every compliance test still leak data: not because they lied, but because the document is a photograph and the system is a film. The fix is evidence that builds itself: access logs collected automatically, tests that run on a schedule, and an alert that fires when retention is exceeded. Evidence that generates itself beats evidence written for a visitor.

قانون در کد چه شکلی استWhat the law looks like in code

سه چیز را می‌توانی از همین امروز بسازی. اول، برچسب داده: هر ستون در فهرست داده مشخص کند چه نوع داده‌ای است، پایهٔ قانونی‌اش چیست و کِی باید پاک شود. دوم، کار حذف: یک مسیر آزموده که از جدول اصلی تا کش و ایندکس و دریاچه را بپیماید، نه یک اسکریپت دستی که کسی جرات اجرایش را ندارد. سوم، گزارش: هر درخواست دسترسی یا حذف یک ردیف با زمان و نتیجه داشته باشد، تا وقتی کسی پرسید «چرا این داده را داری؟» جواب از حافظه نباشد. اگر این سه نباشد، هر ممیزی یک پروژهٔ اضطراری می‌شود و هر پروژهٔ اضطراری یک تخلف تازه.Three things you can build starting today. A data label: in the catalogue, every column says what kind of data it is, what its lawful basis is, and when it must be deleted. A deletion path: a tested route that walks from the primary table through caches, indexes and the warehouse, not a hand-written script nobody dares run. And a report: every access or deletion request leaves a row with a time and a result, so when someone asks “why do you hold this?” the answer does not come from memory. Without those three, every audit becomes an emergency project, and every emergency project becomes a fresh violation.

تلهٔ رایجThe usual trap

فکر کردن اینکه انطباق یک پروژهٔ یک‌باره است: سند نوشته شد، بازرس آمد، تمام. قانون عوض می‌شود، سیستم عوض می‌شود، و آن سند دو سال بعد توصیف سیستمی است که دیگر وجود ندارد؛ بدتر، تیم به همان سند استناد می‌کند و خیالش راحت است.Treating compliance as a one-off project: write the document, pass the audit, done. The law changes, the system changes, and two years later the document describes a system that no longer exists — worse, the team cites it and feels safe.

data minimization

کمینه‌سازی داده فصل ۱۴Chapter 14 · دیدن در متنsee in context

کارت نان می‌خواهی. کد ملی برای چه؟You wanted a loyalty card. Why the ID number?

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

برای کارت عضویت نانوایی فرمی می‌دهند که کد ملی، تاریخ تولد و شمارهٔ تلفن می‌خواهد. تو فقط می‌خواهی نانت ارزان‌تر شود. سال بعد همان فرم در کشوی نانوایی است و نانوایی دست عوض شده. کمینه‌سازی داده می‌گوید اگر فقط می‌خواستی بدانی من مشتری همیشگی‌ام، یک شمارهٔ کارت کافی بود و بقیه‌اش فقط ریسکِ نگهداری بود.The bakery hands you a loyalty-card form that asks for your national ID, your birthday and your phone number. All you wanted was cheaper bread. A year later the form is still in the bakery's drawer and the bakery has changed hands. Data minimization says a card number was enough to know you are a regular; the rest was only a risk you agreed to store.

تشبیه و تصویر ذهنیThe analogy

دکتری را تصور کن که برای معاینهٔ گلو، شرح حال ده‌ساله می‌پرسد: سفرها، داروها، سابقهٔ خانوادگی. شاید یک روز به کار بیاید، ولی امروز نه؛ و هر چیزی که نوشت باید نگه دارد، محافظت کند و جواب بدهد. کمینه‌سازی داده مخالفِ دانستن نیست؛ مخالفِ جمع کردن بی‌هدف است. هر فیلدی که نمی‌گیری سه هزینه را حذف می‌کند: هزینهٔ نگهداری، هزینهٔ محافظت، و هزینهٔ پاسخ‌گویی وقتی کسی می‌پرسد چرا این را داری. قیمتش هم روشن است: گاهی بعداً لازم می‌شود و دیگر نداری، و باید برگردی و از نو بگیری؛ اگر مشتری رفته باشد، دیگر نمی‌شود. کار مهندسی همین سنجش است، نه انتخاب یک طرف.Picture a doctor who, for a sore throat, takes a ten-year history: travel, medication, family background. Some of it might matter one day, but not today — and everything written down has to be kept, guarded and explained. Minimization is not against knowing; it is against collecting with no purpose. Every field you do not take removes three costs: keeping it, protecting it, and answering for it when someone asks why you have it. The price is clear too: some day you need it and no longer have it, so you go back and ask again — and if the customer is gone, you cannot. The engineering is that weighing, not a choice of one extreme.

همه را بگیرCollect it allشاید بعداً لازم شودit might help laterنگهداری و محافظت بیشترmore to keep and guardجواب «چرا داری؟» سختhard to answer “why”فقط لازم راOnly what is neededهدف را از قبل بنویسwrite the purpose firstنگهداری و محافظت کمترless to keep and guardگاهی داده‌ای را از دست می‌دهیsometimes you lack the data
هر فیلدی که جمع نمی‌کنی، تعهدی است که نداری؛ هزینه‌اش همان روزی است که لازمش داری.Every field you never collect is an obligation you do not carry; the price is the day you need it.

و بعدش، فنیAnd now, technically

کمینه‌سازی داده سه بخش دارد و هر سه در کد پیاده می‌شود. اول، پیش از جمع‌آوری: هر فیلد باید یک هدف مکتوب داشته باشد و اگر ندارد، گرفته نشود؛ فرم‌ها و APIها هم باید همین را رعایت کنند، وگرنه فیلد از درِ پشتی وارد می‌شود. دوم، در حین ذخیره: چیزی که برای کار اصلی لازم نیست نباید در لاگ، پیام خطا و جدول موقت بیفتد؛ بیشتر نشت‌های واقعی از لاگی می‌آید که کسی به آن نگاه نمی‌کند. سوم، پس از استفاده: هر داده یک تاریخ مرگ داشته باشد و کار پاک‌سازی خودکار اجرا شود، با گزارش. سخت‌ترین بخش، ناشناس کردن است: حذف نام کافی نیست، چون ترکیب کد پستی، تاریخ تولد و جنسیت خیلی وقت‌ها یک نفر را مشخص می‌کند. در عمل، کمینه‌سازی بیشتر از آنکه یک ابزار باشد، یک عادت است: هر جدول جدید با این پرسش شروع می‌شود که این ستون برای کدام تصمیم لازم است، و اگر جواب نبود، ستون ساخته نمی‌شود.Data minimization has three parts, all of them in code. Before collection: every field needs a written purpose, and a field without one is not collected; forms and APIs must obey the same rule, or the field enters through the back door. During storage: whatever the main job does not need must not land in logs, error messages or scratch tables — most real leaks come from a log nobody reads. After use: every data set has a date of death, and an automatic cleanup job runs with a report. The hard part is de-identification: dropping the name is not enough, because postcode, birth date and sex together often single out one person. In practice minimization is less a tool than a habit — every new table starts with the question of which decision this column serves, and if there is no answer, the column is not built.

0 bytesداده‌ای که نگرفتی، نشت نمی‌کند و حذفش لازم نیستdata you never collected cannot leak or need deleting
1 fieldهر فیلد اضافه یک تعهد نگهداری استeach extra field is a retention promise
TTLهر داده باید تاریخ مرگ داشته باشدevery data set needs a date of death

کمینه‌سازی کجا به دیوار می‌خوردWhere minimization hits the wall

اگر فردا مدل بسازی، دادهٔ دیروز را می‌خواهی و نداری. این واقعی‌ترین مخالفت با کمینه‌سازی است و جواب ساده ندارد. جواب عملی این است که کمینه‌سازی را در سطح شناسه انجام بدهی، نه در سطح رفتار: رفتار بماند، ولی به یک شناسهٔ بدلی بسته شود که نشود از آن به شخص رسید، و نگاشت شناسه به شخص جدا و با دسترسی باریک نگه داشته شود. این‌طور تحلیل رفتاری‌ات را داری و ریسک شناسایی را جدا کرده‌ای. اما یک محدودیت را هم بپذیر: اگر از اول هیچ چیزی نگه نداری، هیچ تحلیلی هم نمی‌شود؛ کمینه‌سازی یعنی انتخاب، نه انکار.If you build a model next year you will want yesterday's data and not have it. That is the strongest objection to minimization and it has no easy answer. The practical one is to minimize at the level of identifiers, not behaviour: keep the behaviour but bind it to a pseudonym that cannot be walked back to a person, and keep the mapping separate with narrow access. You keep the analysis and split off the identification risk. Accept one limit too: if you never kept anything, there is nothing to analyse; minimization is a choice, not a refusal to know.

چرا دادهٔ اضافه همیشه گران‌تر تمام می‌شودWhy extra data always costs more

هر ستونی که نگه می‌داری، در پشتیبان هم هست، در محیط تست هم هست، در فایل صادرشده برای تیم دیگر هم هست، و در پاسخ به درخواست دسترسی هم باید از همه‌جا جمع شود. هزینه‌اش ثابت نیست: با رشد داده ضرب می‌شود. بدتر از هزینه، سطح حمله است؛ دادهٔ اضافه‌ای که هیچ تصمیمی بر اساسش گرفته نمی‌شود، همان داده‌ای است که وقتی نشت می‌کند هیچ‌کس نمی‌تواند توضیح بدهد چرا داشتیمش. در گزارش حادثه، اولین سؤالی که می‌پرسند همین است.Every column you keep is also in the backup, in the test environment, in the export another team took, and in the answer to an access request. Its cost is not fixed; it multiplies as data grows. Worse than the cost is the surface: extra data that never drove a decision is exactly the data that, when it leaks, nobody can explain keeping. In the incident report that is the first question asked.

تلهٔ رایجThe usual trap

کمینه‌سازی را با پنهان کردن در لایهٔ نمایش اشتباه گرفتن. داده در انبار مانده، فقط در داشبورد دیده نمی‌شود؛ همان داده در پشتیبان، در فایل صادرشده و در دسترسی مستقیم همچنان هست و همان ریسک را دارد.Mistaking minimization for hiding data in the presentation layer. The data is still in the warehouse, just not on the dashboard; it is in the backup, in the export and behind direct access, carrying exactly the same risk.

قاعده برای همه یکی است. پس چرا نتیجه نصف شد؟Same rule for everyone. So why did the outcome split?

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

دو بچه در خانه یک دوچرخه دارند. قاعده این است که بزرگ‌تر اول سوار می‌شود. قاعده برای هر دو یکی است و هیچ‌کس آن را زیر پا نمی‌گذارد، ولی کوچک‌تر همیشه آخر است و خودش می‌گوید «این عادلانه نیست». انصاف در مدل هم همین است: قاعده را تو می‌نویسی، و همان قاعده تعیین می‌کند چه کسی همیشه آخر باشد.Two kids share one bicycle. The rule is that the older one rides first. The rule is the same for both and nobody breaks it, yet the younger one is always last and says so: “that's not fair”. Fairness in a model is the same: you write the rule, and the rule decides who is always last.

تشبیه و تصویر ذهنیThe analogy

در صف نانوایی، قاعدهٔ «هر که زودتر آمد زودتر نان می‌گیرد» روشن است و همه قبولش دارند. حالا یک نفر عصا دارد و کندتر می‌رسد؛ برای او اجازه می‌دهی اول صف بیاید. اینجا دو تعریف از انصاف به هم می‌خورند: یکی می‌گوید با همه یک‌شکل رفتار کن، دیگری می‌گوید نتیجه را نگاه کن. در سیستم تصمیم‌گیری هم همین دو تعریف هست و هر کدام به یک عدد متفاوت می‌رسد. مشکل این است که نمی‌شود هر دو را هم‌زمان حداکثر کرد؛ باید بگویی کدام خطا برایت گران‌تر است و کی تاوانش را می‌دهد. کسی که این را ننوشته باشد، در عمل یک تعریف را انتخاب کرده و اسمش را «طبیعی» گذاشته.At the bakery the rule is first come, first served, and everyone accepts it. Then someone on crutches arrives late; you let them go ahead. Two definitions of fairness collide here: one says treat everyone the same, the other says look at the result. Decision systems carry the same pair, and each lands on a different number. You cannot maximize both; you have to say which error costs more and who pays for it. Whoever never wrote that down has picked one definition and called it natural.

نتیجهٔ یکسانSame outcomeنرخ برابر برای هر گروهequal rates per groupبه قاعده نگاه می‌کندlooks at the ruleتفاوت واقعی را نادیده می‌گیردignores real differencesفرصت یکسانSame opportunityخطای برابر برای هر گروهequal errors per groupبه نتیجه نگاه می‌کندlooks at the resultباید گروه‌ها را جدا بشماریrequires counting per group
دو تعریف از انصاف، دو عدد متفاوت؛ هر مدل از یکی خوشحال می‌شود و از دیگری نه.Two definitions of fairness, two different numbers; every model pleases one and fails the other.

و بعدش، فنیAnd now, technically

انصاف در یادگیری ماشین یک عدد نیست، چند معیار است که با هم نمی‌خوانند. برابری آماری می‌گوید نرخ تصمیم مثبت باید در گروه‌ها برابر باشد؛ برابری فرصت می‌گوید از میان کسانی که واقعاً شرایط یکسانی دارند، نرخ پذیرش باید برابر باشد؛ کالیبراسیون می‌گوید امتیاز یکسان باید معنای یکسان داشته باشد. وقتی نرخ پایه در گروه‌ها متفاوت است، این معیارها هم‌زمان قابل ارضا نیستند و باید یکی را انتخاب کنی. همین‌جاست که کار از ریاضی بیرون می‌زند: انتخاب معیار یعنی انتخاب اینکه کدام خطا گران‌تر است — رد کردن کسی که مستحق بود، یا پذیرفتن کسی که نبود — و این یک تصمیم دربارهٔ ارزش‌هاست، نه یک تنظیم در کد. در عمل، کار مهندسی این است که گروه محافظت‌شده را صریح تعریف کنی، معیار را بنویسی، هزینهٔ انتخاب را در سند بیاوری و همان معیار را در تولید پایش کنی. اگر معیار در سند نباشد، در عمل معیار همان چیزی است که داشبورد نشان می‌دهد.Fairness in machine learning is not one number but several metrics that disagree. Demographic parity says the positive-decision rate should match across groups; equal opportunity says that among people who are genuinely equally qualified, the acceptance rate should match; calibration says the same score should mean the same thing. When base rates differ across groups, those cannot all hold at once and you must pick one. That is where it stops being arithmetic: choosing the metric means choosing which error costs more — turning away someone who deserved it, or accepting someone who did not — and that is a decision about values, not a setting in the code. The engineering job is to define the protected group explicitly, write down the metric, record the cost of the choice, and monitor that metric in production. If the metric is not in a document, the metric is whatever the dashboard shows.

1 metricباید یکی را انتخاب کنی؛ همه با هم شدنی نیستyou must pick one; not all at once
2 errorsردِ نادرست و پذیرش نادرست، دو هزینهٔ جداfalse reject and false accept are separate costs
CIفاصلهٔ اطمینان را کنار هر عدد بنویسput an interval beside every number

چرا نمی‌شود همهٔ معیارها را هم‌زمان داشتWhy you cannot satisfy every metric at once

وقتی دو گروه نرخ پایهٔ متفاوت دارند، سه چیز را نمی‌شود هم‌زمان داشت: کالیبراسیون، برابری نرخ خطا، و برابری نرخ تصمیم مثبت. اثباتش ریاضی است، نه سیاسی؛ هر دو معیار را که بخواهی، سومی خودش به هم می‌ریزد. این یعنی بحث «آیا مدل منصف است؟» بدون پرسش «کدام خطا برای ما گران‌تر است؟» جواب ندارد. تیم‌هایی که این را نمی‌فهمند، سال‌ها سر یک عدد دعوا می‌کنند و آخرش عددی را انتخاب می‌کنند که در داشبورد بهتر دیده می‌شود، نه عددی که برای کاربر گران‌تر است.When two groups have different base rates you cannot have all three of: calibration, equal error rates, and equal positive-decision rates. The proof is mathematical, not political; pick any two and the third breaks. So “is the model fair?” has no answer without “which error costs us more?”. Teams that miss this argue about a number for years and finally pick the one that looks best on the dashboard rather than the one that costs the user most.

انصاف را چطور در تولید نگه داریKeeping fairness alive in production

سنجش یک‌باره کافی نیست. نرخ پایه با رفتار کاربران عوض می‌شود، جمعیت هم عوض می‌شود، و گروهی که پارسال کوچک بود امسال بزرگ می‌شود. پس همان‌طور که تأخیر را پایش می‌کنی، نرخ خطا را هم جدا برای هر گروه پایش کن و آستانهٔ هشدار بگذار. دو نکتهٔ عملی: اول، گروه‌های کوچک را با فاصلهٔ اطمینان گزارش کن، وگرنه هر نوسان تصادفی یک «کشف» به نظر می‌رسد؛ دوم، تعریف گروه را در کد نگه دار، نه در سر یک نفر، چون وقتی آدم‌ها عوض شوند تعریف هم عوض می‌شود و مقایسه بی‌معنا می‌شود.A one-off measurement is not enough. Base rates move with behaviour, the population changes, and a group that was small last year is large this year. So monitor error rates per group the way you monitor latency, with a threshold that alerts. Two practical notes: report small groups with an interval, or every random wobble looks like a discovery; and keep the definition of the group in code, not in someone's head, because when the people change the definition changes and the comparison stops meaning anything.

تلهٔ رایجThe usual trap

اعلام انصاف بر اساس یک عدد و یک نمونهٔ کوچک. اگر گروهی در داده فقط چند صد رکورد دارد، هر اختلافی می‌تواند شانس باشد؛ اعلام «منصف» روی چنین نمونه‌ای همان اعتماد بی‌جایی است که بعداً گران تمام می‌شود — و این بار گرانش را کسی می‌دهد که در جلسه نبوده.Announcing fairness from one number on a small sample. If a group has a few hundred records, any gap can be chance; calling that “fair” is the same misplaced confidence that gets expensive later — and this time the cost lands on someone who was not in the meeting.

feedback loop

حلقهٔ بازخورد فصل ۱۴Chapter 14 · دیدن در متنsee in context

هر چه بیشتر بفروشد، بیشتر جلوی چشم می‌آید.The more it sells, the more it gets shown.

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

قفسهٔ کنار صندوق سوپرمارکت پر از شکلاتی است که بیشتر فروش می‌رود. چون جلوی چشم است، بیشتر فروش می‌رود. مدیر آمار را نگاه می‌کند و می‌گوید «ببین، این پرفروش است» و باز همان را سفارش می‌دهد. شکلات جدید هیچ‌وقت شانس نیاورد، چون هیچ‌وقت آن‌جا نبود.The shelf by the till holds the chocolate that sells best. Because it is by the till, it sells best. The manager looks at the numbers, says “look, this is the bestseller”, and orders more of it. The new bar never had a chance; it was never on the shelf.

تشبیه و تصویر ذهنیThe analogy

این حلقه را با یک آینه می‌شود نشان داد: آینه رو به آینه، تصویر تا بی‌نهایت تکرار می‌شود و هیچ چیز تازه‌ای اضافه نمی‌شود، فقط بزرگ‌تر می‌شود. در سیستم‌های داده، حلقه معمولاً از یک تصمیم می‌گذرد: مدل می‌گوید این مشتری ریسک دارد، پس به او وام نمی‌دهیم؛ چند ماه بعد دادهٔ آموزش را نگاه می‌کنی و می‌بینی همهٔ وام‌های داده‌شده خوب پس داده شده‌اند. مدل درست به نظر می‌رسد، ولی فقط چون هرگز به گروه دیگر وام ندادیم و جوابش را ندیدیم. دادهٔ آموزشی، نتیجهٔ خود مدل است؛ داری آینه را آموزش می‌دهی.A mirror facing a mirror shows it plainly: the image repeats forever, nothing new enters, it only gets bigger. In data systems the loop usually runs through a decision — the model says this applicant is risky, so no loan; months later you look at the training data and every loan you granted was repaid. The model looks right, but only because you never lent to the other group and never saw the answer. The training data is a product of the model; you are teaching the mirror.

حلقهthe loopمدلmodelتصمیمdecisionرفتار مردمbehaviourدادهٔ تازهnew dataآموزش دوبارهretrainانتشارdeploy
خروجی مدل دنیا را عوض می‌کند؛ دنیای عوض‌شده، دادهٔ آموزشی بعدی است.The model changes the world; the changed world becomes the next training data.

و بعدش، فنیAnd now, technically

حلقهٔ بازخورد در یادگیری ماشین سه شکل رایج دارد. شکل اول از راه برچسب است: مدل پیش‌بینی می‌کند کجا جرم بیشتر است، پلیس همان‌جا را بیشتر گشت می‌زند، جرم بیشتری ثبت می‌شود و برچسب تازه همان پیش‌بینی را تأیید می‌کند. شکل دوم از راه نمایش است: سیستم پیشنهاددهنده یک آیتم را نشان می‌دهد، کاربر رویش کلیک می‌کند، و کلیک به‌عنوان دادهٔ مثبت برمی‌گردد؛ آیتمی که هرگز نشان داده نشده هیچ شانسی ندارد. شکل سوم از راه خودِ سیستم است: مدل به یک متقاضی وام نمی‌دهد، پس هرگز نمی‌فهمیم که او خوب پس می‌داد یا نه. درمان هر سه یکی است: باید جایی داشته باشی که تصمیم مدل روی آن اثر نگذاشته باشد — یک نمونهٔ تصادفی که همیشه تصمیم تصادفی می‌گیرد، یا یک گروه شاهد که مدل برایش تصمیم نمی‌گیرد. بدون آن، تنها چیزی که می‌سنجی این است که مدل با خودش موافق است.A feedback loop in machine learning takes three common shapes. Through the label: the model predicts where crime is higher, police patrol there, more crime is recorded, and the fresh label confirms the prediction. Through exposure: a recommender shows an item, the user clicks, the click returns as positive data — and an item never shown has no chance at all. Through the system's own action: the model denies a loan applicant, so you never learn whether that person would have repaid. The cure is the same for all three: keep some place where the model's decision had no effect — a random slice that always gets a random decision, or a holdout group the model never acts on. Without it, all you measure is whether the model agrees with itself.

1 loopیک حلقه کافی است تا مدل خودش را تأیید کندone loop is enough for a model to confirm itself
holdoutنمونهٔ تصادفی، تنها راه دیدن دنیایی که رد کردیa random holdout is the only view of the world you skipped
2 kindsبازخورد از راه برچسب و از راه نمایشfeedback through labels and through exposure

حلقه چطور خودش را پنهان می‌کندHow the loop hides itself

بدترین ویژگی حلقهٔ بازخورد این است که شاخص‌ها را بهتر می‌کند. مدل روی داده‌ای آموزش می‌بیند که خودش ساخته، پس دقتش بالا می‌رود، داشبورد سبز می‌شود و تیم تشویق می‌شود. هیچ هشداری صدا نمی‌دهد، چون هیچ خطایی وجود ندارد؛ فقط دنیای بیرون کوچک شده. کشف این وضعیت معمولاً از بیرون می‌آید: شکایت مشتری، گزارش ناظر، یا کسی که می‌پرسد چرا برای این گروه هیچ تصمیمی نداریم. برای همین، بهترین کار این است که از روز اول یک گروه شاهد نگه داری و معیار واقعی را روی آن بسنجی، نه روی گروهی که مدل خودش انتخاب کرده.The worst property of a feedback loop is that it improves the metrics. The model trains on data it produced, its accuracy rises, the dashboard turns green and the team is congratulated. No alert fires, because there is no error — only a smaller outside world. Discovery usually comes from outside: a customer complaint, a regulator's report, or someone asking why we never decide anything for this group. So keep a holdout from day one and measure the real metric there, not on the group the model chose.

نگه داشتن گروه شاهد در محصولHolding a control group in a product

گروه شاهد در تئوری ساده است و در عمل گران: یعنی عمداً به بخشی از کاربران تصمیم بدتر بدهی تا بفهمی تصمیمت چقدر خوب است. برای همین معمولاً کوچک است و مستقیم با منافع محصول می‌جنگد. راه سازش، محدود کردن آن به مدت کوتاه و به بخش کوچکی از ترافیک است، با این شرط که از قبل بنویسی چه چیزی را می‌خواهی اندازه بگیری و کِی تمامش می‌کنی. گروهی که هیچ‌وقت بسته نمی‌شود به یک بن‌بست دائمی تبدیل می‌شود؛ گروهی که هرگز ساخته نمی‌شود یعنی هیچ‌وقت نمی‌فهمی مدل چه چیزی را ندیده.A control group is simple in theory and expensive in practice: you deliberately give some users a worse decision so you can learn how good the decision is. That is why it stays small and fights the product's interests directly. The compromise is to bound it in time and in traffic share, on the condition that you write down in advance what you intend to measure and when you will close it. A group that never closes becomes a permanent dead end; a group that is never created means you never learn what the model is not seeing.

تلهٔ رایجThe usual trap

سنجیدن مدل روی داده‌ای که خودش تولید کرده. عدد بالا می‌آید، جلسه راضی است، و سال بعد معلوم می‌شود مدل فقط یاد گرفته بود تصمیم‌های قبلی ما را تکرار کند؛ نه اینکه دنیا چه شکلی است.Evaluating a model on the data it produced itself. The number looks good, the meeting is happy, and a year later it turns out the model only learned to repeat our earlier decisions, not the shape of the world.

predictive analytics

تحلیل پیش‌بینانه فصل ۱۴Chapter 14 · دیدن در متنsee in context

از گذشته یاد می‌گیرد و آینده را می‌گوید. تا کجا؟It learns the past and claims the future. How far does that go?

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

رانندهٔ سرویس مدرسه می‌داند شنبه‌ها باید ده دقیقه زودتر راه بیفتد. او آینده را نمی‌بیند؛ چهل شنبهٔ قبلی را دیده. اگر یک شنبه خیابان اصلی بسته باشد، همان تجربه او را دیر می‌رساند. تحلیل پیش‌بینانه هم همین است: یک حدس خوب از روی گذشته، به شرطی که فردا شبیه گذشته باشد.The school-run driver knows to leave ten minutes earlier on Saturdays. He is not seeing the future; he is remembering forty previous Saturdays. One closed road on a Saturday and the same experience makes him late. Predictive analytics is that: a good guess from the past, on the condition that tomorrow looks like it.

تشبیه و تصویر ذهنیThe analogy

پیرمردی در بازار با نگاه به هندوانه می‌گوید شیرین است یا نه. یک قاعده در سر دارد که از هزار هندوانهٔ قبلی ساخته و در بیشتر موارد درست می‌گوید. سه چیز را باید بدانی. اول، او نمی‌داند چرا؛ قاعده‌اش قابل توضیح نیست و همین ارزیابی و اعتماد را سخت می‌کند. دوم، همیشه جایی اشتباه می‌کند و آن اشتباه ارزان نیست. سوم، اگر بازار هندوانهٔ رقم جدیدی بیاورد، قاعدهٔ قدیمی بی‌صدا خراب می‌شود و او همچنان با همان اطمینان حرف می‌زند. مدل هم دقیقاً همین سه ویژگی را دارد، با یک تفاوت: مدل خودش نمی‌فهمد که رقم عوض شده.An old man at the market picks up a melon, looks at it and says whether it is sweet. He carries a rule built from a thousand melons and he is right most of the time. Three things follow. He cannot explain why; the rule is not articulable, which makes it hard to evaluate and hard to trust. He is wrong sometimes, and being wrong is not cheap. And if the market starts selling a new variety, his rule quietly breaks while he keeps speaking with the same confidence. A model has all three properties, with one difference: it does not notice the variety changed.

دادهٔ گذشتهPast dataچیزی که ثبت شدwhat got loggedبرچسبLabelنتیجهٔ واقعیwhat really happenedآموزشTrainالگو را پیدا کنfind the patternامتیازScoreبرای مورد تازهfor a new caseتصمیمDecideکسی تصمیم می‌گیردa person acts on it
مدل تا آخر خط یک حدس است؛ تصمیمِ آخر را یک آدم یا یک قاعدهٔ مکتوب می‌گیرد.The model is a guess all the way down; the last step is a person or a written rule.

و بعدش، فنیAnd now, technically

تحلیل پیش‌بینانه با یادگیری نظارت‌شده کار می‌کند: از گذشته جفت‌های ورودی و نتیجه را می‌گیری، مدلی می‌سازی که امتیاز بدهد، و بعد آن امتیاز را به یک تصمیم وصل می‌کنی. چهار نکتهٔ عملی دارد که بیشتر خرابی‌ها از آن‌ها می‌آید. اول، زمان: باید روی دادهٔ بعد از تاریخ آموزش بسنجی، نه روی نمونه‌ای تصادفی از همان دوره؛ وگرنه مدل چیزهایی را «می‌داند» که در زمان پیش‌بینی نمی‌دانست. دوم، نشت برچسب: اگر یکی از ویژگی‌ها خودش از نتیجه ساخته شده باشد، مدل فوق‌العاده به نظر می‌رسد و در تولید بی‌فایده است. سوم، کالیبراسیون: امتیاز ۰٫۸ باید واقعاً به معنای هشتاد درصد باشد، وگرنه آستانه‌ها بی‌معنا می‌شوند. چهارم، جابه‌جایی: رفتار آدم‌ها و ترکیب جمعیت عوض می‌شود و مدل بی‌صدا کهنه می‌شود، پس هم ورودی‌ها را پایش کن و هم نرخ خطا را. و آخرین نکته: خروجی مدل یک عدد است، نه یک تصمیم؛ آستانه را کسی انتخاب می‌کند که هزینهٔ خطا را می‌داند.Predictive analytics runs on supervised learning: take pairs of input and outcome from the past, build a model that produces a score, then wire that score to a decision. Four practical points account for most failures. Time: test on data from after the training cut-off, not a random sample from the same period, or the model “knows” things it would not have known when predicting. Label leakage: if a feature is itself derived from the outcome, the model looks superb and is useless in production. Calibration: a score of 0.8 should mean eighty percent, or the thresholds mean nothing. Drift: behaviour and population mix change and the model ages silently, so monitor the inputs as well as the error rate. And the last point: the model outputs a number, not a decision; the threshold is chosen by whoever knows what an error costs.

pخروجی مدل یک احتمال است، نه یک تصمیمthe model outputs a probability, not a decision
t+1برچسب بعداً می‌رسد، پس آموزش همیشه عقب استlabels arrive later, so training always lags
0.5آستانه یک انتخاب است، نه بخشی از مدلthe threshold is a choice, not part of the model

مدل تصمیم نمی‌گیردThe model does not decide

در جلسه‌ها معمولاً می‌گویند «مدل تصمیم گرفت». مدل تصمیم نمی‌گیرد؛ یک امتیاز می‌دهد و یک آستانه آن امتیاز را به بله یا نه تبدیل می‌کند. آن آستانه را آدم انتخاب می‌کند و همان‌جاست که ارزش‌ها وارد می‌شوند: آستانهٔ پایین یعنی پذیرش بیشتر و خطای بیشتر، آستانهٔ بالا یعنی رد بیشتر و فرصت از دست رفته. اگر آستانه در کد پخش شده باشد و کسی نداند کجاست، عملاً تصمیم را کسی گرفته که آن خط را نوشته و هیچ‌وقت درباره‌اش فکر نکرده.In meetings people say “the model decided”. The model does not decide; it produces a score and a threshold turns that score into yes or no. A person picks the threshold, and that is where values enter: a low threshold means more acceptances and more errors, a high one means more rejections and more lost chances. If the threshold is scattered across the code and nobody knows where, the decision was effectively made by whoever wrote that line and never thought about it.

کهنه شدن مدل چطور دیده می‌شودSeeing a model go stale

مدل با گذشت زمان بدتر می‌شود، ولی هیچ خطایی پرتاب نمی‌کند. سه سیگنال را باید ببینی: توزیع ورودی‌ها (اگر یک ویژگی ناگهان مقدارهای زیادی بگیرد، احتمالاً چیزی در محصول عوض شده)، نرخ تصمیم مثبت (اگر از بیست درصد به دو درصد برسد، یا آستانه عوض شده یا دنیا)، و نرخ خطا روی برچسب‌های تازه که با تأخیر می‌رسد. هیچ‌کدام به‌تنهایی کافی نیست؛ با هم می‌گویند مدل هنوز همان چیزی را می‌بیند که آموزش دیده یا نه.A model gets worse over time without raising an error. Watch three signals: the input distribution (if a feature suddenly takes on new values, something in the product probably changed), the positive-decision rate (from twenty percent to two percent means either the threshold moved or the world did), and the error rate on fresh labels, which arrive late. None is enough alone; together they tell you whether the model still sees what it was trained on.

تلهٔ رایجThe usual trap

سنجیدن مدل روی داده‌ای که از همان دورهٔ آموزش است، یا با ویژگی‌ای که از خود برچسب ساخته شده. نتیجه عالی می‌شود، به تولید می‌رود، و اولین هفته معلوم می‌شود مدل چیزی را پیش‌بینی می‌کرد که در لحظهٔ تصمیم هنوز وجود نداشت.Evaluating on data from the training period, or with a feature derived from the label. The result looks excellent, it ships, and in the first week you learn the model was predicting something that did not yet exist at decision time.

کسی چیزی را ندیده، ولی همه‌چیز را می‌داند.Nobody looked, yet everything is known.

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

گوشی‌ات را روی میز کافه جا می‌گذاری و می‌روی. برمی‌گردی و صفحه روشن است: یک پیام روی آن است که باید فقط تو می‌دیدی. کسی هک نکرد و رمزی هم شکسته نشد؛ فقط صفحه روشن بود. حریم خصوصی هم بیشتر وقت‌ها همین است: نه دزدی، بلکه دیده‌شدنِ بی‌موقع.You leave your phone on the café table and walk away. You come back and the screen is lit: a message is showing that only you were meant to read. Nobody hacked anything, no password was broken; the screen was simply on. Privacy is mostly that: not theft, but being seen at the wrong moment.

تشبیه و تصویر ذهنیThe analogy

خانه‌ای را تصور کن که پرده ندارد. اگر رهگذری داخل را ببیند، تو مقصر نیستی؛ خانه مقصر است. حالا همان خانه را با پرده تصور کن: تو تصمیم می‌گیری کِی پرده را کنار بزنی و کِی نه. حریم خصوصی یعنی داشتن پرده و حق تصمیم درباره‌اش، نه نداشتن پنجره. و پرده یک لایه نیست: پردهٔ اتاق، درِ ورودی، و اینکه چه کسی کلید دارد سه چیز جدا هستند. در داده هم همین‌طور است: پوشاندن یک ستون یکی از سه لایه است، نه همهٔ کار.Picture a house with no curtains. If a passer-by sees inside, that is the house's fault, not yours. Now put curtains on it: you decide when to open them and when not. Privacy means having curtains and the right to decide about them, not having no windows. And a curtain is not one layer: the room curtain, the front door and who holds a key are three separate things. Data is the same: masking one column is one of three layers, not the whole job.

ناشناس · هیچ‌کس نمی‌داند کیAnonymous · nobody knows whoشبه‌ناشناس · با شناسهٔ بدلیPseudonymous · a stand-in idقابل‌شناسایی · با نام و کدIdentified · name and numberقابل‌پیوند · با چند دادهٔ دیگرLinkable · joined with other data
هر پله بالاتر، دادهٔ بیشتری از تو لو می‌دهد؛ پلهٔ آخر حتی به یک ستون حساس هم نیاز ندارد.Each rung up gives more away; the top one needs no sensitive column at all.

و بعدش، فنیAnd now, technically

حریم خصوصی با امنیت یکی نیست، هرچند هم‌پوشانی دارند. امنیت می‌گوید داده در برابر دسترسی غیرمجاز محفوظ است؛ حریم خصوصی می‌گوید اصلاً چه کسی باید چنین دسترسی‌ای داشته باشد و چه چیزی باید ذخیره شود. سه محور دارد: چه کسی می‌بیند (دسترسی)، چه چیزی می‌بیند (کمینه‌سازی و پوشاندن)، و چقدر می‌ماند (نگهداشت). فنون اصلی این‌ها هستند: ناشناس‌سازی و شبه‌ناشناس‌سازی، که با پیوند زدن به دادهٔ دیگر می‌شکنند؛ k-ناشناسی، که تضمین می‌کند هر رکورد حداقل شبیه k نفر دیگر باشد و با همگنی گروه و دانش زمینه‌ای می‌شکند؛ و حریم خصوصی تفاضلی، که به‌جای حذف جزئیات، به هر جواب نویز کنترل‌شده اضافه می‌کند تا وجود یک نفر در داده قابل تشخیص نباشد. هیچ‌کدام «حالت امن» نیستند؛ همه‌شان یک بودجهٔ ریسک هستند. و بیشتر نشت‌های واقعی از متادیتا می‌آیند: لاگ دسترسی، شناسهٔ دستگاه، امضای ایمیل و دفتر پشتیبانی، که کسی به‌عنوان دادهٔ شخصی نگاهشان نمی‌کند.Privacy is not security, though they overlap. Security says data is protected from unauthorised access; privacy asks who should have that access at all and what should be stored in the first place. It has three axes: who sees (access), what they see (minimization and masking), and how long it stays (retention). The main techniques: anonymisation and pseudonymisation, which break when joined with another data set; k-anonymity, which guarantees each record looks like at least k others and breaks under group homogeneity and background knowledge; and differential privacy, which adds controlled noise to answers instead of removing detail, so the presence of one person is not detectable. None of these is a safe state; all are a risk budget. And most real leaks come from metadata — access logs, device ids, email signatures and support tickets — that nobody classified as personal data.

1 linkدو دادهٔ بی‌خطر با هم خطرناک می‌شوندtwo harmless data sets become dangerous joined
εبودجهٔ حریم خصوصی؛ کمتر یعنی محافظت بیشتر و دقت کمترthe privacy budget: less means more protection, less accuracy
3 axesچه کسی می‌بیند، چه چیزی، چقدر می‌ماندwho sees, what is seen, how long it stays

چرا ناشناس‌سازی جواب نمی‌دهدWhy anonymisation does not settle it

حذف نام یک کار لازم است و کافی نیست. ترکیب کد پستی، تاریخ تولد و جنسیت خیلی وقت‌ها یک نفر را از میان جمعیت جدا می‌کند؛ و اگر آن رکورد به یک دادهٔ دیگر وصل شود، هویت برمی‌گردد. مشکل بنیادی این است که «ناشناس» یک وضعیت نیست که یک بار به دست بیاید؛ یک رابطه است با هر دادهٔ دیگری که در دنیا وجود دارد، امروز و فردا. برای همین، به‌جای پرسش «ناشناس شد یا نه؟»، باید بپرسی «اگر این داده با آن یکی جمع شود، چه کسی لو می‌رود؟» و بعد تصمیم بگیری که اصلاً منتشرش کنی یا نه.Dropping the name is necessary and not sufficient. Postcode, birth date and sex often single a person out of a population, and if that record joins to another data set the identity comes back. The deeper problem is that “anonymous” is not a state you reach once; it is a relation to every other data set in the world, today and next year. So instead of asking “is it anonymous?”, ask “if this joins with that, who is exposed?” — and then decide whether to release it at all.

حریم خصوصی را در طراحی کجا بگذاریWhere privacy belongs in the design

سه تصمیم که اگر روز اول گرفته شوند ارزان‌اند و بعداً گران: اول، جداسازی هویت از رفتار، یعنی یک شناسهٔ بدلی برای تحلیل و یک نگاشت جداگانه با دسترسی باریک. دوم، پیش‌فرض، یعنی وقتی کسی تصمیم نمی‌گیرد، داده کمتر جمع شود و کمتر دیده شود؛ نه برعکس. سوم، ثبت دسترسی، یعنی هر بار که کسی به دادهٔ حساس نگاه می‌کند یک ردیف بماند. هیچ‌کدام جادو نیست، ولی مجموعشان تفاوت میان سیستمی است که می‌توانی درباره‌اش توضیح بدهی و سیستمی که هر بار باید بگویی «فکر نمی‌کنم کسی نگاه کرده باشد».Three decisions that are cheap on day one and expensive later. Separate identity from behaviour: a pseudonym for analysis and a separate mapping behind narrow access. Make the default the quieter option, so when nobody decides, less data is collected and less is visible — not more. And log access, so every look at sensitive data leaves a row. None of it is magic, but together they separate a system you can explain from one where the answer is always “I don't think anyone looked”.

تلهٔ رایجThe usual trap

ناشناس کردن با حذف نام و نگه داشتن بقیه. کد پستی، تاریخ تولد، نوع گوشی و ساعتی که آنلاین می‌شوی، با هم یک نفر را مشخص می‌کنند؛ بعد یک فایل «ناشناس» منتشر می‌شود و کسی فکر می‌کند کار تمام است.Anonymising by deleting the name and keeping everything else. Postcode, birth date, phone model and the hour you come online together identify one person; then an “anonymous” file ships and everyone assumes the job is done.

right to be forgotten

حق فراموش‌شدن فصل ۱۴Chapter 14 · دیدن در متنsee in context

پیام را پاک کردی. اسکرین‌شات چه؟You deleted the message. What about the screenshot?

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

در گروه خانوادگی پیامی فرستادی و پشیمان شدی. دکمهٔ حذف را می‌زنی و پیام از گوشی خودت می‌رود. فردا می‌فهمی خواهرت اسکرین‌شات گرفته و برای بقیه فرستاده. حذف از جایی که نوشتی، یعنی حذف از همه‌جا نیست؛ حق فراموش‌شدن هم با همین واقعیت دست‌وپنجه نرم می‌کند.You send a message to the family group and regret it. You hit delete and it leaves your phone. The next day you learn your sister took a screenshot and forwarded it. Deleting where you wrote it is not deleting everywhere, and the right to be forgotten wrestles with exactly that.

تشبیه و تصویر ذهنیThe analogy

دفترچهٔ تلفن قدیمی را تصور کن که کسی یک اسم را با خودکار خط زده. خط زدن چیزی را پاک نمی‌کند؛ فقط می‌گوید دیگر لازم نیست. حالا تصور کن همان دفترچه در سه جا کپی شده و یکی از کپی‌ها در انبار است. حذف واقعی یعنی پیدا کردن همهٔ کپی‌ها و خط زدن در همه، و این کار آن‌قدر گران است که بیشتر سیستم‌ها به‌جای پاک کردن، «پاک‌شده» علامت می‌زنند و در خواندن نادیده می‌گیرند. تفاوت این دو را کاربر نمی‌بیند، ولی مهندس باید بداند کدام را انجام داده.Picture an old address book where someone has crossed out a name in pen. Crossing out does not erase anything; it only says the entry is no longer needed. Now imagine that book was copied three times and one copy sits in a warehouse. Real deletion means finding every copy and crossing out in all of them, and that is expensive enough that most systems mark a row “deleted” and ignore it on read instead. The user cannot see the difference; the engineer must know which one they did.

درخواستRequestهویت را بسنجverify identityپیدا کردنFindهمهٔ نسخه‌هاevery copyحذفEraseیا پوشاندنor maskتأییدConfirmبا مدرکwith proof
حذف یک کار تکی نیست؛ یک جست‌وجو در همهٔ جاهایی است که داده در آن نشسته.Erasure is not one action; it is a search across every place the data sat down.

و بعدش، فنیAnd now, technically

درخواست حذف در یک سیستم واقعی به چند جا می‌رسد: جدول اصلی، replicaها، کش، ایندکس جست‌وجو، انبار تحلیل، دریاچهٔ داده، جدول ویژگی مدل، صف رویداد، لاگ‌ها و در نهایت پشتیبان‌ها. هر کدام یک روش دارد. در ذخیره‌سازی فقط-افزودنی، حذف یعنی نوشتن یک نشانهٔ حذف و بعد اجرای فشرده‌سازی که آن را واقعاً بردارد؛ تا وقتی فشرده‌سازی اجرا نشده، داده هست و باید در خواندن نادیده گرفته شود. در ذخیره‌سازی تغییرناپذیر، راه دور انداختن کلید رمزگذاری است تا داده بی‌مصرف شود. پشتیبان‌ها جای دیگری هستند: نمی‌توانی از پشتیبان سال گذشته رکوردی را بیرون بکشی، پس یک دفتر حذف نگه می‌داری و هر بازیابی را از روی آن دوباره پاک می‌کنی. بدون این دفتر، بازیابی پشتیبان دادهٔ «حذف‌شده» را برمی‌گرداند و کسی متوجه نمی‌شود.An erasure request reaches several places in a real system: the primary table, replicas, caches, the search index, the warehouse, the data lake, the model's feature table, the event stream, the logs and finally the backups. Each has its own method. In append-only storage, erasure means writing a tombstone and later compacting it away; until compaction runs the data is still there and must be skipped on read. In immutable storage the route is to discard the encryption key so the bytes become noise. Backups are separate: you cannot pull one record out of last year's backup, so you keep a deletion ledger and re-apply it on every restore. Without that ledger, a restore brings the “deleted” record back and nobody notices.

1 ledgerفهرست حذف باید بماند تا هر بازیابی دوباره پاک شودthe deletion ledger must outlive every restore
N storesدرخواست باید به همهٔ نسخه‌ها برسد، نه فقط جدول اصلیone request must reach every store, not just the primary

پشتیبان‌ها مشکل را حل نمی‌کنند، جابه‌جا می‌کنندBackups move the problem, they do not solve it

راحت‌ترین جواب این است که بگویی «در پشتیبان‌ها هست، ولی کسی به آن‌ها نگاه نمی‌کند». این جواب در بازرسی نمی‌ایستد و در عمل هم درست نیست، چون پشتیبان برای همان روزی نگه داشته می‌شود که مجبور شوی از آن استفاده کنی؛ و در آن روز، دادهٔ حذف‌شده برمی‌گردد. راه عملی سه بخش دارد: دفتر حذف با شناسه، بازپخش خودکار آن روی هر بازیابی، و آزمونی که یک بازیابی واقعی را روی محیط تست انجام بدهد و بررسی کند که رکورد حذف‌شده برنگشته. آزمون بدون بازیابی واقعی، آزمون نیست.The easy answer is “it is in the backups, but nobody looks at them”. That answer does not survive an audit and is not true in practice, because backups are kept for the day you are forced to restore — and on that day the deleted record comes back. The workable route has three parts: a deletion ledger keyed by identifier, automatic replay of it on every restore, and a test that performs a real restore in a test environment and checks that the record did not return. A test without a real restore is not a test.

حذف، یا پوشاندن؟Erase, or mask?

همه‌جا حذف فیزیکی ممکن نیست. اگر رکورد کلید خارجی دارد و حذفش گزارش‌های مالی را می‌شکند، پوشاندن درست‌تر است: فیلدهای شناسایی پاک یا جایگزین شوند و رکورد به‌عنوان یک ردیف بی‌نام بماند. همین برای جدول ویژگی مدل هم صادق است؛ اگر ویژگی‌ها را حذف کنی، مدل باید از نو آموزش ببیند. مهم این است که انتخاب بین حذف و پوشاندن را مکتوب کنی و در تأیید درخواست به کاربر بگویی کدام را انجام داده‌ای؛ تفاوت این دو برای او مهم است، حتی اگر برای تو یکی به نظر برسد.Physical deletion is not always possible. If a row is referenced by a foreign key and removing it would break financial reports, masking is the better answer: scrub or replace the identifying fields and leave the row as an unnamed record. The model's feature table is the same; drop the features and the model has to be retrained. What matters is writing down which of the two you did, and telling the person in your confirmation — the difference matters to them even when it looks the same to you.

تلهٔ رایجThe usual trap

گشتن در جدول اصلی و گفتن «حذف شد». کش تا چند ساعت بعد همان رکورد را برمی‌گرداند، ایندکس جست‌وجو تا بازسازی بعدی، و پشتیبان تا ابد. اولین باری که کسی از آن مسیر دیگر نگاه کند، داده سر جایش است.Cleaning the primary table and reporting “deleted”. The cache still serves that record for hours, the search index until the next rebuild, and the backup forever. The first time anyone looks through another path, the data is right there.

دوربین را می‌بینی. آن یکی را نه.You can see the camera. Not the other one.

مثال روزمره، بدون اصطلاحThe everyday one, no jargon

در ساختمان، نگهبان دفتری دارد و اسم هر مهمان را می‌نویسد. می‌دانی که نوشته، می‌توانی ببینی‌اش، و آخر ماه پاک می‌شود. حالا همان ساختمان را تصور کن که از تلفن هر رهگذر، بی‌آنکه بگوید، ردّی برمی‌دارد و جایی نگه می‌دارد که هیچ‌کس نمی‌بیند. کار یکی است؛ تفاوت در دانستن است.The guard in your building keeps a notebook and writes down every visitor's name. You know he wrote it, you can read it, and it is cleared at the end of the month. Now imagine the same building taking a trace from every passer-by's phone, without saying so, and keeping it where nobody can look. Same act; the difference is knowing.

تشبیه و تصویر ذهنیThe analogy

فرق این دو در مقدار داده نیست، در سه چیز است: می‌دانی یا نه، می‌توانی ببینی یا نه، و می‌توانی جلویش را بگیری یا نه. دفتر نگهبان یک صفحه در روز است و تو می‌توانی بخواهی نشانت بدهد. سیستمی که هر کلیک را ثبت می‌کند همان دفتر است با دو تفاوت: صفحه‌اش تمام نمی‌شود و هیچ‌وقت نمی‌بینی‌اش. و بدترین بخش، پیوند است: دفتر نگهبان فقط می‌گوید کی آمد؛ سیستم دیگر می‌گوید کی آمد، با که آمد، چقدر ماند و چه خرید. هیچ‌کدام از این رکوردها به‌تنهایی حساس نیست؛ با هم یک پروفایل است.The difference between the two is not volume but three things: whether you know, whether you can look, and whether you can stop it. The guard's notebook is one page a day and you can ask to see it. A system that logs every click is the same notebook with two changes: the pages never run out and you never get to look. The worst part is the join: the notebook only says who came in; the system says who came, with whom, how long they stayed and what they bought. No single record is sensitive; together they are a profile.

نظارت آشکارVisible watchingدفتر روی میزthe ledger on the deskمی‌توانی ببینیyou can read itیک صفحه در روزone page a dayجمع‌آوری خاموشSilent collectionبدون اطلاع توwithout your knowingنمی‌توانی ببینیyou cannot see itهمه‌چیز، برای همیشهeverything, forever
تفاوت در فناوری نیست؛ در این است که چه کسی می‌داند و چه کسی می‌تواند ببیند.The difference is not the technology; it is who knows and who can look.

و بعدش، فنیAnd now, technically

نظارت با سه ویژگی شناخته می‌شود: منظم است (نه اتفاقی)، ماندگار است (نه لحظه‌ای)، و نامتقارن است (جمع‌کننده می‌بیند، موضوع نمی‌بیند). منابعش چیزهای عادی‌اند: لاگ سرور، شناسهٔ دستگاه، کوکی، موقعیت مکانی، تاریخچهٔ خرید و متادیتای تماس. مسئله این است که هیچ‌کدام به‌تنهایی تصمیمی دربارهٔ کسی نمی‌گیرد؛ قدرت از جمع شدنشان می‌آید. همین باعث می‌شود که نتوانی با «داده را نمی‌فروشیم» از موضوع فرار کنی، چون جمع‌آوری و نگهداری خودش کار می‌کند. پاسخ‌های مهندسی محدودند ولی واقعی: نگهداشت کوتاه و خودکار، جمع کردن در سطح گروه به‌جای فرد، آستانه برای گزارش‌هایی که گروه‌های کوچک را نشان می‌دهند، حریم خصوصی تفاضلی، ثبت دسترسی به دادهٔ حساس، و شفافیت در اینکه چه چیزی جمع می‌شود. مهم‌تر از همه، یک مالک: در بیشتر سیستم‌ها هیچ‌کس مالک این نیست که چه چیزی جمع می‌شود؛ فقط مالک ذخیره‌سازی‌اش پیدا می‌شود.Surveillance is recognised by three properties: it is systematic rather than incidental, persistent rather than momentary, and asymmetric — the collector sees, the subject does not. Its sources are ordinary things: server logs, device identifiers, cookies, location, purchase history and call metadata. None of them alone makes a decision about anyone; the power comes from combining them. That is why “we do not sell data” is no escape, since collection and retention do the work by themselves. The engineering responses are limited but real: short automatic retention, aggregation at the group level instead of the individual, a minimum group size for any report, differential privacy, access logging, and transparency about what is collected. Above all, an owner: in most systems nobody owns what gets collected — only what gets stored.

1 profileرکوردهای بی‌خطر با هم یک پروفایل می‌سازندharmless records together make a profile
∞نگهداشت بی‌پایان، تفاوت اصلی با دفتر نگهبانendless retention is the real difference from the guard's ledger

چرا جمع‌آوری حالت پیش‌فرض استWhy collection is the default

هیچ‌کس تصمیم نمی‌گیرد که همه‌چیز را جمع کند؛ سیستم‌ها این‌طور ساخته می‌شوند. لاگ برای دیباگ لازم است، شناسهٔ دستگاه برای احراز هویت، تاریخچهٔ خرید برای پشتیبانی. هر کدام یک دلیل خوب دارد و هیچ‌کدام هیچ‌وقت بازبینی نمی‌شود. بعد از دو سال مجموعه‌ای داری که هیچ‌کس نمی‌تواند توضیح بدهد چرا این شکل است، و همان مجموعه می‌شود ورودی هر تحلیل و هر خریدار داده. راه بستنش یک تصمیم سازمانی است، نه یک کتابخانه: برای هر نوع داده یک مالک و یک تاریخ بازبینی بگذار، و هر چیزی که بعد از بازبینی دلیلش را ننوشت، پاک شود.Nobody decides to collect everything; systems are built that way. Logs are needed for debugging, device ids for authentication, purchase history for support. Each has a good reason at the time and none is ever revisited. Two years later you hold a collection nobody can explain, and that collection feeds every analysis and every data buyer. Closing it is an organisational decision, not a library: give each kind of data an owner and a review date, and delete whatever fails to justify itself at review.

سکوت، رضایت نیستSilence is not consent

مردم معمولاً با نظارت کنار می‌آیند، و کنار آمدن با رضایت دادن یکی نیست. کسی که از دوربین ساختمان خوشش نمی‌آید ولی چیزی نمی‌گوید، رضایت نداده؛ فقط هزینهٔ اعتراضش از فایده‌اش بیشتر بوده. این تفاوت برای مهندس مهم است، چون طراحی بر اساس «کسی شکایت نکرد» یعنی طراحی برای وضعیتی که هنوز کسی متوجه نشده. اگر روزی متوجه شوند، همان چیزی که بی‌ضرر به نظر می‌رسید به یک بحران تبدیل می‌شود و پاسخ «قبلاً هم بود» هیچ کمکی نمی‌کند.People usually put up with surveillance, and putting up with it is not consent. Someone who dislikes the camera in the lobby but says nothing has not agreed; they have merely decided that objecting costs more than it gains. That distinction matters to engineers, because designing on “nobody complained” means designing for a state where nobody has noticed yet. The day they notice, what looked harmless becomes a crisis, and “it was always like that” helps nobody.

تلهٔ رایجThe usual trap

جواب دادن با «ما داده را نمی‌فروشیم». بیشترین استفاده از دادهٔ شخصی در همان شرکتی است که آن را نمی‌فروشد: تبلیغ هدفمند، امتیازدهی، مدل ریسک و قیمت‌گذاری شخصی. فروش، فقط یکی از راه‌های استفاده است و اتفاقاً کم‌خطرترینشان.Answering with “we do not sell data”. Most use of personal data happens inside companies that never sell it: targeted ads, scoring, risk models, personalised pricing. Selling is only one way to use it, and usually the least consequential.