LECTURE 08 | المحاضرة 08

AI Ethics

أخلاقيات الذكاء الاصطناعي
Responsible, Safe, Transparent, and Trustworthy Artificial Intelligence
الذكاء الاصطناعي المسؤول والآمن والشفاف والجدير بالثقة

🎯 Learning Objectives

  • Understand why AI ethics is an engineering issue.
  • Explain fairness, transparency, explainability, and accountability.
  • Understand data privacy and cybersecurity risks.
  • Recognize bias in data and AI models.
  • Understand the importance of human oversight.
  • Discuss AI safety in critical power-system infrastructure.

🎯 أهداف التعلم

  • فهم لماذا تعد أخلاقيات الذكاء الاصطناعي مسألة هندسية.
  • فهم العدالة والشفافية وقابلية التفسير والمساءلة.
  • فهم مخاطر خصوصية البيانات والأمن السيبراني.
  • التعرف على التحيز في البيانات والنماذج.
  • فهم أهمية الإشراف البشري.
  • مناقشة سلامة الذكاء الاصطناعي في البنية التحتية الكهربائية الحرجة.

1. Why Do We Need AI Ethics?

AI systems increasingly influence decisions that affect people, organizations, infrastructure, and society.

A model can be mathematically accurate and still be unsafe, unfair, misleading, or inappropriate for real-world use.

1. لماذا نحتاج إلى أخلاقيات الذكاء الاصطناعي؟

تؤثر أنظمة الذكاء الاصطناعي بصورة متزايدة في قرارات تمس الأفراد والمؤسسات والبنية التحتية والمجتمع.

قد يكون النموذج دقيقًا رياضيًا، ومع ذلك قد يكون استخدامه غير آمن أو غير عادل أو مضللًا.

2. Responsible AI

Responsible AI aims to ensure that AI systems are:

Safe

The system should not create unacceptable physical or operational risks.

Fair

Decisions should not systematically disadvantage particular groups.

Transparent

Users should understand how and why AI is being used.

Accountable

Responsibility for AI-supported decisions must remain identifiable.

2. الذكاء الاصطناعي المسؤول

يجب أن يكون النظام المسؤول آمنًا وعادلًا وشفافًا وقابلًا للمساءلة.

3. Data Bias

Machine-learning models learn from data.

Model Behavior ≈ Learned Patterns from Training Data

Therefore, biased or incomplete training data can produce biased predictions.

Garbage in does not simply mean garbage out. In AI, biased data can produce convincing but systematically incorrect outputs.

3. التحيز في البيانات

تتعلم نماذج التعلم الآلي من البيانات المستخدمة في التدريب.

لذلك قد تؤدي البيانات غير المتوازنة أو غير الممثلة جيدًا للواقع إلى قرارات منحازة.

جودة البيانات ليست مسألة برمجية فقط، بل جزء أساسي من موثوقية النظام.

4. Example of Dataset Shift

Suppose a load-forecasting model is trained mainly using normal weekdays.

During an unusual event, public holiday, heat wave, or major outage, the statistical behavior may change.

Ptraining(x) ≠ Preal-world(x)
A model that performed well during training may fail when real-world conditions differ from the training distribution.

4. مثال على تغير توزيع البيانات

لنفترض أن نموذج التنبؤ بالحمل دُرّب بصورة أساسية على أيام عمل عادية.

في يوم عطلة أو موجة حر أو حالة طوارئ قد تختلف خصائص البيانات جذريًا.

Ptraining(x) ≠ Preal-world(x)

5. Explainability

Explainability means providing understandable reasons for an AI prediction or recommendation.

Input Data
AI Model
Decision
+
Explanation
In engineering, “the model said so” is often not sufficient.

5. قابلية التفسير

تعني قابلية التفسير توفير سبب مفهوم للقرار أو التنبؤ الذي قدمه النموذج.

في التطبيقات الهندسية لا يكفي عادةً القول: "النموذج أعطى هذه النتيجة".

6. Accuracy vs Explainability

A more complex model may sometimes provide higher predictive accuracy, but its decisions may be more difficult to interpret.

Simple Model

Often easier to understand and audit.

Complex Deep Model

May capture more complex relationships but can be harder to explain.

The best engineering model is not always the model with the smallest prediction error.

6. الدقة مقابل قابلية التفسير

قد يكون النموذج الأكثر تعقيدًا أكثر دقة، لكنه قد يكون أصعب في التفسير.

في بعض التطبيقات الحرجة نحتاج إلى موازنة الدقة مع الشفافية والسلامة.

7. Human-in-the-Loop

Human-in-the-loop means that a qualified person remains involved in important AI-supported decisions.

Measurements
AI Recommendation
Engineer Review
Action

7. الإنسان ضمن حلقة القرار

