📚 كل الدروس

AI explainability (XAI)

🤖 الذكاء الاصطناعي والتكنولوجيا🎓 الصف الثاني عشر عام📌 هيكل الامتحان: AI L04 · slides 4–19

🎯 ذاكر الدرس وحل الكويز مجانًا في مذاكرتي
Lesson 4 – AI Explainability and Governance. Explainability (XAI) (قابلية التفسير) = understanding how and why an AI system makes a decision or prediction.
Key wordMeaning
Black-box AI (الصندوق الأسود)A model whose internal decision-making is not visible or understandable to humans
Accountability (المساءلة)Taking responsibility for the actions and outcomes of AI systems
Data governancePolicies and rules for how data is collected, stored, used and protected
AI auditingChecking AI systems to ensure they work fairly, safely and correctly

Explainable AI helps users: understand decisions · identify mistakes or bias · build trust · improve accountability and fairness. Without it, advanced systems behave like black boxes.

AreaWhy explainability matters
HealthcareDoctors need to know which symptoms or test results led to a prediction before treating
BankingPeople should know why a loan was rejected; helps find mistakes or bias
EducationStudents can understand and question grades or decisions
SecurityShows why an alert was raised so humans can verify it
Government servicesPeople can know why benefits were accepted or denied and appeal

Five ways explainability supports responsible AI: Trust · Fairness (gives information that helps people identify bias – it does not detect bias on its own) · Accountability (people, not the AI, take responsibility) · Compliance (laws require transparency in high-risk AI) · Improvement (developers understand errors).

MethodHow it worksExample
1 Feature importanceShows which input features most influenced the decisionIncome and repayment history affected loan approval
2 Decision treesA series of simple if–then questionsIf attendance > 90% and grades are high → predict success
3 Rule-based systemsClear, predefined rulesIf temperature > 38°C → send a heat warning
4 Visual explanationsHighlight important areas of an image/inputHighlight X-ray regions behind a diagnosis
5 Human review and oversightExperts review, validate and question AI decisionsDoctors review AI recommendations
LIME = Local Interpretable Model-agnostic Explanations: explains one prediction at a time (local), shows which features had the biggest influence, works with many models. Example: a diabetes-risk AI – LIME shows blood sugar, BMI and age were the main reasons.
SHAP = SHapley Additive exPlanations: estimates how much each feature contributes; positive values increase the prediction, negative values decrease it. Example: loan approved – high income increased the score, late payments reduced it.
⚠️ Explainability helps people find bias – it does not detect bias by itself, and the AI is never the one "held responsible".

Why are deep learning models black boxes? Neural networks contain millions of numbers (weights) spread across many layers. The decision comes from all of them together, so no single simple rule can be read off. Explainability methods are tools that reveal why the model made a specific decision.

Interpretable by design vs explained afterwards: decision trees and rule-based systems are understandable by design; LIME and SHAP are applied after training to explain complex models.

Activity 4.2 – loan with 50+ variables. Two suitable methods: feature importance / SHAP (shows that, e.g., late payments pulled the score down most) and LIME (explains this one customer's rejection locally). For a customer, a short list of the top reasons ("missed payments, high existing debt") is easier to understand than a full chart. Explainability is especially important in finance because decisions affect people's lives, must be fair, and regulations may require reasons.

Starter scenario: a business owner with a strong repayment history is rejected in seconds with no explanation – he cannot fix anything or appeal. Humans should review important decisions like this.

اختبر نفسك: أسئلة على AI explainability (XAI)

What is AI explainability (XAI)?

✅ الجواب: Understanding how and why an AI system makes a decision

XAI makes AI decisions understandable.

A model whose internal decision-making is not visible or understandable to humans is called:

✅ الجواب: Black-box AI

Deep learning models are often black boxes.

Which explainability method uses a series of simple if–then questions?

✅ الجواب: Decision trees

Decision trees follow clear decision paths.

حل كويز الدرس كامل ونافس طلاب مرحلتك 🏆