با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
در بخش قبل، مدل پذیرش خود را برای عدالت با استفاده از برابری جمعیتی، با مقایسه نرخ پذیرش کلی برای هر دو گروه جمعیتی ارزیابی کردیم.
از طرف دیگر، میتوانیم نرخهای پذیرش را فقط برای داوطلبان واجد شرایط در گروه اکثریت و گروه اقلیت مقایسه کنیم. اگر نرخ پذیرش برای دانشجویان واجد شرایط در هر دو گروه برابر باشد، مدل برابری فرصت را نشان میدهد: دانشجویان با برچسب ترجیحی ما ("واجد شرایط برای پذیرش") بدون در نظر گرفتن اینکه به کدام گروه جمعیتی تعلق دارند، شانس یکسانی برای پذیرش دارند.
بیایید به مجموعه نامزدهای خود در بخش قبل نگاه کنیم:
گروه اکثریت
گروه اقلیت
واجد شرایط
35
15
فاقد صلاحیت
45
5
فرض کنید مدل پذیرش 14 نامزد از گروه اکثریت و 6 نامزد از گروه اقلیت را می پذیرد. تصمیمات این مدل برابری فرصت ها را برآورده می کند، زیرا نرخ پذیرش برای اکثریت واجد شرایط و کاندیداهای اقلیت واجد شرایط 40٪ است.
شکل 4. تفکیک کاندیداهای رد شده و پذیرفته شده، با تمام دانش آموزان واجد شرایط در هر دو گروه اکثریت و اقلیت که با رنگ سبز سایه زده اند. از 35 دانشجوی گروه اکثریت واجد شرایط، 14 نفر پذیرفته شدند. از 15 دانش آموز واجد شرایط گروه اقلیت، 6 نفر پذیرفته شدند. بنابراین هر دو گروه دارای نرخ پذیرش 40٪ برای دانش آموزان واجد شرایط هستند.
جدول زیر اعداد حامی کاندیداهای رد شده و پذیرفته شده را در شکل 4 نشان می دهد.
گروه اکثریت
گروه اقلیت
پذیرفته شد
رد شد
پذیرفته شد
رد شد
واجد شرایط
14
21
6
9
فاقد صلاحیت
0
45
0
5
مزایا و معایب
مزیت اصلی برابری فرصت این است که به نسبت پیشبینیهای مثبت به منفی مدل اجازه میدهد تا در گروههای جمعیتی متفاوت باشد، مشروط بر اینکه مدل به همان اندازه در پیشبینی برچسب ترجیحی ("واجد شرایط برای پذیرش") برای هر دو گروه موفق باشد.
پیشبینیهای مدل در شکل 4 برابری جمعیتی را برآورده نمیکند ، زیرا یک دانشآموز در گروه اکثریت 17.5 درصد شانس پذیرش و یک دانشآموز در گروه اقلیت 30 درصد شانس پذیرش دارد. با این حال، یک دانش آموز واجد شرایط 40٪ شانس پذیرش دارد، صرف نظر از اینکه به کدام گروه تعلق دارد، که مسلماً نتیجه ای است که در این مورد استفاده از مدل خاص منصفانه تر است.
یکی از اشکالات برابری فرصت این است که برای موارد استفاده طراحی شده است که در آن یک برچسب ترجیحی واضح وجود دارد. اگر به همان اندازه مهم است که مدل هم کلاس مثبت ("واجد شرایط برای پذیرش") و هم کلاس منفی ("واجد شرایط برای پذیرش") را برای همه گروه های جمعیتی پیش بینی کند، ممکن است منطقی باشد که در عوض از شانس مساوی متریک استفاده شود، که برابر را اعمال می کند. نرخ موفقیت برای هر دو برچسب
یکی دیگر از اشکالات برابری فرصت این است که انصاف را با مقایسه میزان خطا در مجموع برای گروه های جمعیتی ارزیابی می کند، که ممکن است همیشه امکان پذیر نباشد. به عنوان مثال، اگر مجموعه داده مدل پذیرش ما ویژگی demographic_group را نداشته باشد، نمیتوان نرخ پذیرش را برای اکثریت و اقلیت نامزدهای واجد شرایط تشخیص داد و آنها را با هم مقایسه کرد تا ببینیم آیا برابری فرصتها برآورده شده است یا خیر.
در بخش بعدی، یک معیار انصاف دیگر را بررسی خواهیم کرد، انصاف خلاف واقع، که میتواند در سناریوهایی که دادههای جمعیتی برای همه نمونهها وجود ندارد، استفاده شود.
تمرین: درک خود را بررسی کنید
درست یا نادرست: برای یک مدل طبقهبندی باینری غیرممکن است که برابری جمعیتی و برابری فرصتها را در مجموعهای از پیشبینیها برآورده کند.
درست است
ممکن است پیشبینیهای یک مدل هم برابری جمعیتی و هم برابری فرصتها را برآورده کند. ببینید آیا میتوانید سناریویی را در نظر بگیرید که در آن هر دو معیار برآورده میشوند، و سپس برای مشاهده توضیحات ما، پاسخ دیگری را در زیر انتخاب کنید.
نادرست
ممکن است پیشبینیهای یک مدل هم برابری جمعیتی و هم برابری فرصتها را برآورده کند.
برای مثال، فرض کنید یک طبقهبندیکننده باینری (که برچسب ترجیحی آن کلاس مثبت است) بر روی 100 مثال ارزیابی میشود، که نتایج آن در ماتریسهای سردرگمی زیر نشان داده شده است که بر اساس گروه جمعیتی (اکثریت و اقلیت) تقسیمبندی شدهاند:
هر دو گروه اکثریت و اقلیت دارای نرخ پیشبینی مثبت 25٪، برابری جمعیتی رضایت بخش، و نرخ مثبت واقعی (درصد نمونههایی با برچسب ترجیحی که به درستی طبقهبندی شدهاند) 33٪، رضایتبخش برابری فرصتها هستند.
تاریخ آخرین بهروزرسانی 2024-10-31 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-31 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eEquality of opportunity in machine learning focuses on ensuring that qualified individuals have an equal chance of being accepted, regardless of their demographic group.\u003c/p\u003e\n"],["\u003cp\u003eIt's achieved when the acceptance rates for qualified individuals are the same across different demographic groups, as illustrated by the example with a 40% acceptance rate for qualified candidates in both the majority and minority groups.\u003c/p\u003e\n"],["\u003cp\u003eWhile it promotes fairness in specific scenarios, equality of opportunity has limitations, such as its dependence on a clear preferred label and potential challenges in situations lacking demographic data.\u003c/p\u003e\n"],["\u003cp\u003eUnlike demographic parity which focuses on overall acceptance rates, equality of opportunity concentrates on the acceptance rates within the qualified subset of each group.\u003c/p\u003e\n"],["\u003cp\u003eIt's possible for a model to satisfy both demographic parity and equality of opportunity simultaneously, under specific conditions where positive prediction rates and true positive rates are balanced across groups.\u003c/p\u003e\n"]]],[],null,["# Fairness: Equality of opportunity\n\nIn the previous section, we evaluated our admissions model for fairness using\ndemographic parity, by comparing the overall acceptance rates for both\ndemographic groups.\n\nAlternatively, we could compare the acceptance rates for just the qualified\ncandidates in the majority group and the minority group. If the acceptance rates\nfor qualified students in both groups are equal, the model exhibits\n[**equality of opportunity**](/machine-learning/glossary#equality_of_opportunity):\nstudents with our preferred label (\"qualified for admission\") have an equal\nchance of being admitted, irrespective of which demographic group they belong\nto.\n\nLet's revisit our candidate pool from the previous section:\n\n| | Majority group | Minority group |\n|-----------------|----------------|----------------|\n| **Qualified** | 35 | 15 |\n| **Unqualified** | 45 | 5 |\n\nSuppose the admissions model accepts 14 candidates from the majority group\nand 6 candidates from the minority group. The model's decisions satisfy\nequality of opportunity, as the acceptance rate for both qualified majority\nand qualified minority candidates is 40%.\n**Figure 4.** Breakdown of Rejected and Accepted candidates, with all qualified students in both the majority and minority groups shaded in green. Of the 35 qualified majority-group students, 14 were accepted. Of the 15 qualified minority-group students, 6 were accepted. Both groups thus have an acceptance rate of 40% for qualified students.\n\nThe following table quantifies the numbers supporting the rejected and accepted\ncandidates in Figure 4.\n\n| | Majority group || Minority group ||\n| | Accepted | Rejected | Accepted | Rejected |\n|-----------------|----------|----------|----------|----------|\n| **Qualified** | 14 | 21 | 6 | 9 |\n| **Unqualified** | 0 | 45 | 0 | 5 |\n\nBenefits and Drawbacks\n----------------------\n\nThe key benefit of equality of opportunity is that it allows the model's\nratio of positive to negative predictions to vary across demographic groups,\nprovided that the model is equally successful at predicting the preferred label\n(\"qualified for admission\") for both groups.\n\nThe model predictions in Figure 4 *do not* satisfy demographic parity,\nas a student in the majority group has a 17.5% chance of being accepted, and\na student in the minority group has a 30% chance of being accepted. However,\na qualified student has a 40% chance of being accepted, irrespective of which\ngroup they belong to, which is arguably an outcome that is more fair in this\nparticular model use case.\n\nOne drawback of equality of opportunity is that it is designed for use\ncases where there is a clear-cut preferred label. If it's equally important\nthat the model predict both the positive class (\"qualified for admission\")\nand negative class (\"not qualified for admission\") for all demographic groups,\nit may make sense to instead use the metric\n[**equalized odds**](/machine-learning/glossary#equalized-odds), which enforces\nequal success rates for both labels.\n\nAnother drawback of equality of opportunity is that it assesses fairness\nby comparing error rates in aggregate for demographic groups, which may\nnot always be feasible. For example, if our admissions model's dataset\ndid not have a feature of `demographic_group`, it would not be possible to\nbreak out acceptance rates for qualified majority and minority candidates\nand compare them to see if equality of opportunity is satisfied.\n\nIn the next section, we'll look at another fairness metric, counterfactual\nfairness, that can be employed in scenarios where demographic data doesn't\nexist for all examples.\n\nExercise: Check your understanding\n----------------------------------\n\nTrue or False: It is impossible for a binary classification model to satisfy both demographic parity and equality of opportunity on the same set of predictions. \nTrue \nIt's possible for a model's predictions to satisfy both demographic parity and equality of opportunity. See if you can think of a scenario where both metrics are satisfied, and then choose the other answer choice below to see our explanation. \nFalse \nIt's possible for a model's predictions to satisfy both demographic\nparity and equality of opportunity.\n\nFor example, let's say a binary classifier (whose preferred label\nis the positive class) is evaluated on 100 examples, with results\nshown in the following confusion matrices, broken out by\ndemographic group (majority and minority):\n\n| | Majority group || Minority group ||\n| | Predicted positive | Predicted negative | Predicted positive | Predicted negative |\n|---------------------|--------------------|--------------------|--------------------|--------------------|\n| **Actual positive** | 6 | 12 | 3 | 6 |\n| **Actual negative** | 10 | 36 | 6 | 21 |\n| | \\\\(\\\\text{Positive Rate} = \\\\frac{6+10}{6+10+12+36} = \\\\frac{16}{64} = \\\\text{25%}\\\\) \\\\(\\\\text{True Positive Rate} = \\\\frac{6}{6+12} = \\\\frac{6}{18} = \\\\text{33%}\\\\) || \\\\(\\\\text{Positive Rate} = \\\\frac{3+6}{3+6+6+21} = \\\\frac{9}{36} = \\\\text{25%}\\\\) \\\\(\\\\text{True Positive Rate} = \\\\frac{3}{3+6} = \\\\frac{3}{9} = \\\\text{33%}\\\\) ||\n\nBoth majority and minority groups have a positive prediction rate\nof 25%, satisfying demographic parity, and a true positive rate\n(percentage of examples with the preferred label that are\ncorrectly classified) of 33%, satisfying equality of opportunity.\n| **Key terms:**\n|\n| - [Bias (ethics/fairness)](/machine-learning/glossary#bias-ethicsfairness)\n| - [Equality of opportunity](/machine-learning/glossary#equality_of_opportunity)\n- [Equalized odds](/machine-learning/glossary#equalized-odds) \n[Help Center](https://support.google.com/machinelearningeducation)"]]