يعني ذلك بقاء مهندس أو خبير مؤهل مشاركًا في القرارات المهمة التي يدعمها الذكاء الاصطناعي.

الذكاء الاصطناعي يمكن أن يدعم القرار الهندسي، لكنه لا يلغي مسؤولية المهندس.

8. Automation Bias

Automation bias occurs when people trust an automated recommendation simply because it was produced by a computer system.

High confidence from an AI system is not proof that the result is correct.

8. التحيز نحو الأتمتة

يحدث التحيز نحو الأتمتة عندما يثق المستخدم بتوصية النظام بصورة تلقائية لمجرد أن الحاسوب أنتجها.

ثقة النموذج العالية لا تعني بالضرورة أن النتيجة صحيحة.

9. Privacy

AI systems may process large amounts of operational, customer, household, or infrastructure data.

Collect only the data that are actually needed for the intended purpose.

Important principles include:

  • Data minimization
  • Purpose limitation
  • Secure storage
  • Controlled access
  • Appropriate anonymization

9. خصوصية البيانات

قد تتعامل أنظمة الذكاء الاصطناعي مع كميات كبيرة من بيانات المستهلكين والتشغيل والبنية التحتية.

لذلك يجب جمع البيانات الضرورية فقط، وتأمينها، والتحكم بمن يستطيع الوصول إليها.

10. Cybersecurity

AI introduces new cybersecurity considerations.

Data Manipulation

An attacker may alter measurements or training data.

Model Manipulation

Model parameters or software may be modified.

Adversarial Inputs

Carefully designed inputs may cause incorrect predictions.

System Access

Unauthorized access may turn an AI tool into an operational risk.

10. الأمن السيبراني

يضيف استخدام الذكاء الاصطناعي مخاطر جديدة مثل التلاعب بالبيانات أو النموذج أو المدخلات أو الوصول غير المصرح به إلى النظام.

11. AI in Critical Infrastructure

Electrical power systems are critical infrastructure.

An incorrect movie recommendation is inconvenient. An incorrect protection, control, or operational decision in a power network can have physical consequences.

Therefore, AI used in power systems requires stricter verification, validation, monitoring, and fallback mechanisms.

11. الذكاء الاصطناعي في البنية التحتية الحرجة

تعد نظم الطاقة الكهربائية من البنى التحتية الحرجة.

خطأ في توصية ترفيهية قد يكون بسيطًا، أما خطأ في قرار حماية أو تحكم أو تشغيل كهربائي فقد يؤدي إلى نتائج مادية حقيقية.

12. Safety Constraints

An AI controller should not be allowed to violate physical safety limits.

For example:

Vmin ≤ V ≤ Vmax
I ≤ Imax
SOCmin ≤ SOC ≤ SOCmax
AI optimization should operate inside an engineering safety envelope.

12. قيود السلامة

يجب ألا يسمح لنظام الذكاء الاصطناعي بانتهاك الحدود الفيزيائية الآمنة.

Vmin ≤ V ≤ Vmax
I ≤ Imax
SOCmin ≤ SOC ≤ SOCmax
يجب أن يعمل الذكاء الاصطناعي داخل غلاف سلامة هندسي محدد.

13. Fail-Safe Design

A safe AI system should define what happens if the model fails, produces unreasonable outputs, or becomes unavailable.

AI Output
Safety Check
Accept
Unsafe / Invalid
Fallback Controller

13. التصميم الآمن عند الفشل

يجب تحديد ما يحدث عندما يفشل النموذج أو ينتج قيمة غير منطقية أو يصبح غير متاح.

يمكن عندها العودة إلى متحكم تقليدي موثوق أو إلى نقطة تشغيل آمنة.

14. Accountability

AI does not remove human or organizational responsibility.

Important questions include:

  • Who approved the model?
  • Who validated the data?
  • Who monitors performance?
  • Who can override the system?
  • Who investigates failures?

14. المساءلة

استخدام الذكاء الاصطناعي لا يلغي المسؤولية البشرية أو المؤسسية.

يجب تحديد بوضوح من يعتمد النموذج، ومن يراقبه، ومن يستطيع إيقافه، ومن يتحمل مسؤولية التحقيق عند حدوث خطأ.

15. Monitoring After Deployment

Model evaluation should not stop when the model is deployed.

Training → Validation → Deployment → Monitoring → Revalidation

Model performance can deteriorate as system conditions change.

15. المراقبة بعد التشغيل

لا تنتهي عملية تقييم النموذج بمجرد تشغيله.

Training → Validation → Deployment → Monitoring → Revalidation

فقد يتدهور الأداء مع تغير ظروف النظام والبيانات بمرور الزمن.

16. Engineering Verification

