Fairness and limitations
แนะนำใหม่
6:33
ปัญญาประดิษฐ์และเรียนรู้ของเครื่อง
This course covers the classical core of artificial intelligence, honestly measured. The first three units are the spine: search, logical reasoning and…
บรรยายภาษาอังกฤษ · สลับคำบรรยายภาษาอังกฤษและภาษาจีนได้
ในบทเรียนนี้
| English | ความหมาย |
|---|---|
| Error disparity/ˈerə dɪˈspærɪti/ | Compare the confusion matrix of each group, not just the overall score. In Overnight's two regions:. |
| Recall/ˈriːkɔːl/ | |
| weight/weɪt/ | A numerical value expressing the relative importance, cost or contribution assigned to an item or connection. |
| Fairness/ˈfeənəs/ | A design choice, not a box to tick. |
| demographic parity/ˌdeməˈɡræfɪk ˈpærɪti/ | a fairness criterion asking that each group receives the positive prediction at the same rate |
| model card/ˈmɒdl kɑːd/ | a short document stating what a model is for, how it was tested and its limits |
| calibrated/ˈkælɪbreɪtɪd/ | (of predicted probabilities) matching how often the events really happen |
| base rates/beɪs reɪts/ |
Errors by group
- Error disparity 误差差异: compare the confusion matrix of each group, not just the overall score. In Overnight's two regions:
| Region | Late parcels | Caught | Recall |
|---|---|---|---|
| City | 30 | 27 | 0.90 |
| Rural | 12 | 9 | 0.75 |
- A gap of 15 points: rural late parcels are missed more than twice as often (25% against 10%).

City recall 0.90, rural 0.75: the disparity is —
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
0.90 - 0.75: one in four rural lates missed vs one in ten.
The arithmetic of parity
- Rural lates are 13% of the region's records, against 29% in the city. The rural late class is thin, and the boundary serves it badly. The fix starts in the data (more records, class weights), not in the metric.
- Fairness 公平性 criteria have names, and they conflict. Equal error rates may need a different threshold for each group; demographic parity 人口统计均等 makes the positive rates equal. Sometimes they cannot both hold. Fairness is a design choice, not a box to tick.
The rural gap most likely starts in —
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
13% vs 29% class thinness: fix the data, not the number.
The limitation statement
- Overnight is synthetic: 200 records, two regions, one season. Its 0.92 says nothing about your city or your carrier. The model card 模型卡 states the intended use, the measured gaps (the 15-point gap) and the uses that are out of scope.
- Claiming fairness from overall accuracy hides the gap underneath. A limitation stated honestly builds trust; one that users discover destroys it.
The model card limitation section exists to —
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Limits stated honestly build trust; limits that users discover destroy it.
Calibration, and a hard limit
- A model is calibrated 校准的 if its probabilities mean what they say: of parcels given $0.8$, about $80\%$ should be late. If $50$ parcels at $0.8$ produce $30$ lates, the observed rate is $0.6$, and the model is overconfident.
- When two groups have different base rates, equal false positive and false negative rates generally conflict with equal positive predictive values, except in special cases such as perfect prediction. A team must choose which fairness criterion matters for its use, and say so.
A model gives 40 parcels a probability of 0.7; 22 are late. What is the observed late rate?
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
22 / 40 = 0.55, below the predicted 0.7, so the model is overconfident there.
With different base rates, an imperfect calibrated model can always equalise both error rates across groups.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Calibration, equal false positive rates and equal false negative rates cannot all hold unless prediction is perfect or base rates match.
Comparing selection rates
- Demographic parity 人口统计均等 compares how often each group gets the positive label. If 40 of 100 city parcels and 10 of 100 rural parcels are flagged for priority, the ratio is $0.10/0.40 = \mathbf{0.25}$.
- A common screen, the four-fifths rule, flags any ratio below 0.8. A low ratio is a question to investigate, not yet proof of unfairness: the base rates may differ.
40 of 100 city and 10 of 100 rural parcels get the positive label: selection-rate ratio?
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
$0.10/0.40 = 0.25$.
That ratio passes the four-fifths screen.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
0.25 is far below 0.8.
Worked example: weighting the thin class
- Rural lates are 13% of rural records. Weighting 权重 each class by the inverse of its frequency gives a late record a weight of $0.87/0.13 = \mathbf{6.7}$ compared with an on-time record.
- The loss now counts the missed rural lates about as much as all the on-time records together, and the boundary moves to serve them. Check the recall of each group afterwards: weighting is a fix to measure, not to assume.
Lates are 13% of a group. Inverse-frequency weight of a late record relative to an on-time one (one decimal)?
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
$0.87/0.13 = 6.7$.
Model answer: Overnight's model card
- Intended use. Flag parcels likely to arrive late, so staff can call the customer first. Not for judging drivers or setting prices.
- Data. 200 synthetic records, two regions (city, rural), one season. Late rates: 29% city, 13% rural.
- Performance. Accuracy 0.92 overall. Recall 召回率 for late parcels: city 0.90, rural 0.75, so 1 in 4 rural late parcels is missed.
- Limits. Untested in other cities, carriers or seasons. Rural results rest on only 12 late parcels.
- Next step. Collect more rural records, retrain with class weights, and report recall by region again before any wider use.
Which line belongs in a model card's limits section?
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
A limit tells users where the evidence is thin. Overall accuracy says nothing about fairness, and claiming it works anywhere is exactly what a limits section must not do.
Marks that slip away
- Overall accuracy as fairness. $0.92$ overall hides a rural recall of $0.75$ against $0.90$ in the city.
- Fixing the metric, not the data. The rural class is thin; more records or class weights come first.
- Expecting every criterion at once. With different base rates 基础率, equal error rates and equal positive predictive values generally conflict, except in special cases such as perfect prediction.
Recap
- Compare errors by group: city recall $0.90$ against rural $0.75$.
- Fix thin data first: more records, class weights.
- A model card 模型卡 states the intended use, the measured gaps and the uses that are out of scope.
เกิดปัญหาอะไรขึ้น? เฉพาะทีมเว็บไซต์เท่านั้นที่เห็นข้อมูลนี้