ภาพรวม
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
MinDiff เป็นเทคนิคการแก้ไขแบบจำลองที่พยายามทำให้การแจกแจงทั้งสองเท่ากัน ในทางปฏิบัติ สามารถใช้เพื่อสร้างสมดุลระหว่างอัตราข้อผิดพลาดในส่วนต่างๆ ของข้อมูลของคุณ โดยการลงโทษความแตกต่างในการแจกแจง
โดยทั่วไป คุณจะใช้ MinDiff เมื่อพยายามรับประกันความยุติธรรมของกลุ่ม เช่น การลดความแตกต่างในอัตราบวกลวง (FPR) หรืออัตราลบลวง (FNR) ระหว่างส่วนของข้อมูลที่เป็นของคลาสที่ละเอียดอ่อนและส่วนแบ่งที่มีประสิทธิภาพดีกว่า สำหรับการอภิปรายเชิงลึกเกี่ยวกับตัวชี้วัดความเป็นธรรม โปรดทบทวนวรรณกรรมในหัวข้อนี้ 1 2 3
MinDiff ทำงานอย่างไร?
จากตัวอย่างสองชุดจากชุดข้อมูลของเรา MinDiff จะลงโทษโมเดลระหว่างการฝึกอบรมสำหรับความแตกต่างในการกระจายคะแนนระหว่างสองชุด ยิ่งทั้งสองชุดมีความแตกต่างได้น้อยกว่าจะขึ้นอยู่กับคะแนนการทำนาย บทลงโทษที่จะนำมาใช้ก็จะยิ่งน้อยลงเท่านั้น
การปรับโทษจะใช้โดยการเพิ่มส่วนประกอบให้กับการสูญเสียที่แบบจำลองใช้สำหรับการฝึก ถือได้ว่าเป็นการวัดความแตกต่างในการกระจายตัวของการทำนายแบบจำลอง ในขณะที่โมเดลรถไฟจะพยายามลดการลงโทษโดยนำการแจกแจงมาใกล้กันมากขึ้น ดังที่แสดงในกราฟด้านล่าง

การใช้ MinDiff อาจมาพร้อมกับข้อดีข้อเสียในแง่ของประสิทธิภาพในงานเดิม MinDiff สามารถมีประสิทธิผลในขณะที่ไม่ทำให้ประสิทธิภาพลดลงเกินความต้องการของผลิตภัณฑ์ แต่การตัดสินใจสร้างสมดุลระหว่างประสิทธิภาพและประสิทธิผลของ MinDiff ควรกระทำโดยเจตนาโดยเจ้าของผลิตภัณฑ์ สำหรับตัวอย่างที่แสดงวิธีนำ MinDiff ไปใช้ โปรดดู สมุดบันทึกกรณีศึกษาการแก้ไขแบบจำลอง
ทรัพยากร
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# Overview\n\n\u003cbr /\u003e\n\nMinDiff is a model remediation technique that seeks to equalize two distributions.\nIn practice, it can be used to balance error rates across different slices of\nyour data by penalizing distributional differences.\n\nTypically, you apply MinDiff when trying to ensure group fairness, such as\nminimizing the difference in either\nfalse positive rate (FPR) or false negative rate (FNR) between a slice of data\nbelonging to a sensitive class and a better-performing slice. For in-depth\ndiscussion of fairness metrics, review the literature on this subject.^[1](#fn1)^^[2](#fn2)^^[3](#fn3)^\n\nHow does MinDiff work?\n----------------------\n\nGiven two sets of examples from our dataset, MinDiff penalizes the model during\ntraining for differences in the distribution of scores between the two sets.\nThe less distinguishable the two sets are based on prediction scores, the\nsmaller the penalty that will be applied.\n\nThe penalty is applied by adding a component to the loss that the model is using\nfor training. It can be thought of as a measurement of the difference in\ndistribution of model predictions. As the model trains, it tries to minimize\nthe penalty by bringing the distributions closer together, as shown in the\ngraphs below.\n\nApplying MinDiff may come with tradeoffs with respect to performance on the original\ntask. MinDiff can be effective while not deteriorating\nperformance beyond product needs, but the decision to balance between performance\nand effectiveness of MinDiff\nshould be made deliberately by the product owner. For examples showing how to implement\nMinDiff, see [the model remediation case study notebook](/responsible_ai/model_remediation/min_diff/tutorials/min_diff_keras).\n\nResources\n---------\n\n- For a tutorial on applying MinDiff on a text classification model, see\n [MinDiff Keras notebook](/responsible_ai/model_remediation/min_diff/tutorials/min_diff_keras).\n\n- For a blog post on MinDiff on the TensorFlow blog, see\n [Applying MinDiff to improve model blog post](https://blog.tensorflow.org/2020/11/applying-mindiff-to-improve-model.html).\n\n- For the full Model Remediation library, see the\n [model-remediation Github repo](https://github.com/tensorflow/model-remediation).\n\n*** ** * ** ***\n\n1. Dwork, C., Hardt, M., Pitassi, T., Reingold, O., Zemel, R. (2011).\n [Fairness Through Awareness.](https://arxiv.org/abs/1104.3913) [↩](#fnref1)\n\n2. Hardt, M., Price, E., Srebro, N. (2016). [Equality of Opportunity in Supervised Learning.](https://arxiv.org/abs/1610.02413) [↩](#fnref2)\n\n3. Chouldechova, A. (2016). [Fair prediction with disparate impact: A study of bias in recidivism prediction instruments.](https://arxiv.org/abs/1610.07524) [↩](#fnref3)"]]