تنظيم صفحاتك في مجموعات يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
في القسم السابق، قمنا بتقييم نموذج القبول لدينا من أجل الإنصاف باستخدام التكافؤ الديموغرافي، من خلال مقارنة معدلات القبول الإجمالية لكليهما المجموعات الديموغرافية.
وبدلاً من ذلك، يمكننا مقارنة معدلات القبول للمؤهلين فقط المرشحين في مجموعة الأغلبية والأقلية. إذا كانت معدلات القبول للطلاب المؤهلين في كلتا المجموعتين متساويتين، ويعرض النموذج تكافؤ الفرص: للطلاب الذين يحملون التصنيف المفضل لدينا ("المؤهلون للالتحاق") لديهم قيم متساوية فرصة الانضمام، بغض النظر عن المجموعة الديموغرافية التي ينتمي إليها إليه.
دعنا نعيد النظر في مجموعة المرشحين من القسم السابق:
المجموعة الأغلبية
مجموعة الأقلية
مؤهَّل
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-08-13 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2024-08-13 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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,["In 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\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 \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)"]]