Before using an AI model operationally, engineers should test:

  • Normal operating conditions
  • Extreme operating conditions
  • Missing or corrupted measurements
  • Out-of-distribution inputs
  • Communication failures
  • Sensor failures
Testing only average conditions is not enough for safety-critical engineering.

16. التحقق الهندسي

يجب اختبار النموذج في الحالات الطبيعية والمتطرفة، ومع فقدان البيانات وأعطال الحساسات والاتصالات والمدخلات غير المألوفة.

17. Example: AI Voltage Controller

Suppose an AI model recommends reactive-power control:

ΔQAI = f(V, P, Q, Load, PV)

Before applying the recommendation:

AI Recommendation
Voltage Check
Current Check
Apply Action
Intelligence does not replace physical constraints.

17. مثال: متحكم جهد يعتمد على AI

لنفترض أن نموذجًا ذكيًا يقترح تغيير القدرة الردية:

ΔQAI = f(V, P, Q, Load, PV)

قبل تنفيذ الأمر يجب التأكد من أن الجهد والتيار وبقية المتغيرات ستبقى داخل الحدود المسموحة.

18. A Responsible AI Workflow

Define Purpose
Collect Quality Data
Train
Validate
Safety Test
Deploy
Monitor

18. دورة تطوير ذكاء اصطناعي مسؤول

تحديد الهدف ← جمع بيانات جيدة ← التدريب ← التحقق ← اختبار السلامة ← التشغيل ← المراقبة المستمرة

19. Key Questions Before Deployment

  1. Is the model sufficiently accurate?
  2. Do we understand its failure modes?
  3. Are the training data representative?
  4. Can the decision be explained?
  5. Are safety limits enforced independently?
  6. Can a human override the model?
  7. Is there a fallback strategy?
  8. Is the system protected against cyber threats?
  9. How will performance be monitored?

19. أسئلة أساسية قبل التشغيل

  1. هل دقة النموذج كافية؟
  2. هل نعرف الحالات التي قد يفشل فيها؟
  3. هل بيانات التدريب ممثلة للواقع؟
  4. هل يمكن تفسير القرار؟
  5. هل قيود السلامة مفروضة بشكل مستقل؟
  6. هل يمكن للإنسان تجاوز قرار النموذج؟
  7. هل يوجد نظام احتياطي؟
  8. هل النظام محمي سيبرانيًا؟
  9. كيف ستتم مراقبة أدائه؟

20. Summary

  • AI ethics is part of responsible engineering.
  • Biased data can produce biased model behavior.
  • Explainability is especially important in high-impact applications.
  • AI does not eliminate human accountability.
  • Privacy and cybersecurity must be considered throughout the AI lifecycle.
  • Power-system AI should operate inside explicit safety constraints.
  • Fail-safe mechanisms and human oversight are essential for critical infrastructure.
  • AI models must be monitored after deployment.

20. الخلاصة

  • أخلاقيات الذكاء الاصطناعي جزء من المسؤولية الهندسية.
  • يمكن أن تنتج البيانات المنحازة نماذج منحازة.
  • قابلية التفسير مهمة بصورة خاصة في التطبيقات ذات التأثير الكبير.
  • لا يلغي الذكاء الاصطناعي المسؤولية البشرية.
  • يجب مراعاة الخصوصية والأمن السيبراني في جميع مراحل النظام.
  • يجب أن يعمل AI في نظم الطاقة ضمن قيود سلامة واضحة.
  • وجود نظام احتياطي وإشراف بشري مهم في البنى التحتية الحرجة.
  • يجب مراقبة أداء النموذج بعد تشغيله.

📝 Review Questions

  1. Why is AI ethics important in engineering?
  2. What is data bias?
  3. What is dataset shift?
  4. What is explainable AI?
  5. What is automation bias?
  6. Why is human oversight important?
  7. Give three cybersecurity risks related to AI.
  8. Why is AI safety especially important in power systems?
  9. What is a fail-safe mechanism?
  10. Why must deployed models continue to be monitored?

📝 أسئلة المراجعة

  1. لماذا تعد أخلاقيات الذكاء الاصطناعي مهمة هندسيًا؟
  2. ما المقصود بتحيز البيانات؟
  3. ما المقصود بتغير توزيع البيانات؟
  4. ما المقصود بالذكاء الاصطناعي القابل للتفسير؟
  5. ما هو التحيز نحو الأتمتة؟
  6. لماذا يعد الإشراف البشري مهمًا؟
  7. اذكر ثلاثة مخاطر سيبرانية مرتبطة بالذكاء الاصطناعي.
  8. لماذا تكون سلامة AI مهمة بصورة خاصة في نظم الطاقة؟
  9. ما المقصود بنظام Fail-Safe؟
  10. لماذا يجب مراقبة النموذج بعد تشغيله؟