Majid Al-RaimiFull guideالشرح الكامل

COE 592Lecture 00المحاضرة 00Full guideالشرح الكامل

Course overviewنظرة عامة على المقرر

The whole lecture on one page, taught concept by concept. Work through the parts in order, mark each concept once you understand it, and open the slide chips when you want the original slides.المحاضرة كاملة في صفحة واحدة، مشروحة مفهومًا مفهومًا. امشِ على الأجزاء بالترتيب، وعلّم كل مفهوم بعد أن تفهمه، وافتح أزرار الشرائح عندما تريد الرجوع إلى الشرائح الأصلية.

Partsالأجزاء
2
Conceptsالمفاهيم
8
Slidesالشرائح
12
Readingمدة القراءة
48 min48 دقيقة
Understoodما فهمته
0/8 conceptsمفاهيم

Part 01: The instructor and edge AI in practiceالمحاضر والذكاء الاصطناعي على الحافة (Edge AI) عمليًا

Who teaches the course, and what his lab's projects show about running vision and security models on UAVs, farm robots, vehicles and IoT devices.من يدرّس المقرر، وماذا تكشف مشاريع مختبره عن تشغيل نماذج الرؤية والأمن على الطائرات المسيّرة (UAV) وروبوتات المزارع والمركبات وأجهزة إنترنت الأشياء (IoT).

5 concepts5 مفاهيم, ، slides 1-8الشرائح 1-8

Why this part mattersلماذا يهمّ هذا الجزء

This part is the course's motivation written as a portfolio. Every image on slides 3 to 8 is the same problem you will face in the research project: a model sitting next to a sensor, a budget of weight, power, memory and latency, and a requirement to stay correct when the world is wet, noisy or hostile.

Read these slides as budget problems rather than as a list of the instructor's papers. That reading habit is what the rest of COE 592 builds on, because pruning, quantization, neural architecture search, distillation and TinyML are all answers to one question: how much model can this platform afford, and how do we make a good model fit inside that? The bio matters less for exams than the three words in the lab's name, which turn out to be the syllabus in miniature.

هذا الجزء هو دافع المقرر مكتوبًا في صورة ملف أعمال بحثية. كل صورة في الشرائح من 3 إلى 8 هي المشكلة نفسها التي ستواجهها في المشروع البحثي: نموذج يجلس بجوار حساس، وميزانية من الوزن والطاقة والذاكرة وزمن الاستجابة latency، وشرط أن يبقى صحيحًا حين يكون العالم مبتلًّا أو مليئًا بالضوضاء أو عدائيًا.

اقرأ هذه الشرائح على أنها مسائل ميزانية، لا على أنها قائمة بأبحاث الأستاذ. عادة القراءة هذه هي ما يبني عليه بقية COE 592، لأن pruning وquantization وneural architecture search وdistillation وTinyML كلها إجابات عن سؤال واحد: كم من النموذج تستطيع هذه المنصة تحمّله، وكيف نجعل نموذجًا جيدًا يتّسع داخل ذلك؟ السيرة الذاتية أقل أهمية للاختبارات من الكلمات الثلاث في اسم المختبر، والتي يتضح أنها المنهج الدراسي في صورة مصغّرة.

By the end you canفي نهاية هذا الجزء ستستطيع

  1. Expand SERV and map each word to a later course theme.تفكّ اختصار SERV وتربط كل كلمة منه بموضوع سيأتي لاحقًا في المقرر.
  2. Name the sensor modalities on a UAV or vehicle inspection rig and explain why payload limits force small on-board models or data offloading.تسمّي أنواع الحساسات على منصة فحص محمولة على طائرة مسيّرة UAV أو مركبة، وتشرح لماذا تفرض حدود الحمولة نماذج صغيرة على متن المنصة أو نقل البيانات إلى مكان آخر.
  3. Read a detector's size class (n, s, m, l, x) from Ultralytics tables and compute the parameter, FLOP and mAP trade-off between two sizes.تقرأ فئة حجم الكاشف (n, s, m, l, x) من جداول Ultralytics، وتحسب المقايضة في عدد المعاملات وFLOPs وmAP بين حجمين.
  4. Read a detection figure critically: separate confidence from correctness, and a saliency map from a metric.تقرأ شكل كشف الأجسام قراءة ناقدة: تفصل الثقة عن الصواب، وتفصل خريطة البروز saliency map عن المقياس.
  5. State why an IoT intrusion detector must be lightweight and what generalizable means.تذكر لماذا يجب أن يكون كاشف التسلل في IoT خفيفًا، وما معنى أن يكون قابلًا للتعميم generalizable.
  6. Explain why roadside and rolling-stock inspection are real-time, safety-critical edge inference problems.تشرح لماذا يُعدّ فحص الطرق وفحص عربات القطارات مسألتي استدلال على الطرف edge في الزمن الحقيقي وحرجتين للسلامة.

The course is COE 592, Machine Learning on Embedded Systems, offered in term T261 and taught by Dr. Abdul Jabbar Siddiqui of the Department of Computer Engineering. Of everything on the title and bio slides, one line carries the most information: he leads the SERV Lab, and SERV stands for Secure, Efficient, Robust Vision. Those three adjectives are the map of the course before the syllabus arrives in Part 02.

المقرر هو COE 592، تعلّم الآلة على الأنظمة المدمجة (Machine Learning on Embedded Systems)، ويُطرح في الفصل T261، ويدرّسه الدكتور عبد الجبار صدّيقي (Dr. Abdul Jabbar Siddiqui) من قسم هندسة الحاسب. من بين كل ما في شريحتي العنوان والسيرة الذاتية، هناك سطر واحد يحمل أكبر قدر من المعلومات: فهو يقود SERV Lab، وSERV اختصار لـ Secure, Efficient, Robust Vision، أي رؤية آمنة وفعّالة ومتينة. هذه الصفات الثلاث هي خريطة المقرر قبل أن يصل المنهج الدراسي في الجزء 02.

Instructor profile, as stated on slide 2الملف التعريفي للأستاذ كما ورد في الشريحة 2

Nameالاسم
Dr. Abdul Jabbar Siddiquiالدكتور عبد الجبار صدّيقي (Dr. Abdul Jabbar Siddiqui)
Rolesالمناصب
Assistant Professor, Computer Engineering, KFUPM; Research Scholar, SDAIA-KFUPM JRC for AI; Lead of SERV Labأستاذ مساعد في قسم هندسة الحاسب في KFUPM، وباحث في SDAIA-KFUPM JRC for AI، وقائد SERV Lab
Degreesالشهادات
PhD, University of Ottawa (2021); MASc, University of Ottawa (2015); BSc, KFUPM (2012)الدكتوراه PhD من جامعة أوتاوا University of Ottawa (2021)، والماجستير MASc من جامعة أوتاوا (2015)، والبكالوريوس BSc من KFUPM (2012)
Previouslyسابقًا
National Research Council of Canada; NSERC TRANSIT Networkالمجلس الوطني للبحوث في كندا (National Research Council of Canada)، وشبكة NSERC TRANSIT Network
Research interestsالاهتمامات البحثية
Edge AI, Visual Intelligence and Analytics, Adversarial machine learning, AI for Cybersecurity, Intelligent transportation systems, UAV-based Inspection and Monitoring, Internet of ThingsEdge AI، والذكاء البصري والتحليلات (Visual Intelligence and Analytics)، Adversarial machine learning، والذكاء الاصطناعي للأمن السيبراني (AI for Cybersecurity)، Intelligent transportation systems، والفحص والمراقبة باستخدام UAV، Internet of Things

Reading SERV as a syllabusقراءة SERV على أنها منهج دراسي

Look at the interests list again and notice that every item is an instance of one question: can a model run near the sensor, inside a budget of memory, compute, energy and latency, and still be trusted? Edge AI and IoT name the setting. UAV inspection and transportation systems name the platforms. Adversarial machine learning and AI for cybersecurity name the threats. MIT 6.5940, whose course description slide 11's takeaways echo almost word for word, opens with the same framing, that deep networks "demand extraordinary levels of computation, hindering its deployment on everyday devices" (Han, MIT 6.5940).

انظر إلى قائمة الاهتمامات البحثية مرة أخرى، ولاحظ أن كل بند فيها حالة من سؤال واحد: هل يمكن لنموذج أن يعمل قرب الحساس، ضمن ميزانية من الذاكرة والحوسبة والطاقة وزمن الاستجابة، ويبقى مع ذلك جديرًا بالثقة؟ Edge AI وIoT تسمّيان البيئة. فحص الطائرات المسيّرة UAV وأنظمة النقل تسمّي المنصات. تعلّم الآلة العدائي (adversarial machine learning) والذكاء الاصطناعي للأمن السيبراني يسمّيان التهديدات. ومقرر MIT 6.5940، الذي تردّد خلاصاتُ الشريحة 11 وصفَه تقريبًا كلمة بكلمة، يبدأ بالإطار نفسه: أن الشبكات العميقة "تتطلب مستويات استثنائية من الحوسبة، مما يعيق نشرها على الأجهزة اليومية" (Han, MIT 6.5940).

LetterالحرفWordالكلمةCourse themeموضوع المقررWhere you meet it in this partأين تقابله في هذا الجزء
SSSecureآمن (Secure)Adversarial machine learning and intrusion detectionتعلّم الآلة العدائي (adversarial machine learning) وكشف التسللPNet-IDS on slide 6PNet-IDS في الشريحة 6
EEEfficientفعّال (Efficient)Compression, pruning, quantization, nano detectorsالضغط، وpruning، وquantization، والكواشف النانويةEcoWeedNet on slide 4, PNet-IDS on slide 6EcoWeedNet في الشريحة 4، وPNet-IDS في الشريحة 6
RRRobustمتين (Robust)Behaviour under rain, noise, blur and domain shiftالسلوك تحت المطر والضوضاء والتشويش الحركي وdomain shift، أي انزياح المجالYOLO-RAW on slide 5YOLO-RAW في الشريحة 5
VVVisionرؤية (Vision)Cameras, thermal imagers and LiDAR as the inputالكاميرات والمصوّرات الحرارية وLiDAR بوصفها المدخلاتEvery figure from slide 3 to slide 8كل شكل من الشريحة 3 إلى الشريحة 8
SERV mapped onto the courseSERV مُسقَطًا على المقرر
A camera on three legs. Secure, Efficient and Robust each hold up one corner; remove any leg and the deployment tips over.كاميرا على ثلاث أرجل. Secure وEfficient وRobust تحمل كلٌّ منها زاوية واحدة، وإذا أزلت أي رجل سقط النشر.

Efficient is the theme that gets the most lecture time, because it is where the arithmetic lives: how many parameters, how many operations, how many milliseconds. Robust is what happens to that efficient model when rain, noise or a new camera changes the input distribution. Secure is the adversarial case, where the change in the input is chosen on purpose: Goodfellow, Shlens and Szegedy defined adversarial examples as inputs formed by applying "small but intentionally worst-case perturbations", and traced the vulnerability to the models' linear behaviour (Goodfellow et al., 2015). A model that is only efficient can be fooled; a model that is only robust may not fit on the drone.

الكفاءة Efficient هي الموضوع الذي يأخذ أكبر وقت من المحاضرات، لأنها حيث يعيش الحساب: كم معاملًا، وكم عملية، وكم ميلي ثانية. المتانة Robust هي ما يحدث لذلك النموذج الفعّال حين يغيّر المطر أو الضوضاء أو كاميرا جديدة توزيعَ المدخلات. والأمان Secure هو الحالة العدائية، حيث يُختار التغيير في المدخل عن قصد: عرّف Goodfellow وShlens وSzegedy الأمثلة العدائية (adversarial examples) بأنها مدخلات تتكوّن بتطبيق "اضطرابات صغيرة لكنها مقصودة وتمثّل أسوأ حالة"، وأرجعوا هذه الهشاشة إلى السلوك الخطي للنماذج (Goodfellow et al., 2015). النموذج الفعّال فقط يمكن خداعه، والنموذج المتين فقط قد لا يتّسع على الطائرة المسيّرة.

Recall

What do the letters of SERV stand for, and which course theme does each map to?علامَ تدل حروف SERV، وبأي موضوع من المقرر يرتبط كل حرف؟

Secure (adversarial machine learning, intrusion detection), Efficient (compression, quantization, nano detectors), Robust (rain, noise, blur, domain shift), Vision (the input modality across all of them).
Secure (تعلّم الآلة العدائي، وكشف التسلل)، Efficient (الضغط، والـ quantization، والكواشف النانوية)، Robust (المطر، والضوضاء، والتشويش الحركي، وانزياح المجال domain shift)، Vision (نوع المدخلات المشترك بينها جميعًا).

Quick checkاختبار سريع

What does the SERV in SERV Lab stand for?علامَ يدل SERV في اسم SERV Lab؟

Slide 3 is a wall of figures with no captions, so start by describing what is visibly there. A small unmanned helicopter sits on gravel with its camera payload circled (panel A). Beside it is a rugged field case holding a ground control station (panel B). A snowy corridor with a railway line running through it has been rebuilt in 3D (panel C). Two road vehicles carry roof rigs with four labelled sensors: Visual Camera, Thermal Camera, GPS receiver and LiDAR. Three top-down strips of the same track corridor follow, two with the rails traced in blue and encroaching vegetation segmented in red, one with the vegetation segmented in purple. A photogrammetric point cloud of the corridor appears once in true colour and once coloured by elevation. Finally a ROS-style dashboard shows six panes: an IR camera looking left and right, RGB cameras looking right, forward and left, and a LiDAR output.

الشريحة 3 جدار من الأشكال بلا تعليقات، لذا ابدأ بوصف ما هو ظاهر فيها. مروحية صغيرة بدون طيار تقف على الحصى وحمولتها من الكاميرات محاطة بدائرة (اللوحة A). بجانبها حقيبة ميدانية متينة تضم محطة تحكم أرضية (اللوحة B). وممر مغطّى بالثلج يمر عبره خط سكة حديدية أُعيد بناؤه ثلاثي الأبعاد ( اللوحة C). مركبتان على الطريق تحمل كلٌّ منهما منصة على السقف بأربعة حساسات معنونة: Visual Camera وThermal Camera وGPS receiver وLiDAR. تتبعها ثلاث شرائط علوية لممر السكة نفسه، اثنان منها رُسمت فيهما القضبان بالأزرق وقُسّم فيهما الغطاء النباتي المتعدّي بالأحمر، وواحد قُسّم فيه الغطاء النباتي بالبنفسجي. وتظهر سحابة نقاط فوتوغرامترية (photogrammetric point cloud) للممر مرة بألوانها الحقيقية ومرة ملوّنة بحسب الارتفاع. وأخيرًا لوحة تحكم على طراز ROS تعرض ست نوافذ: كاميرا أشعة تحت حمراء IR تنظر يسارًا ويمينًا، وكاميرات RGB تنظر يمينًا وأمامًا ويسارًا، ومخرجات LiDAR.

Read together, this appears to be a rail corridor inspection platform: a Multi-sensor platform mounted on a UAV and on vehicles, mapping the track and the vegetation around it. The slide attributes no paper and no result, so treat everything beyond the visible labels as a description of the problem class. The instructor did co-author a review of exactly this field, a literature survey of automated machine vision inspection systems in railways, prepared at the National Research Council of Canada for Transport Canada (Siddiqui, Mammeri and Liu, 2021), which is the closest citable link for the theme.

إذا قُرئت هذه الأشكال معًا، فهي تبدو منصة لفحص ممرات السكك الحديدية: منصة متعددة الحساسات Multi-sensor platform مثبّتة على طائرة مسيّرة UAV وعلى مركبات، ترسم خريطة للسكة والغطاء النباتي حولها. لا تنسب الشريحة أي ورقة أو نتيجة، فتعامل مع كل ما يتجاوز العناوين الظاهرة على أنه وصف لصنف المشكلة. وقد شارك الأستاذ فعلًا في تأليف مراجعة لهذا المجال تحديدًا، وهي مسح أدبي لأنظمة الفحص الآلي بالرؤية الحاسوبية في السكك الحديدية، أُعدّ في المجلس الوطني للبحوث في كندا لصالح هيئة النقل الكندية Transport Canada (Siddiqui, Mammeri and Liu, 2021)، وهي أقرب رابط يمكن الاستشهاد به لهذا الموضوع.

Four sensors, four different questionsأربعة حساسات، أربعة أسئلة مختلفة

Each sensor on the roof rig answers a question the others cannot. A visual camera sees colour and texture, which is what separates green vegetation from grey ballast in the orthomosaic strips. A Thermal camera images emitted infrared instead of reflected light, so it sees temperature: a hot bearing or a person on the track at night shows up with no visible illumination at all. LiDAR is, in NOAA's definition, a remote sensing method that uses light in the form of a pulsed laser to measure ranges, and those ranges become the 3D Point cloud in which clearance and elevation can be measured. GPS contributes no picture of the scene, only where and when each frame was taken, which is what lets overlapping aerial photos be stitched into a georeferenced strip and the segmentation overlays registered onto it.

كل حساس على منصة السقف يجيب عن سؤال لا يستطيع غيره الإجابة عنه. الكاميرا المرئية ترى اللون والملمس، وهذا ما يفصل الغطاء النباتي الأخضر عن حصى السكة الرمادي في شرائط orthomosaic. أما Thermal camera فتصوّر الأشعة تحت الحمراء المنبعثة بدلًا من الضوء المنعكس، فهي ترى درجة الحرارة: محمل عجلة ساخن أو شخص على السكة ليلًا يظهر من دون أي إضاءة مرئية على الإطلاق. وLiDAR، بحسب تعريف NOAA، طريقة استشعار عن بعد تستخدم الضوء على شكل ليزر نبضي لقياس المسافات، وتتحول تلك المسافات إلى point cloud ثلاثية الأبعاد يمكن قياس الخلوص والارتفاع فيها. لا يقدّم GPS أي صورة للمشهد، بل فقط أين ومتى التُقطت كل لقطة، وهذا ما يسمح بخياطة الصور الجوية المتداخلة في شريط مرجعي جغرافيًا (georeferenced) وتسجيل طبقات التقسيم فوقه.

SensorالحساسMeasuresما يقيسهGood atيتقنWeak atيضعف فيData rate pressureضغط معدل البيانات
Visual (RGB) cameraالكاميرا المرئية (RGB)Reflected visible lightالضوء المرئي المنعكسColour and texture: vegetation against rail, paint, signsاللون والملمس: الغطاء النباتي مقابل السكة، والطلاء، واللافتاتDarkness, rain, glareالظلام، والمطر، والوهجHighest: full-colour frames at video rateالأعلى: إطارات كاملة الألوان بمعدل الفيديو
Thermal (IR) cameraالكاميرا الحرارية (IR)Emitted infrared, so temperatureالأشعة تحت الحمراء المنبعثة، أي درجة الحرارةHot bearings, people and animals at nightالمحامل الساخنة، والأشخاص والحيوانات ليلًاNo colour, lower resolutionلا ألوان، ودقة أقلModerate: fewer pixels per frameمتوسط: بكسلات أقل في كل إطار
LiDARLiDARLaser pulse time of flight, so rangeزمن طيران نبضة الليزر، أي المسافةGeometry, clearance, elevation, 3D point cloudsالهندسة، والخلوص، والارتفاع، وسحب النقاط ثلاثية الأبعاد (3D point clouds)Sparse at long range, cost, weightمتفرّق على المسافات البعيدة، والتكلفة، والوزنHigh: millions of points per secondمرتفع: ملايين النقاط في الثانية
GPS receiverمستقبل GPSPosition and timeالموقع والزمنGeoreferencing every frame and pointالإسناد الجغرافي لكل إطار ولكل نقطةNothing about the scene itselfلا شيء عن المشهد نفسهNegligibleضئيل
The four modalities on the slide 3 rigsأنواع الحساسات الأربعة على منصات الشريحة 3

Why the payload cannot carry muchلماذا لا تستطيع الحمولة أن تحمل الكثير

The reason this slide belongs in an embedded machine learning course is the platform, not the sensors. A UAV lifts a fixed mass, and every gram of camera, LiDAR or computer is a gram less battery. Its flight time is set by that battery, and the compute it can run is set by what the battery can feed without shortening the flight. A car rig has more of all three, but still nothing like a data center. So there are exactly two ways to turn the sensor streams into an inspection result: shrink the model until it runs on board, which is the E of SERV, or ship the raw data somewhere that can process it.

سبب وجود هذه الشريحة في مقرر عن تعلّم الآلة المدمج هو المنصة، لا الحساسات. الطائرة المسيّرة ترفع كتلة ثابتة، وكل غرام من الكاميرا أو LiDAR أو الحاسوب هو غرام أقل من البطارية. زمن طيرانها تحدده تلك البطارية، والحوسبة التي يمكنها تشغيلها تحددها قدرة البطارية على تغذيتها من دون تقصير زمن الطيران. منصة السيارة لديها قدر أكبر من الثلاثة، لكنها لا تزال بعيدة جدًا عن مركز بيانات. لذلك هناك طريقتان فقط لتحويل تدفقات الحساسات إلى نتيجة فحص: تصغير النموذج حتى يعمل على متن المنصة، وهذا هو حرف E في SERV، أو إرسال البيانات الخام إلى مكان يستطيع معالجتها.

Three sensors feed one small chip on the platform. The weight, power and compute bars fill almost to the limit but must not overflow it.ثلاثة حساسات تغذي شريحة صغيرة واحدة على المنصة. أشرطة الوزن والطاقة والحوسبة تمتلئ حتى الحد تقريبًا، لكن يجب ألا تتجاوزه.

Shipping the raw data does not scale. Satyanarayanan's edge computing argument gives the numbers: if 12,000 users each stream 1080p video, the ingress link into the cloud needs about 100 Gbit/s, and a million users would need 8.5 Tbit/s. The cumulative demand is "considerably lower if the raw data is analyzed on cloudlets" near the sensors and only the extracted information travels onward (Satyanarayanan, 2017). Five cameras on one vehicle are a very small version of the same problem.

إرسال البيانات الخام لا يتوسّع. حجة Satyanarayanan عن الحوسبة الطرفية تعطي الأرقام: إذا بثّ 12,000 مستخدم كلٌّ منهم فيديو بدقة 1080p، فإن الوصلة الداخلة إلى السحابة تحتاج إلى نحو 100 Gbit/s، ومليون مستخدم يحتاجون إلى 8.5 Tbit/s. ويكون الطلب التراكمي "أقل بكثير إذا حُلّلت البيانات الخام على cloudlets" قرب الحساسات ولم تنتقل إلا المعلومات المستخرجة (Satyanarayanan, 2017). خمس كاميرات على مركبة واحدة نسخة صغيرة جدًا من المشكلة نفسها.

Worked exampleمثال محلول

How much video does a five-camera rig produce?كم من الفيديو تنتج منصة بخمس كاميرات؟

  1. Assume a bit rate per cameraافترض معدل بتات لكل كاميرا

    Take five 1080p cameras at an assumed 8 Mbit/s each after compression. This is an illustrative figure, not one from the slide.
    خذ خمس كاميرات بدقة 1080p بمعدل مفترض قدره 8 Mbit/s لكل منها بعد الضغط. هذا رقم توضيحي، وليس من الشريحة.
  2. Total streamالتدفق الكلي

    5 × 8 = 40 Mbit/s leaving the rig continuously.
    5 × 8 = 40 Mbit/s تخرج من المنصة باستمرار.
  3. One hour of drivingساعة واحدة من القيادة

    40 × 3600 = 144,000 Mbit, which is 18 GB per hour.
    40 × 3600 = 144,000 Mbit، أي 18 GB في الساعة.
  4. Upload over a rural linkالرفع عبر وصلة ريفية

    At a 5 Mbit/s cellular uplink, 144,000 / 5 = 28,800 s, that is 8 hours to upload one hour of driving.
    بوصلة رفع خلوية بسرعة 5 Mbit/s، يكون 144,000 / 5 = 28,800 s، أي 8 ساعات لرفع ساعة واحدة من القيادة.
  5. Resultالنتيجة

    The rig cannot upload what it records. It must detect on board and upload detections, which is why the model on the chip has to fit the platform's budget.
    لا تستطيع المنصة رفع ما تسجّله. يجب أن تكشف على متنها وترفع نتائج الكشف فقط، ولهذا يجب أن يتّسع النموذج الموجود على الشريحة ضمن ميزانية المنصة.

Recall

Name the four sensors labelled on the slide 3 vehicle rigs and one thing each measures.سمِّ الحساسات الأربعة المعنونة على منصات المركبات في الشريحة 3، وشيئًا واحدًا يقيسه كلٌّ منها.

Visual camera (colour and texture from reflected light), thermal camera (emitted infrared, so temperature), LiDAR (pulsed-laser range, giving 3D points), GPS receiver (position and time for georeferencing).
الكاميرا المرئية (اللون والملمس من الضوء المنعكس)، والكاميرا الحرارية (الأشعة تحت الحمراء المنبعثة، أي درجة الحرارة)، وLiDAR (المسافة بالليزر النبضي، مما يعطي نقاطًا ثلاثية الأبعاد)، ومستقبل GPS (الموقع والزمن للإسناد الجغرافي).

A farm robot drives between rows of cotton seedlings and must find the weeds without stopping. That is an Object detection task, and the model that does it rides on the robot: no cloud, no rack, just whatever compute the vehicle's battery can feed. Slide 4 shows the instructor's answer, EcoWeedNet, described on the slide as lightweight, computationally and energy efficient, and aimed at sustainable, low-carbon, consumer-electronics-based Precision agriculture.

روبوت زراعي يسير بين صفوف شتلات القطن ويجب أن يجد الأعشاب الضارة دون أن يتوقف. هذه مهمة Object detection، والنموذج الذي ينفّذها يركب على الروبوت: لا سحابة، ولا خوادم، فقط أي قدرة حوسبة تستطيع بطارية المركبة تغذيتها. تعرض الشريحة 4 إجابة الأستاذ، EcoWeedNet، الموصوف على الشريحة بأنه خفيف، وفعّال حسابيًا وفي استهلاك الطاقة، وموجّه إلى Precision agriculture مستدامة ومنخفضة الكربون وقائمة على الإلكترونيات الاستهلاكية.

Farm deviceجهاز المزرعة
consumer electronics, vehicle or robotإلكترونيات استهلاكية، مركبة أو روبوت

Drives the field and carries the camera.

يتحرك في الحقل ويحمل الكاميرا.

captured imagesصور ملتقطة
Smart farm imagesصور المزرعة الذكية
cotton seedlings and weedsشتلات القطن والأعشاب الضارة

Frames taken in the field, in sun and shadow.

إطارات ملتقطة في الحقل، في الشمس والظل.

images inالصور تدخل
EcoWeedNet
lightweight detectorكاشف خفيف

A small network that runs within the robot's budget.

شبكة صغيرة تعمل ضمن ميزانية الروبوت.

boxesصناديق
Weed detectionsاكتشافات الأعشاب الضارة
automated outputمخرج آلي

Boxes the robot can act on.

صناديق يستطيع الروبوت أن يتصرف بناءً عليها.

The EcoWeedNet pipeline as drawn on slide 4سلسلة معالجة EcoWeedNet كما رُسمت في الشريحة 4

Efficient: what a nano detector isالكفاءة: ما هو الكاشف النانوي

The comparison on slide 4 is against YOLO11n and YOLO12n. In the YOLO family the suffix is a size class: n (nano) is the smallest, then s, m, l and x. The classes share one architecture and differ in width and depth, so the table below is the cleanest picture of what "lightweight" costs and buys. The figures are Ultralytics' own, on COCO validation at 640 px.

المقارنة في الشريحة 4 هي مع YOLO11n وYOLO12n. في عائلة YOLO تدل اللاحقة على فئة الحجم: n (نانو) هي الأصغر، ثم s وm وl وx. تشترك الفئات في بنية واحدة وتختلف في العرض والعمق، لذا فالجدول أدناه أوضح صورة لما يكلّفه وما يشتريه وصف "خفيف". الأرقام من Ultralytics نفسها، على مجموعة التحقق من COCO بدقة 640 px.

ModelالنموذجParametersالمعاملاتFLOPsFLOPsmAP50-95mAP50-95CPU ONNX latencyزمن الاستجابة على CPU عبر ONNXT4 TensorRT latencyزمن الاستجابة على T4 عبر TensorRT
YOLO11nYOLO11n2.6M2.6M6.5B6.5B39.539.556.1 ms56.1 ms1.5 ms1.5 ms
YOLO12nYOLO12n2.6M2.6M7.5B7.5B40.640.6not listedغير مذكور1.64 ms1.64 ms
YOLO11mYOLO11m20.1M20.1M68.1B68.1B51.551.5183.2 ms183.2 ms4.7 ms4.7 ms
YOLO11xYOLO11x56.9M56.9M195.3B195.3B54.754.7462.8 ms462.8 ms11.3 ms11.3 ms
YOLO size classes (Ultralytics documentation)فئات حجم YOLO (وثائق Ultralytics)

Worked exampleمثال محلول

Nano versus mediumالنانوي مقابل المتوسط

  1. Parametersالمعاملات

    20.1 / 2.6 ≈ 7.7x fewer parameters in YOLO11n than YOLO11m.
    عدد parameters في YOLO11n أقل بـ 20.1 / 2.6 ≈ 7.7x مرة منه في YOLO11m.
  2. Computeالحوسبة

    68.1 / 6.5 ≈ 10.5x fewer floating point operations per image.
    عمليات الفاصلة العائمة floating point operations لكل صورة أقل بـ 68.1 / 6.5 ≈ 10.5x مرة.
  3. Latencyزمن الاستجابة

    CPU latency 183.2 / 56.1 ≈ 3.3x lower. The ratio is smaller than the FLOP ratio because small models leave part of the hardware idle.
    latency على CPU أقل بـ 183.2 / 56.1 ≈ 3.3x مرة. هذه النسبة أصغر من نسبة FLOPs لأن النماذج الصغيرة تترك جزءًا من العتاد خاملًا.
  4. Priceالثمن

    51.5 − 39.5 = 12.0 mAP50-95 points lower.
    أقل بـ 51.5 − 39.5 = 12.0 نقطة في mAP50-95.
  5. Resultالنتيجة

    A nano model trades a tenth of the compute for twelve points of accuracy. On a robot that must run at frame rate on a battery, that is usually the right trade, and it is the trade EcoWeedNet is designed to improve on.
    النموذج النانوي يقايض عُشر الحوسبة باثنتي عشرة نقطة من الدقة. على روبوت يجب أن يعمل بمعدل الإطارات على بطارية، هذه عادةً المقايضة الصحيحة، وهي المقايضة التي صُمّم EcoWeedNet ليحسّنها.

The EcoWeedNet paper reports 95.2% mAP@0.5 on the CottonWeedDet12 dataset with about 4.21% of YOLOv4's parameters and 6.59% of its GFLOPs, using two parameter-free attention modules (Khater et al., 2025). Whether a Lightweight model is good enough is always this pair of numbers: an accuracy metric next to a cost metric, never one alone.

تذكر ورقة EcoWeedNet دقة 95.2% في mAP@0.5 على مجموعة بيانات CottonWeedDet12 بنحو 4.21% من معاملات YOLOv4 و6.59% من GFLOPs الخاصة به، باستخدام وحدتي انتباه (attention modules) خاليتين من المعاملات (Khater et al., 2025). الحكم على ما إذا كان Lightweight model جيدًا بما يكفي هو دائمًا هذا الزوج من الأرقام: مقياس دقة بجانب مقياس تكلفة، وليس أحدهما وحده أبدًا.

What a GradCAM++ heatmap does and does not proveما تثبته خريطة حرارة GradCAM++ وما لا تثبته

The slide's Figure 5 lays GradCAM++ heatmaps from YOLO11n, YOLO12n and EcoWeedNet side by side on seedling images, and its caption says EcoWeedNet showed better emphasis and focus on weed-relevant regions. GradCAM++ computes a weighted combination of the positive partial derivatives of the last convolutional layer's feature maps with respect to a class score (Chattopadhyay et al., 2018). In plain terms it answers "which pixels pushed this score up". It does not answer "is this score right". A model can attend to the weed and still misclassify it, or attend to the soil and get lucky. The caption's claim is a qualitative observation about attention; the 95.2% is the quantitative claim about correctness, and they are different kinds of evidence.

يضع الشكل 5 في الشريحة خرائط حرارة GradCAM++ من YOLO11n وYOLO12n وEcoWeedNet جنبًا إلى جنب على صور الشتلات، ويقول تعليقه إن EcoWeedNet أظهر تركيزًا وإبرازًا أفضل للمناطق المتعلقة بالأعشاب الضارة. يحسب GradCAM++ تركيبة موزونة من المشتقات الجزئية الموجبة لخرائط الميزات (feature maps) في آخر طبقة التفافية بالنسبة إلى درجة فئة معينة (Chattopadhyay et al., 2018). بعبارة بسيطة، هو يجيب عن سؤال "أي البكسلات رفعت هذه الدرجة"، ولا يجيب عن سؤال "هل هذه الدرجة صحيحة". قد ينتبه النموذج إلى العشبة ومع ذلك يخطئ في تصنيفها، أو ينتبه إلى التربة ويصيب بالحظ. ادعاء التعليق ملاحظة نوعية عن الانتباه، أما 95.2% فهو الادعاء الكمّي عن الصواب، وهما نوعان مختلفان من الأدلة.

Robust: the same detector in the rainالمتانة: الكاشف نفسه تحت المطر

Slide 5 moves from a farm to a rainy sky. The task is to tell a UAV from a bird in weather that smears both into grey blobs. The baseline is YOLOv5-m, the medium class of an earlier family (21.2M parameters, 49.0B FLOPs in the Ultralytics YOLOv5 table). The instructor's model is YOLO-RAW, published in IEEE Transactions on Intelligent Transportation Systems and evaluated on three adverse test sets, rainy, additive Gaussian noise and motion blurred (Munir et al., 2025). The slide never expands RAW, and neither does the paper's title or abstract, so this course does not expand it either.

تنتقل الشريحة 5 من مزرعة إلى سماء ممطرة. المهمة هي تمييز طائرة مسيّرة UAV من طائر في طقس يلطّخ كليهما إلى كتل رمادية. خط الأساس هو YOLOv5-m، الفئة المتوسطة من عائلة أقدم (21.2M معامل و49.0B من FLOPs في جدول Ultralytics YOLOv5). ونموذج الأستاذ هو YOLO-RAW، المنشور في IEEE Transactions on Intelligent Transportation Systems، والمُقيَّم على ثلاث مجموعات اختبار صعبة: ممطرة، وبضوضاء غاوسية مضافة (additive Gaussian noise)، وبتشويش حركي (Munir et al., 2025). لا تفكّ الشريحة اختصار RAW، ولا يفكّه عنوان الورقة ولا ملخصها، لذا لا يفكّه هذا المقرر أيضًا.

SceneالمشهدObjectالجسمYOLOv5-mYOLOv5-mYOLO-RAWYOLO-RAW
Rain skyسماء ممطرةGull 1 (top left)النورس 1 (أعلى اليسار)no boxلا صندوقBird 0.50Bird 0.50
Rain skyسماء ممطرةGull 2 (centre)النورس 2 (المنتصف)UAV 0.29 (false positive)UAV 0.29 (إيجابية كاذبة)Bird 0.63Bird 0.63
Rain skyسماء ممطرةGull 3النورس 3no boxلا صندوقBird 0.54Bird 0.54
Rain skyسماء ممطرةGull 4النورس 4no boxلا صندوقBird 0.73Bird 0.73
Rain skyسماء ممطرةGull 5 (bottom)النورس 5 (الأسفل)Bird 0.35Bird 0.35Bird 0.37 (approximate)Bird 0.37 (تقريبي)
Rain fieldحقل ممطرReal droneطائرة مسيّرة حقيقيةUAV 0.90UAV 0.90UAV 0.93UAV 0.93
Every label printed on slide 5, with the same gull numbered the same way in both panelsكل عنوان مطبوع على الشريحة 5، مع ترقيم النورس نفسه بالرقم نفسه في اللوحتين

Read the second row first. YOLOv5-m looks at the centre gull and reports UAV 0.29: a False positive, and one that a drone-detection system would act on. Its only correct box is Bird 0.35. YOLO-RAW boxes all five birds with confidence scores from about 0.37 to 0.73 and reports no drone in the sky. In the bottom row, where a real drone flies over a field, both models find it, 0.90 against 0.93. The gain is not on the easy target; it is on the ambiguous ones.

اقرأ الصف الثاني أولًا. ينظر YOLOv5-m إلى النورس في المنتصف ويُبلغ عن UAV 0.29: وهذه False positive، أي إيجابية كاذبة، ومن النوع الذي سيتصرف بناءً عليه نظام كشف الطائرات المسيّرة. صندوقه الصحيح الوحيد هو Bird 0.35. أما YOLO-RAW فيحيط الطيور الخمسة كلها بصناديق بدرجات ثقة confidence scores تتراوح من نحو 0.37 إلى 0.73، ولا يُبلغ عن أي طائرة مسيّرة في السماء. وفي الصف الأخير، حيث تحلّق طائرة مسيّرة حقيقية فوق حقل، يجدها النموذجان كلاهما، 0.90 مقابل 0.93. المكسب ليس على الهدف السهل، بل على الأهداف الملتبسة.

A detector reports every box above a confidence threshold. Ultralytics' default is 0.25, and its documentation says raising it "can help reduce false positives" (Ultralytics predict mode). So a natural question is whether the baseline's mistake could be fixed by tuning the threshold instead of changing the model. Drag the slider and watch what each setting costs.

يُبلغ الكاشف عن كل صندوق فوق confidence threshold، أي عتبة الثقة. القيمة الافتراضية في Ultralytics هي 0.25، وتقول وثائقها إن رفعها "قد يساعد في تقليل الإيجابيات الكاذبة" (Ultralytics predict mode). لذا فالسؤال الطبيعي هو: هل يمكن إصلاح خطأ خط الأساس بضبط العتبة بدلًا من تغيير النموذج؟ اسحب المنزلق وراقب ما يكلّفه كل إعداد.

SimulatorمحاكيConfidence threshold on the slide 5 sceneحد الثقة على مشهد الشريحة 5
Sceneالمشهد
0.25
YOLOv5-m
UAV 0.29Bird 0.35
YOLO-RAW
Bird 0.50Bird 0.63Bird 0.54Bird 0.73Bird 0.37~
ModelShownTPFPFNPrecisionRecall
YOLOv5-m21140.500.20
YOLO-RAW55001.001.00

At the default 0.25 YOLOv5-m reports a false UAV at 0.29 and one bird; YOLO-RAW reports all five birds and no false positives.عند القيمة الافتراضية 0.25 يبلّغ YOLOv5-m عن طائرة مسيّرة (UAV) خاطئة بثقة 0.29 وعن طائر واحد، بينما يبلّغ YOLO-RAW عن الطيور الخمسة كلها دون أي إيجابيات كاذبة.

Boxes and confidences are the ones printed on slide 5; the fifth YOLO-RAW label is partly occluded and marked ~. Teal boxes match the true class, light boxes do not. Ground truth is 5 birds.الصناديق ودرجات الثقة هي المطبوعة على الشريحة 5، والتسمية الخامسة عند YOLO-RAW محجوبة جزئيًا ولذلك عُلّمت بالرمز ~. الصناديق الخضراء المزرقة تطابق الفئة الحقيقية، والصناديق الفاتحة لا تطابقها. الحقيقة الأرضية (ground truth) هي 5 طيور.

At 0.30 the false UAV disappears and YOLOv5-m loses nothing else, but it still sees one bird in five. At 0.60 YOLOv5-m already reports nothing and YOLO-RAW has lost three of its five correct birds. The threshold only slices whatever confidence mass the model produced. YOLO-RAW is better because it moved that mass onto the right classes in the first place, not because it was thresholded differently.

عند 0.30 تختفي الطائرة المسيّرة الوهمية ولا يخسر YOLOv5-m شيئًا آخر، لكنه لا يزال لا يرى إلا طائرًا واحدًا من خمسة. وعند 0.60 لا يُبلغ YOLOv5-m عن أي شيء أصلًا، ويكون YOLO-RAW قد خسر ثلاثة من طيوره الخمسة الصحيحة. العتبة تقطع فقط كتلة الثقة التي أنتجها النموذج، أيًّا كانت. YOLO-RAW أفضل لأنه نقل تلك الكتلة إلى الفئات الصحيحة من البداية، لا لأنه طُبّقت عليه عتبة مختلفة.

precision=TPTP+FP,recall=TPTP+FN\text{precision} = \frac{TP}{TP + FP}, \qquad \text{recall} = \frac{TP}{TP + FN}
The two numbers a threshold trades against each otherالرقمان اللذان يقايض بينهما الحد (threshold)

Recall

In the slide 5 rain scene, which model produced a false positive, what was it, and at what confidence?في مشهد المطر في الشريحة 5، أي نموذج أنتج إيجابية كاذبة، وما هي، وبأي درجة ثقة؟

YOLOv5-m labelled a gull as UAV 0.29. YOLO-RAW labelled the same bird Bird 0.63.
سمّى YOLOv5-m نورسًا UAV 0.29. وسمّى YOLO-RAW الطائر نفسه Bird 0.63.

Recall

What does a GradCAM++ heatmap show and what does it not show?ماذا تُظهر خريطة حرارة GradCAM++ وماذا لا تُظهر؟

Where in the image the positive gradients of the class score concentrated, that is which regions drove the score. It does not show whether the prediction is correct; that needs mAP, precision or recall on held-out data.
تُظهر أين تركّزت التدرجات الموجبة لدرجة الفئة في الصورة، أي المناطق التي دفعت الدرجة. ولا تُظهر ما إذا كان التنبؤ صحيحًا، فذلك يحتاج إلى mAP أو precision أو recall على بيانات محجوزة.

Recall

Roughly how many times fewer parameters and FLOPs does YOLO11n have than YOLO11m, and at what mAP cost?كم مرة تقريبًا يقلّ عدد المعاملات وFLOPs في YOLO11n عنه في YOLO11m، وبأي تكلفة في mAP؟

About 7.7x fewer parameters (2.6M against 20.1M) and 10.5x fewer FLOPs (6.5B against 68.1B), for 12.0 mAP50-95 points (39.5 against 51.5).
معاملات أقل بنحو 7.7x (2.6M مقابل 20.1M) وFLOPs أقل بـ 10.5x (6.5B مقابل 68.1B)، مقابل 12.0 نقطة في mAP50-95 (39.5 مقابل 51.5).

Quick checkاختبار سريع

Why would a farm robot's designer pick a nano YOLO variant over a medium one?لماذا يختار مصمم روبوت زراعي نسخة YOLO النانوية بدلًا من النسخة المتوسطة؟

Quick checkاختبار سريع

In the slide 5 rain scene, which model labelled a gull as a UAV?في مشهد المطر في الشريحة 5، أي نموذج سمّى نورسًا طائرة مسيّرة UAV؟

Quick checkاختبار سريع

What does a GradCAM++ heatmap over a seedling image show?ماذا تُظهر خريطة حرارة GradCAM++ فوق صورة شتلة؟

A home or factory gateway forwards packets from hundreds of Internet of Things devices, and it has a fraction of a phone's compute. Somewhere in that box a decision has to be made, per packet or per flow, about whether the traffic is an attack. That is an Intrusion detection system, and slide 6 is the first page of the instructor's PNet-IDS paper, a lightweight and generalizable Convolutional neural network for intrusion detection in the Internet of Things.

بوابة منزلية أو في مصنع تمرّر الحزم من مئات أجهزة Internet of Things، ولديها جزء صغير من قدرة الهاتف الحسابية. في مكان ما داخل ذلك الصندوق يجب اتخاذ قرار، لكل حزمة أو لكل تدفق (flow)، بشأن ما إذا كانت حركة البيانات هجومًا. هذا هو Intrusion detection system، أي نظام كشف التسلل، والشريحة 6 هي الصفحة الأولى من ورقة الأستاذ PNet-IDS، وهي شبكة CNN خفيفة وقابلة للتعميم لكشف التسلل في إنترنت الأشياء.

The paper as printed on slide 6الورقة كما طُبعت في الشريحة 6

Titleالعنوان
PNet-IDS: A Lightweight and Generalizable Convolutional Neural Network for Intrusion Detection in Internet of ThingsPNet-IDS: A Lightweight and Generalizable Convolutional Neural Network for Intrusion Detection in Internet of Things
Authorsالمؤلفون
Auwal Sani Iliyasu, Abdul Jabbar Siddiqui (Member, IEEE), Houbing Song (Fellow, IEEE), Fahad Jibrin AbduAuwal Sani Iliyasu، وAbdul Jabbar Siddiqui (عضو IEEE)، وHoubing Song (زميل IEEE Fellow)، وFahad Jibrin Abdu
Venueجهة النشر
IEEE Access, open access research articleIEEE Access، مقالة بحثية مفتوحة الوصول
Timelineالجدول الزمني
Received 6 May 2025, accepted 22 May 2025, published 2 June 2025, current version 19 June 2025استُلمت في 6 May 2025، وقُبلت في 22 May 2025، ونُشرت في 2 June 2025، والنسخة الحالية بتاريخ 19 June 2025
DOI
10.1109/ACCESS.2025.357570510.1109/ACCESS.2025.3575705
Fundingالتمويل
KFUPM Deanship of Research and the IRC for Intelligent Secure Systems, grant INSS2309عمادة البحث العلمي في KFUPM ومركز البحث المتعدد التخصصات للأنظمة الذكية الآمنة (IRC for Intelligent Secure Systems)، المنحة INSS2309

Why an intrusion detector must be lightweightلماذا يجب أن يكون كاشف التسلل خفيفًا

The abstract states the problem in one sentence: deep learning detectors perform well, but their "high computational and storage requirements make these impractical for most IoT devices" (Iliyasu et al., 2025). NIST's guide to intrusion detection and prevention lists four classes of system, and the relevant one here is network-based: a sensor that watches traffic on a segment and analyses it for suspicious activity (NIST SP 800-94). On an IoT gateway that sensor is the gateway itself, so the model competes for the same small CPU that forwards the packets, and it has to keep up with the link, which network engineers call running at line rate.

يذكر الملخص المشكلة في جملة واحدة: كواشف التعلّم العميق تؤدي جيدًا، لكن "متطلباتها العالية من الحوسبة والتخزين تجعلها غير عملية لمعظم أجهزة IoT" (Iliyasu et al., 2025). يسرد دليل NIST لكشف التسلل ومنعه أربعة أصناف من الأنظمة، والصنف المعني هنا هو القائم على الشبكة (network-based): حساس يراقب حركة البيانات على مقطع من الشبكة ويحللها بحثًا عن نشاط مريب (NIST SP 800-94). على بوابة IoT يكون ذلك الحساس هو البوابة نفسها، فيتنافس النموذج على المعالج الصغير نفسه الذي يمرّر الحزم، ويجب أن يواكب سرعة الوصلة، وهو ما يسميه مهندسو الشبكات العمل بـ line rate.

Worked exampleمثال محلول

Line-rate arithmetic on a gateway (illustrative numbers)حساب line rate على بوابة (أرقام توضيحية)

  1. Packets per secondالحزم في الثانية

    A 100 Mbit/s link carrying 500-byte packets delivers 100×106/(500×8)=25,000100 \times 10^{6} / (500 \times 8) = 25{,}000 packets per second. A flow-level IDS aggregates packets before scoring, so this per-packet figure is the upper bound on inspection cost.
    وصلة بسرعة 100 Mbit/s تحمل حزمًا بحجم 500 بايت توصل 100×106/(500×8)=25,000100 \times 10^{6} / (500 \times 8) = 25{,}000 حزمة في الثانية. نظام IDS على مستوى التدفق يجمّع الحزم قبل تقييمها، لذا فهذا الرقم لكل حزمة هو الحد الأعلى لتكلفة الفحص.
  2. Time budget per packetالميزانية الزمنية لكل حزمة

    1 / 25,000 = 40 µs. Any per-packet decision slower than that falls behind the link.
    1 / 25,000 = 40 µs. أي قرار لكل حزمة أبطأ من ذلك يتخلّف عن الوصلة.
  3. A heavy modelنموذج ثقيل

    If one decision needs 10 MFLOPs and the gateway CPU sustains 1 GFLOP/s, one decision takes 10 ms, about 250x too slow.
    إذا احتاج القرار الواحد إلى 10 MFLOPs وكان معالج البوابة يحافظ على 1 GFLOP/s، فإن القرار الواحد يستغرق 10 ms، أي أبطأ من اللازم بنحو 250x.
  4. A light modelنموذج خفيف

    At 0.02 MFLOPs per decision the same CPU answers in 20 µs, inside the budget.
    بـ 0.02 MFLOPs لكل قرار، يجيب المعالج نفسه في 20 µs، أي داخل الميزانية.
  5. Resultالنتيجة

    The deadline is set by the link, not by the designer. Reducing FLOPs is what moves a detector from impractical to deployable, which is why the paper counts FLOPs, parameters and model size as first-class results.
    المهلة تحددها الوصلة، لا المصمم. تقليل FLOPs هو ما ينقل الكاشف من غير عملي إلى قابل للنشر، ولهذا تعدّ الورقة FLOPs وعدد parameters وحجم النموذج نتائج من الدرجة الأولى.

That is the Efficient leg. The Robust leg is the word generalizable in the title. An IDS trained on one dataset meets, in deployment, traffic and attacks it never saw, a distribution shift. PNet-IDS addresses this with a knowledge distillation framework, in which a small student network is trained to reproduce a larger teacher, and reports that robustness against distribution shifts in network traffic is enhanced as a result. The benchmarks are BoT-IoT and CIC-IDS2017, and the claimed wins are reduced parameter count, reduced FLOPs and reduced model size while maintaining high accuracy and precision (Iliyasu et al., 2025).

هذه رِجل الكفاءة Efficient. أما رِجل المتانة Robust فهي كلمة generalizable في العنوان. نظام IDS المدرَّب على مجموعة بيانات واحدة يواجه عند النشر حركة بيانات وهجمات لم يرها قط، أي distribution shift، انزياح التوزيع. يعالج PNet-IDS ذلك بإطار knowledge distillation، حيث تُدرَّب شبكة طالبة صغيرة على محاكاة شبكة معلّمة أكبر، ويذكر أن المتانة أمام انزياحات التوزيع في حركة الشبكة تتحسن نتيجة لذلك. معايير القياس هي BoT-IoT وCIC-IDS2017، والمكاسب المُدّعاة هي تقليل عدد المعاملات وتقليل FLOPs وتقليل حجم النموذج مع الحفاظ على دقة accuracy وprecision عاليتين (Iliyasu et al., 2025).

Recall

Give two reasons an IoT intrusion detector must be lightweight, and say what generalizable means in PNet-IDS.اذكر سببين يوجبان أن يكون كاشف التسلل في IoT خفيفًا، وقل ما معنى generalizable في PNet-IDS.

It runs on gateways with little compute and storage, and it must decide at line rate, between packet arrivals. Generalizable means keeping accuracy under distribution shift, on traffic or attacks unlike the training set, which PNet-IDS supports with knowledge distillation.
يعمل على بوابات ذات حوسبة وتخزين قليلين، ويجب أن يقرر بسرعة line rate، بين وصول حزمة وأخرى. وقابل للتعميم يعني الحفاظ على الدقة تحت انزياح التوزيع، على حركة بيانات أو هجمات لا تشبه مجموعة التدريب، وهو ما يدعمه PNet-IDS بتقطير المعرفة knowledge distillation.

Quick checkاختبار سريع

Why must an IoT intrusion detector such as PNet-IDS be lightweight?لماذا يجب أن يكون كاشف التسلل في IoT مثل PNet-IDS خفيفًا؟

The last two slides are photographs with no captions, and both show a decision that has to be made before the world moves on. Slide 7 pairs a low-speed autonomous shuttle with a pedestrian crossing in front of it and a schematic of a T-intersection where a red arrow, a vehicle turning left, crosses a blue arrow, a pedestrian in the crosswalk. Slide 8 shows grayscale undercarriage images of rail cars: one component circled as defective or missing, and a crack pulled out in a zoom box.

الشريحتان الأخيرتان صورتان فوتوغرافيتان بلا تعليقات، وكلتاهما تُظهر قرارًا يجب اتخاذه قبل أن يتحرك العالم. تجمع الشريحة 7 بين مركبة ذاتية القيادة منخفضة السرعة (shuttle) يعبر أمامها أحد المشاة، ومخطط لتقاطع على شكل T يتقاطع فيه سهم أحمر، وهو مركبة تنعطف يسارًا، مع سهم أزرق، وهو أحد المشاة على ممر العبور. وتعرض الشريحة 8 صورًا رمادية لأسفل عربات قطارات: مكوّن واحد محاط بدائرة على أنه معيب أو مفقود، وشقّ مكبَّر في مربع تكبير.

The left-turn pedestrian conflictتعارض الانعطاف يسارًا مع المشاة

The schematic is the left-turn pedestrian conflict, a named pattern in Intelligent transportation systems safety analysis. A left-turning driver scans for oncoming vehicles, accepts a gap, and turns into a crosswalk where a pedestrian is already crossing. FHWA research on left-turn phasing found that protected phasing reduced vehicle-to-vehicle injury crashes but did not significantly reduce vehicle-to-pedestrian crashes, and that under permissive phasing the turning driver must pick a gap in oncoming traffic and yield to the crosswalk at the same time, which prior studies flag as a strong conflict potential (FHWA, HRT-18-044). For an autonomous shuttle the problem is the same one the human driver has, and the detector that watches the crosswalk must answer before the vehicle enters it.

المخطط هو left-turn pedestrian conflict، أي تعارض الانعطاف يسارًا مع المشاة، وهو نمط معروف بالاسم في تحليل السلامة ضمن Intelligent transportation systems. السائق المنعطف يسارًا يبحث عن المركبات القادمة من الاتجاه المقابل، ويقبل فجوة، ثم ينعطف إلى ممر عبور يكون فيه أحد المشاة يعبر بالفعل. وجدت أبحاث FHWA حول مراحل إشارات الانعطاف يسارًا أن المرحلة المحمية (protected phasing) قلّلت حوادث الإصابات بين المركبات، لكنها لم تقلل بشكل ملحوظ حوادث المركبات مع المشاة، وأنه في المرحلة المسموحة (permissive phasing) يجب على السائق المنعطف أن يختار فجوة في حركة المرور المقابلة وأن يفسح الطريق لممر العبور في الوقت نفسه، وهو ما تعدّه دراسات سابقة احتمال تعارض قويًا (FHWA, HRT-18-044). بالنسبة إلى المركبة الذاتية، المشكلة هي نفسها التي يواجهها السائق البشري، والكاشف الذي يراقب ممر العبور يجب أن يجيب قبل أن تدخله المركبة.

Looking under the trainالنظر أسفل القطار

Slide 8 belongs to Automated visual inspection of rolling stock: cameras placed by the track or under it photograph each wagon as it passes, and a model flags anything that does not look like an intact component. The instructor reviewed exactly this field for Transport Canada while at NRC (Siddiqui, Mammeri and Liu, 2021). The slide itself carries no citation, so the images are described here as an example of the problem class, not attributed to a particular system.

تنتمي الشريحة 8 إلى Automated visual inspection لـ rolling stock، أي عربات القطارات: كاميرات موضوعة بجانب السكة أو تحتها تصوّر كل عربة أثناء مرورها، ونموذج يُعلِّم أي شيء لا يبدو مكوّنًا سليمًا. وقد راجع الأستاذ هذا المجال تحديدًا لصالح Transport Canada أثناء عمله في NRC (Siddiqui, Mammeri and Liu, 2021). الشريحة نفسها لا تحمل أي مرجع، لذا توصف الصور هنا على أنها مثال على صنف المشكلة، لا منسوبة إلى نظام بعينه.

A wayside camera sweeps a passing wagon, boxes a crack, and pulls it out into a zoom for the inspector.كاميرا بجانب السكة تمسح عربة مارّة، وتحيط شقًّا بصندوق، وتكبّره في نافذة تكبير للمفتّش.

Physics sets the deadlineالفيزياء تحدد المهلة

What unites the shuttle and the wagon is that the time available for Inference is not a design preference. It is set by how fast the scene changes. Satyanarayanan's remark that "the speed of light is an obvious physical limit on latency" (Satyanarayanan, 2017) is the reason a cloud round trip cannot be the answer here: the distance the vehicle covers during the latency of the reply is the safety margin lost.

ما يجمع المركبة الذاتية والعربة هو أن الوقت المتاح لـ Inference ليس تفضيلًا تصميميًا، بل تحدده سرعة تغيّر المشهد. ملاحظة Satyanarayanan بأن "سرعة الضوء حدّ فيزيائي واضح على زمن الاستجابة" (Satyanarayanan, 2017) هي السبب في أن رحلة الذهاب والإياب إلى السحابة لا يمكن أن تكون الحل هنا: المسافة التي تقطعها المركبة خلال latency الرد هي هامش السلامة المفقود.

Worked exampleمثال محلول

Metres lost per millisecond of latencyالأمتار المفقودة لكل ميلي ثانية من التأخير

  1. The shuttleالمركبة الذاتية

    At 10 m/s a vehicle covers 1 m every 100 ms. A 200 ms cloud round trip is 2 m of travel before the detector's answer arrives.
    بسرعة 10 m/s تقطع المركبة 1 m كل 100 ms. رحلة ذهاب وإياب إلى السحابة تستغرق 200 ms تعني 2 m من الحركة قبل أن تصل إجابة الكاشف.
  2. The wagonالعربة

    A wagon passing a wayside camera at 15 m/s moves 1.5 m every 100 ms. At 30 frames per second the model has about 33 ms per frame before the next one arrives and the wagon has moved another 0.5 m.
    عربة تمر بكاميرا بجانب السكة بسرعة 15 m/s تتحرك 1.5 m كل 100 ms. وعند 30 إطارًا في الثانية يكون لدى النموذج نحو 33 ms لكل إطار قبل وصول الإطار التالي، وتكون العربة قد تحركت 0.5 m أخرى.
  3. Resultالنتيجة

    In both cases the budget is tens of milliseconds, and the network alone can spend that. The model runs on an Embedded system next to the camera, which means it must be small enough to fit there.
    في الحالتين الميزانية عشرات من الميلي ثانية، والشبكة وحدها قد تستهلكها. يعمل النموذج على Embedded system بجوار الكاميرا، مما يعني أنه يجب أن يكون صغيرًا بما يكفي ليتّسع هناك.
ScenarioالسيناريوSensorالحساسDecisionالقرارDeadline driverما يحدد المهلةCost of a missتكلفة الإخفاق
Shuttle at a T-intersectionمركبة ذاتية القيادة (shuttle) عند تقاطع على شكل TForward camera on the vehicleكاميرا أمامية على المركبةYield, brake or proceed on a left turnإفساح الطريق أو الكبح أو المتابعة عند الانعطاف يسارًاVehicle and pedestrian speedسرعة المركبة وسرعة المشاةA pedestrian is struckصدم أحد المشاة
Rolling-stock undercarriageأسفل عربات القطار (rolling stock)Wayside or under-track cameraكاميرا بجانب السكة أو تحتهاFlag a cracked or missing componentالإبلاغ عن مكوّن متشقق أو مفقودTrain speed past the cameraسرعة القطار أثناء مروره بالكاميراA defect leaves the yard undetectedخروج عيب من الساحة دون اكتشافه
Two safety-critical edge inference problemsمسألتا استدلال على الطرف حرجتان للسلامة

Recall

Why is a cloud round trip unacceptable for the shuttle and the wagon inspection, in one sentence each?لماذا تُعدّ رحلة الذهاب والإياب إلى السحابة غير مقبولة للمركبة الذاتية ولفحص العربة، في جملة واحدة لكل منهما؟

The shuttle moves about 2 m during a 200 ms round trip, which is the margin between yielding and striking a pedestrian. The wagon moves out of the camera's view within tens of milliseconds, so the frame must be analysed before the next one arrives.
تتحرك المركبة الذاتية نحو 2 m خلال رحلة ذهاب وإياب مدتها 200 ms، وهذا هو الهامش بين إفساح الطريق ودهس أحد المشاة. وتخرج العربة من مجال رؤية الكاميرا خلال عشرات من الميلي ثانية، لذا يجب تحليل الإطار قبل وصول الإطار التالي.

Recapالخلاصة

If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا

  • SERV: Secure (adversarial ML, IDS), Efficient (compression, nano models), Robust (rain, noise, blur, shift), Vision.SERV: آمن Secure (تعلّم الآلة العدائي adversarial ML، وأنظمة كشف التسلل IDS)، فعّال Efficient (الضغط، والنماذج النانوية nano)، متين Robust (المطر، والضوضاء، والتشويش الحركي blur، والانزياح shift)، رؤية Vision.
  • Inspection rigs carry RGB, thermal, LiDAR and GPS; a UAV's weight, battery and compute cap what the on-board model can be.تحمل منصات الفحص كاميرا RGB وكاميرا حرارية وLiDAR وGPS، ووزن الطائرة المسيّرة وبطاريتها وقدرتها الحسابية هي ما يحدّ النموذج الذي يمكن تشغيله على متنها.
  • Analyze near the sensor, ship the extracted information: 12,000 1080p streams already need 100 Gbit/s into a cloud.حلّل البيانات قرب الحساس، وأرسل المعلومات المستخرجة فقط: 12,000 بثّ بدقة 1080p تحتاج وحدها إلى 100 Gbit/s داخلة إلى السحابة.
  • A nano YOLO is the smallest scale: YOLO11n has 2.6M parameters and 6.5B FLOPs against 20.1M and 68.1B for YOLO11m, for 12 mAP points.YOLO النانوي هو أصغر حجم: لدى YOLO11n عدد 2.6M من المعاملات و6.5B من FLOPs مقابل 20.1M و68.1B لدى YOLO11m، والثمن 12 نقطة mAP.
  • EcoWeedNet: 95.2% mAP@0.5 on CottonWeedDet12 with about 4.21% of YOLOv4's parameters and 6.59% of its GFLOPs.EcoWeedNet: دقة 95.2% mAP@0.5 على CottonWeedDet12 بنحو 4.21% من معاملات YOLOv4 و6.59% من GFLOPs الخاصة به.
  • GradCAM++ shows where the class score's evidence sits; it does not certify correctness.يُظهر GradCAM++ أين يقع الدليل الذي رفع درجة الفئة، لكنه لا يشهد بصحة التنبؤ.
  • YOLOv5-m produced a false UAV at 0.29 in rain; YOLO-RAW boxed the birds at 0.37 to 0.73. A threshold slices confidence mass; a better model moves it. RAW is not expanded.أنتج YOLOv5-m طائرة مسيّرة UAV وهمية بثقة 0.29 في المطر، بينما أحاط YOLO-RAW الطيور بصناديق بثقة من 0.37 إلى 0.73. العتبة تقطع كتلة الثقة الموجودة، أما النموذج الأفضل فينقلها. اختصار RAW غير مفكوك.
  • PNet-IDS cuts FLOPs, parameters and size so an IoT gateway can detect intrusions in real time, and uses knowledge distillation to hold up under traffic distribution shift.يخفّض PNet-IDS عدد FLOPs والمعاملات وحجم النموذج كي تكشف بوابة IoT التسلل في الزمن الحقيقي، ويستخدم تقطير المعرفة knowledge distillation ليصمد أمام انزياح توزيع حركة الشبكة.
  • Shuttle intersections and undercarriage inspection are deadline-bound: distance travelled per millisecond of latency decides where inference runs.تقاطعات المركبة الذاتية shuttle وفحص أسفل عربات القطار مقيّدة بمهلة زمنية: المسافة المقطوعة في كل ميلي ثانية من التأخير هي ما يحدد أين يجري الاستدلال.

Sourcesالمصادر

Part 02: Course takeaways and getting startedمخرجات المقرر والبداية

What the course promises you will be able to do, the five pillars of efficient deep learning on constrained devices, and what to do in week one.ما الذي يعدك المقرر بأن تصبح قادرًا عليه، والركائز الخمس للتعلم العميق الكفء على الأجهزة المحدودة، وما الذي تفعله في الأسبوع الأول.

3 concepts3 مفاهيم, ، slides 9-12الشرائح 9-12

Why this part mattersلماذا يهمّ هذا الجزء

This part is the course contract. Every later lecture, from efficiency metrics through pruning, quantization, architecture search and deployment, is one turn of a five-step loop that slide 11 draws as a neural network funnelling down into a small development board.

Your exams and your research project will ask you to do two things with that loop: place a technique in it (is knowledge distillation an accelerate step or a compare step?), and compute whether a given model fits a given device. Both start here. The part also covers what the instructor asks of you in week one, and what the deck deliberately leaves to Blackboard.

هذا الجزء هو عقد المقرر. كل محاضرة لاحقة، من مقاييس الكفاءة مرورًا بالتقليم (pruning) والتكميم (quantization) والبحث عن المعماريات وصولًا إلى النشر، هي دورة واحدة في حلقة من خمس خطوات ترسمها الشريحة 11 على هيئة شبكة عصبية تنساب كالقمع نزولًا إلى لوحة تطوير صغيرة.

ستطلب منك الامتحانات ومشروعك البحثي أمرين مع هذه الحلقة: أن تضع تقنية ما في موضعها منها (هل تقطير المعرفة knowledge distillation خطوة تسريع أم خطوة مقارنة؟)، وأن تحسب هل يتسع نموذج معين في جهاز معين. كلا الأمرين يبدأ من هنا. ويغطي الجزء أيضًا ما يطلبه منك المحاضر في الأسبوع الأول، وما تتركه الشرائح عمدًا لـBlackboard.

By the end you canفي نهاية هذا الجزء ستستطيع

  1. State the five course takeaways and reorder them as a measure, optimize, compare, explore, deploy loop.تذكر مخرجات المقرر الخمس وتعيد ترتيبها في صورة حلقة: قِس، حسّن، قارن، استكشف، انشر.
  2. Compute a model's weight size from parameter count and bit width, and judge whether it fits a device tier.تحسب حجم أوزان النموذج من عدد المعاملات وعرض البت، وتحكم هل يتسع في فئة جهاز معينة.
  3. Explain why accuracy alone cannot select a model for a constrained device.تشرح لماذا لا تكفي الدقة وحدها لاختيار نموذج لجهاز محدود الموارد.
  4. Distinguish on-device inference from on-device training by their memory needs.تميّز بين الاستدلال على الجهاز والتدريب على الجهاز من حيث احتياجات الذاكرة.
  5. Set up a week-one plan: survey, prerequisites check, device tier, candidate model, metrics log.تضع خطة الأسبوع الأول: الاستبيان، والتحقق من المتطلبات المسبقة، وفئة الجهاز، والنموذج المرشح، وسجل المقاييس.

On the first evening each student says three things out loud: their name, their educational background (previous studies), and their work background (current or previous work, industry or occupation). Then everyone opens the Pre-course survey at https://forms.cloud.microsoft/r/5ssu8gkcS9, also printed as a QR code on slide 10, and answers questions about background, skills and expectations.

في الأمسية الأولى يذكر كل طالب ثلاثة أشياء بصوت مسموع: اسمه، وخلفيته التعليمية (دراسته السابقة)، وخلفيته العملية (عمله الحالي أو السابق، أو القطاع، أو المهنة). ثم يفتح الجميع pre-course survey (استبيان ما قبل المقرر) على الرابط https://forms.cloud.microsoft/r/5ssu8gkcS9، المطبوع أيضًا كرمز QR في الشريحة 10، ويجيبون عن أسئلة حول الخلفية والمهارات والتوقعات.

It is tempting to file both under administration, but they serve the same purpose as takeaway 1 later in this part: you cannot tune what you have not measured. A graduate course on efficient deep learning draws people from computer engineering, electrical engineering, computer science and industry. Some have trained convolutional networks for years and never flashed a microcontroller; others write firmware for embedded systems daily and have never opened PyTorch. The instructor uses the room's answers to set depth and pacing, so an honest answer about a gap is worth more to you than an impressive one.

من المغري أن تصنّف الأمرين تحت بند الإجراءات الإدارية، لكنهما يخدمان الغرض نفسه الذي يخدمه المُخرج 1 لاحقًا في هذا الجزء: لا يمكنك ضبط ما لم تقِسه. مقرر دراسات عليا في التعلم العميق الكفء يجمع طلابًا من هندسة الحاسب، والهندسة الكهربائية، وعلوم الحاسب، والصناعة. بعضهم درّب شبكات التفاف لسنوات ولم يبرمج microcontroller (متحكمًا دقيقًا) قط، وآخرون يكتبون البرمجيات الثابتة (firmware) لـembedded systems (الأنظمة المدمجة) يوميًا ولم يفتحوا PyTorch قط. يستخدم المحاضر إجابات القاعة لتحديد العمق والإيقاع، لذا فإن إجابة صادقة عن نقص لديك أنفع لك من إجابة مبهرة.

What is worth refreshing before week twoما يستحق المراجعة قبل الأسبوع الثاني

The deck does not list prerequisites, so treat the following as a hedged suggestion drawn from what the course will ask you to do rather than as a slide claim. The topics ahead (compression, pruning, quantization, deployment to boards) match the syllabus of MIT's 6.5940 TinyML and Efficient Deep Learning Computing, which lists an introductory machine learning subject and a computation structures subject as its prerequisites. Translated to tools, four skills will carry most of the weight.

لا تذكر الشرائح أي متطلبات مسبقة، لذا تعامل مع ما يلي كاقتراح حذر مستنتج مما سيطلبه منك المقرر، لا كادعاء ورد في الشرائح. الموضوعات القادمة (الضغط، وpruning(التقليم)، وquantization (التكميم)، وdeployment (النشر) على اللوحات) تطابق الخطة الدراسية لمقرر MIT 6.5940 TinyML and Efficient Deep Learning Computing، الذي يشترط مقررًا تمهيديًا في تعلم الآلة ومقررًا في بنى الحوسبة (computation structures). وإذا ترجمنا ذلك إلى أدوات، فإن أربع مهارات ستحمل معظم العبء.

Skills that will probably matter, and whyمهارات يُرجَّح أن تكون مهمة، ولماذا

Python
Every framework, script and notebook in efficient deep learning assumes it. The PyTorch beginner tutorial itself assumes basic familiarity with Python.كل إطار عمل وكل سكربت وكل دفتر notebook في التعلم العميق الكفء يفترض معرفتها. ودرس المبتدئين في PyTorch نفسه يفترض إلمامًا أساسيًا بـPython.
PyTorch
The compression and quantization literature (Deep Compression, MCUNet, TinyTL) ships PyTorch code; you will read and modify such code, not write frameworks.أدبيات الضغط والتكميم (Deep Compression وMCUNet وTinyTL) تنشر شيفرتها بـPyTorch؛ وستقرأ مثل هذه الشيفرة وتعدّلها، لا أن تكتب أطر عمل.
Basic CNNsأساسيات الشبكات الالتفافية (CNNs)
Convolutions, pooling and fully connected layers are what get pruned and quantized. The free Deep Learning book by Goodfellow, Bengio and Courville covers them.طبقات الالتفاف (convolution) والتجميع (pooling) والطبقات المتصلة كليًا هي ما يُقلَّم ويُكمَّم. ويغطيها كتاب Deep Learning المجاني لـGoodfellow وBengio وCourville.
C for microcontrollersلغة C للمتحكمات الدقيقة
LiteRT for Microcontrollers is written in C++ 17 for 32-bit platforms with no operating system, so deploying to a board means touching C or C++ code.LiteRT for Microcontrollers مكتوب بـC++ 17 لمنصات 32-bit بلا نظام تشغيل، لذا فالنشر على لوحة يعني التعامل مع شيفرة C أو C++.

None of these needs to be deep on day one. If you can train a small classifier in PyTorch, explain what a convolution computes, and compile and flash a blinking-LED program in C, you can follow the first weeks and fill in the rest as the loop demands it.

لا يلزم أن تتعمق في أي منها من اليوم الأول. إذا كنت تستطيع تدريب مصنّف صغير في PyTorch، وشرح ما يحسبه الالتفاف (convolution)، وترجمة برنامج يُومض LED بلغة C وتحميله على اللوحة، فبإمكانك متابعة الأسابيع الأولى واستكمال الباقي كلما احتاجت إليه الحلقة.

Recall

What three things does the icebreaker ask each student to share?ما الأشياء الثلاثة التي يطلب التعارف من كل طالب أن يذكرها؟

Name, educational background (previous studies), and work background (current or previous work, industry or occupation).
الاسم، والخلفية التعليمية (الدراسة السابقة)، والخلفية العملية (العمل الحالي أو السابق، أو القطاع، أو المهنة).

Take a small image classifier with 3 million parameters, trained in PyTorch and saved in 32-bit floating point. Its weights alone occupy 12 MB. A Raspberry Pi Pico has 2 MB of flash and 264 KB of SRAM. The model does not fit, and no amount of accuracy changes that. Everything this course teaches is what you do next.

خذ مصنّف صور صغيرًا فيه 3 million parameters (معامل)، دُرّب في PyTorch وحُفظ بصيغة الفاصلة العائمة 32-bit. أوزانه وحدها تشغل 12 MB. ولوحة Raspberry Pi Pico فيها 2 MB من flash (ذاكرة الفلاش) و264 KB من SRAM. النموذج لا يتسع، ولن تغيّر أي دقة هذه الحقيقة. كل ما يعلّمه هذا المقرر هو ما تفعله بعد ذلك.

Slide 11 states the promise as five takeaways. You will know the key Efficiency metrics for deep learning computing. You will understand how to speed up Inference and Training of neural networks on resource-constrained platforms. You will analyse the tradeoffs between different optimization techniques. You will be aware of recent research trends and industry practice. And you will get hands-on experience compressing and implementing deep learning models on resource-constrained devices. The infographic relabels the same five as Measure efficiency, Accelerate, Analyse trade-offs, Track the frontier, and Build and deploy, with a five-word footer: Measure, Optimize, Compare, Explore, Deploy.

تعرض الشريحة 11 وعد المقرر في خمس مخرجات. ستعرف أهم efficiency metrics (مقاييس الكفاءة) في حوسبة التعلم العميق. وستفهم كيف تسرّع inference (الاستدلال) وtraining (التدريب) للشبكات العصبية على منصات resource-constrained (محدودة الموارد). وستحلل tradeoffs (المفاضلات) بين تقنيات التحسين المختلفة. وستكون على اطلاع على اتجاهات البحث الحديثة وممارسات الصناعة. وستكتسب خبرة عملية في compressing (ضغط) نماذج التعلم العميق وتنفيذها على أجهزة محدودة الموارد. ويعيد الرسم التوضيحي تسمية المخرجات الخمس نفسها إلى Measure efficiency وAccelerate وAnalyse trade-offs وTrack the frontier وBuild and deploy، مع تذييل من خمس كلمات: Measure, Optimize, Compare, Explore, Deploy.

A network funnels into one spine; the five pillars light up in order, the board at the bottom powers on, and a loop returns to pillar 1شبكة تنساب كالقمع في عمود فقري واحد؛ تضيء الركائز الخمس بالترتيب، وتعمل اللوحة في الأسفل، ثم تعود حلقة إلى الركيزة 1

Read the five as a loop, not a listاقرأ الخمس حلقةً لا قائمة

The order on the slide is not arbitrary. It is the order in which you actually work. You measure a baseline: size, memory, compute, latency, energy. You apply one optimization, say pruning. You compare the new numbers against the baseline and note what the step cost in accuracy. You look to the research literature and to industry for the next technique. You deploy on the real board to check that the paper numbers survive contact with hardware, because measured latency and energy routinely differ from analytical estimates. Then you measure again, and the loop turns.

الترتيب في الشريحة ليس عشوائيًا، بل هو الترتيب الذي تعمل به فعلًا. تقيس خط الأساس (baseline): الحجم، والذاكرة، والحوسبة، وlatency (زمن الاستجابة)، والطاقة. ثم تطبّق عملية تحسين واحدة، ولتكن pruning (التقليم). ثم تقارن الأرقام الجديدة بخط الأساس وتسجل ما كلّفته هذه الخطوة من الدقة. ثم تبحث في الأدبيات البحثية وفي الصناعة عن التقنية التالية. ثم تُجري deploy (النشر) على اللوحة الحقيقية لتتأكد أن أرقام الورقة البحثية تصمد أمام العتاد الفعلي، لأن زمن الاستجابة والطاقة المقيسين يختلفان عادةً عن التقديرات التحليلية. ثم تقيس من جديد، فتدور الحلقة.

PillarالركيزةVerbالفعلQuestion you askالسؤال الذي تطرحهDeep Compression exampleمثال من Deep Compression
1 Measure efficiency1 قياس الكفاءةMeasureالقياسHow big, how slow, how hungry is the baseline?ما حجم خط الأساس، وما بطؤه، وما استهلاكه للموارد؟AlexNet: 240 MB, 61 M parameters, 32-bit weightsAlexNet: 240 MB، و61 M معامل، وأوزان 32-bit
2 Accelerate2 التسريعOptimizeالتحسينWhich technique shrinks the cost that hurts most?أي تقنية تقلّص التكلفة الأشد إيلامًا؟Prune 9x fewer connections, quantize to 5 bits, Huffman codeتقليم الوصلات إلى أقل بـ9x، والتكميم إلى 5 بتات، وترميز Huffman
3 Analyse trade-offs3 تحليل المفاضلاتCompareالمقارنةWhat did each step cost in accuracy or effort?كم كلّفت كل خطوة من الدقة أو الجهد؟35x smaller with no accuracy loss, after retrainingأصغر بـ35x دون خسارة في الدقة، بعد إعادة التدريب
4 Track the frontier4 متابعة أحدث ما وصل إليه البحثExploreالاستكشافWhat has research or industry done since?ما الذي أنجزه البحث أو الصناعة منذ ذلك الحين؟MCUNet, TinyTL and on-device training under 256 KBMCUNet وTinyTL والتدريب على الجهاز ضمن 256 KB
5 Build and deploy5 البناء والنشرDeployالنشرDoes it really run on the target hardware?هل يعمل فعلًا على العتاد المستهدف؟3x to 4x layerwise speedup and 3x to 7x energy efficiency measured on hardwareتسريع على مستوى الطبقة من 3x إلى 4x وكفاءة طاقة من 3x إلى 7x مقيسة على العتاد
The five pillars as one loop, with Deep Compression (Han, Mao and Dally, 2016) as the running exampleالركائز الخمس حلقةً واحدة، مع Deep Compression (Han وMao وDally، 2016) مثالًا متصلًا

Deep Compression is the canonical worked loop. Han, Mao and Dally started from AlexNet at 240 MB and VGG-16 at 552 MB (measure), pruned redundant connections, quantized the survivors from 32 to as few as 5 bits and Huffman coded the result (optimize), reported 35x and 49x reductions with no loss of accuracy (compare), and measured 3x to 4x layerwise speedup and 3x to 7x better energy efficiency on real hardware (deploy). The companion paper on learning both weights and connections had already shown pruning alone cutting AlexNet from 61 M to 6.7 M parameters. Everything after 2016 (MCUNet, TinyTL, on-device training under 256 KB) is the explore step feeding the next turn.

Deep Compression هو المثال النموذجي لحلقة كاملة. بدأ Han وMao وDally من AlexNet بحجم 240 MB وVGG-16 بحجم 552 MB (القياس)، ثم قلّموا الوصلات الزائدة، وكمّموا الوصلات الباقية من 32 بت إلى ما يصل إلى 5 بتات فقط، وطبّقوا ترميز Huffman على الناتج (التحسين)، وأبلغوا عن تقليص بمقدار 35x و49x دون أي خسارة في الدقة (المقارنة)، وقاسوا تسريعًا على مستوى الطبقة من 3x إلى 4x وكفاءة طاقة أفضل من 3x إلى 7x على عتاد حقيقي (النشر). وكانت الورقة المرافقة عن تعلم الأوزان والوصلات معًا قد أظهرت قبل ذلك أن التقليم وحده يخفض AlexNet من 61 M إلى 6.7 M معامل. وكل ما جاء بعد 2016 (MCUNet وTinyTL والتدريب على الجهاز ضمن 256 KB) هو خطوة الاستكشاف التي تغذي الدورة التالية.

A preview of the efficiency metricsلمحة مسبقة عن مقاييس الكفاءة

Slide 11 names the metrics without listing them; the list below previews later lectures and is not slide content. The ordering follows the MIT 6.5940 sequence, which opens with the basics of efficient deep learning before pruning, quantization, neural architecture search, distillation and on-device training. Learn the names now so the loop has something concrete to measure.

تذكر الشريحة 11 المقاييس دون أن تسردها؛ والقائمة أدناه لمحة عن محاضرات لاحقة وليست من محتوى الشرائح. ويتبع الترتيب تسلسل MIT 6.5940، الذي يبدأ بأساسيات التعلم العميق الكفء قبل التقليم، وquantization (التكميم)، وneural architecture search (البحث عن معمارية الشبكة العصبية)، وdistillation (التقطير)، والتدريب على الجهاز. تعلّم الأسماء الآن حتى يكون لدى الحلقة شيء ملموس تقيسه.

MetricالمقياسWhat it countsما الذي يحسبهTypical unitالوحدة المعتادة
Parameter countعدد المعاملاتHow many learnable weights and biases the model hasكم وزنًا وانحيازًا (bias) قابلًا للتعلم في النموذجmillions (M)ملايين (M)
Model sizeحجم النموذجBytes needed to store the weights: parameters times bits per weight over 8عدد البايتات اللازمة لتخزين الأوزان: عدد المعاملات مضروبًا في عدد البتات لكل وزن مقسومًا على 8MB or KBMB أو KB
Peak memoryذروة الذاكرةThe most memory needed at any moment: weights plus the largest activation tensorsأكبر قدر من الذاكرة يُحتاج إليه في أي لحظة: الأوزان مضافًا إليها أكبر موترات التنشيطMB or KBMB أو KB
ComputeالحوسبةMultiply-accumulate operations (MACs) or floating-point operations (FLOPs) per inferenceعدد عمليات الضرب والجمع (MACs) أو عمليات الفاصلة العائمة (FLOPs) لكل استدلالMMACs or GFLOPsMMACs أو GFLOPs
Latencyزمن الاستجابةTime from one input to its outputالزمن من إدخال واحد حتى مخرجهmsms
Throughputالإنتاجية (throughput)Inferences completed per secondعدد عمليات الاستدلال المكتملة في الثانيةinferences/sاستدلال/ثانية (inferences/s)
EnergyالطاقةJoules per inference, or average power while runningالجول لكل استدلال، أو متوسط القدرة أثناء التشغيلmJ or mWmJ أو mW
Efficiency metrics you will meet (preview, not slide content)مقاييس الكفاءة التي ستقابلها (لمحة مسبقة، لا من محتوى الشرائح)

The first two are the easiest to compute by hand, and the calculation is one you will repeat all term. A weight stored in b bits takes b / 8 bytes, so the size of the weights is the parameter count times bits per weight divided by eight.

أول مقياسين هما الأسهل حسابًا باليد، وهذا الحساب ستكرره طوال الفصل. الوزن المخزّن في b بت يشغل b / 8 بايت، لذا فإن حجم الأوزان يساوي عدد المعاملات مضروبًا في عدد البتات لكل وزن مقسومًا على ثمانية.

size (bytes)=Nparams×b8\text{size (bytes)} = \frac{N_{\text{params}} \times b}{8}
Weight storage for N parameters at b bits each; MB here means one million bytesتخزين الأوزان لعدد N من المعاملات بعدد b من البتات لكل منها؛ وMB هنا تعني مليون بايت

Worked exampleمثال محلول

A 3 million parameter model at four bit widthsنموذج من 3 ملايين معامل عند أربعة عروض بت

  1. Start from float32ابدأ من float32

    3,000,000 × 32 / 8 = 12,000,000 bytes, about 12 MB. This is what PyTorch saves by default.
    3,000,000 × 32 / 8 = 12,000,000 بايت، أي نحو 12 MB. وهذا ما يحفظه PyTorch افتراضيًا.
  2. Halve the bits, halve the bytesنصف البتات يعني نصف البايتات

    At 16 bits the same weights take 6 MB; at 8 bits, 3 MB; at 4 bits, 1.5 MB. Nothing else changed: the parameter count is identical.
    عند 16 بت تشغل الأوزان نفسها 6 MB؛ وعند 8 بتات 3 MB؛ وعند 4 بتات 1.5 MB. لم يتغير شيء آخر: عدد المعاملات هو نفسه تمامًا.
  3. Test against two boardsاختبر مقابل لوحتين

    The Raspberry Pi Pico has 2 MB of flash, so only the 4-bit version fits. The Arduino Nano 33 BLE Sense Rev2 has 1 MB, so none of the four fit, and quantization alone is not enough.
    في Raspberry Pi Pico ذاكرة فلاش بحجم 2 MB، لذا لا تتسع إلا نسخة 4-bit. أما Arduino Nano 33 BLE Sense Rev2 ففيها 1 MB، فلا تتسع أي من النسخ الأربع، والتكميم وحده لا يكفي.
  4. Resultالنتيجة

    Bit width divides size, but the target device decides whether the result is small enough. Below 1 MB this model also needs pruning or a different architecture.
    bit width (عرض البت) يقسم الحجم، لكن الجهاز المستهدف هو من يقرر هل الناتج صغير بما يكفي. للنزول تحت 1 MB يحتاج هذا النموذج أيضًا إلى التقليم أو إلى معمارية مختلفة.
Bits per weightعدد البتات لكل وزنCalculationالحسابSizeالحجمFits Pico flash (2 MB)?هل يتسع في فلاش Pico (2 MB)؟Fits Nano 33 BLE Sense flash (1 MB)?هل يتسع في فلاش Nano 33 BLE Sense (1 MB)؟
32-bit32-bit3,000,000 × 32 / 83,000,000 × 32 / 812,000,000 B (12 MB)12,000,000 B (12 MB)NoلاNoلا
16-bit16-bit3,000,000 × 16 / 83,000,000 × 16 / 86,000,000 B (6 MB)6,000,000 B (6 MB)NoلاNoلا
8-bit8-bit3,000,000 × 8 / 83,000,000 × 8 / 83,000,000 B (3 MB)3,000,000 B (3 MB)NoلاNoلا
4-bit4-bit3,000,000 × 4 / 83,000,000 × 4 / 81,500,000 B (1.5 MB)1,500,000 B (1.5 MB)YesنعمNoلا
3 M parameters at four bit widths, tested against two microcontroller flash budgets3 M معامل عند أربعة عروض بت، مختبرة مقابل ميزانيتي ذاكرة فلاش لمتحكمين دقيقين
The same 3 M parameters at 32, 16, 8 and 4 bits; only the 4-bit bar slides inside the 2 MB flash lineالمعاملات نفسها (3 M) عند 32 و16 و8 و4 بتات؛ وحده عمود 4-bit ينزلق داخل خط ذاكرة الفلاش 2 MB

Try it yourself. The calculator applies the formula for any parameter count and bit width and checks the result against generic device tiers. The device figures are datasheet capacities for one example board per tier (Arduino, Raspberry Pi and NVIDIA product pages), not what is free once the runtime and your code are loaded.

جرّب بنفسك. تطبّق الحاسبة المعادلة على أي عدد معاملات وأي عرض بت، وتختبر الناتج مقابل فئات أجهزة عامة. أرقام الأجهزة هي السعات المذكورة في أوراق البيانات للوحة مثال واحدة لكل فئة (صفحات منتجات Arduino وRaspberry Pi وNVIDIA)، وليست ما يتبقى حرًا بعد تحميل بيئة التشغيل وشيفرتك.

SimulatorمحاكيDoes it fit?هل يتسع؟
Target deviceالجهاز المستهدف

Microcontroller, example board: Arduino Nano 33 BLE Sense Rev2 (nRF52840)Microcontroller، لوحة على سبيل المثال: Arduino Nano 33 BLE Sense Rev2 (nRF52840)

3.00 M
Bits per weightعدد البتات لكل وزن
100 KB
Weight sizeحجم الأوزان12.00 MB3.00 M × 32 ÷ 8
Activations100 KByour estimate, not computedتقديرك أنت، لا قيمة محسوبة
Flash, weights storedFlash، تُخزَّن فيها الأوزانDoes not fitلا يتسع
needs 12.00 MB (weights only)يحتاج 12.00 MB (الأوزان فقط)of 1.05 MBمن 1.05 MB
SRAM, weights read from flashSRAM، والأوزان تُقرأ من FlashFitsيتسع
needs 116 KB (activations plus a 16 KB allowance for runtime and stack)يحتاج 116 KB (التنشيطات مع هامش 16 KB لبيئة التشغيل والمكدس)of 262 KBمن 262 KB
SRAM, weights copied inSRAM، والأوزان منسوخة إليهاDoes not fitلا يتسع
needs 12.12 MB (weights, activations and the same allowance)يحتاج 12.12 MB (الأوزان والتنشيطات والهامش نفسه)of 262 KBمن 262 KB

Activations, the runtime and your application code also need memory. These figures are datasheet capacities, not what is free. Model sizes use MB as 10^6 bytes; the microcontroller banks use the datasheet binary figures (1 MiB flash, 256 KiB SRAM), which are slightly larger.التنشيطات (activations) وبيئة التشغيل (runtime) وشيفرة تطبيقك تحتاج إلى ذاكرة أيضًا. هذه الأرقام هي السعات المذكورة في ورقة البيانات (datasheet)، لا الذاكرة المتاحة فعلًا. أحجام النماذج تعتبر MB مساوية لـ 10^6 بايت، أما بنوك ذاكرة المتحكم الدقيق فتستخدم الأرقام الثنائية من ورقة البيانات (1 MiB للذاكرة الوميضية flash، و256 KiB لذاكرة SRAM)، وهي أكبر بقليل.

Three misconceptions the loop correctsثلاثة مفاهيم خاطئة تصححها الحلقة

Inference stacks weights and one set of activations; training adds stored activations, gradients and optimizer state and spills past the SRAM lineالاستدلال يكدّس الأوزان ومجموعة واحدة من التنشيطات؛ والتدريب يضيف التنشيطات المحفوظة والتدرجات وحالة المُحسِّن فيتجاوز خط SRAM

Quick checkاختبار سريع

You compare pruning and quantization on the same network and report size, latency and accuracy for each. Which takeaway is this?قارنت التقليم والتكميم على الشبكة نفسها وأبلغت عن الحجم وزمن الاستجابة والدقة لكل منهما. أي مُخرج من مخرجات المقرر هذا؟

Quick checkاختبار سريع

A network has 12 million parameters stored as 8-bit integers. What is its weight size?شبكة فيها 12 مليون معامل مخزنة كأعداد صحيحة 8-bit. ما حجم أوزانها؟

Quick checkاختبار سريع

Why can accuracy alone not choose a model for a microcontroller?لماذا لا تكفي الدقة وحدها لاختيار نموذج لمتحكم دقيق؟

Quick checkاختبار سريع

Which memory cost appears in on-device training but not in on-device inference?أي تكلفة ذاكرة تظهر في التدريب على الجهاز ولا تظهر في الاستدلال على الجهاز؟

Recall

Name the five course takeaways in the order of the loop, then say what comes after the fifth.اذكر مخرجات المقرر الخمس بترتيب الحلقة، ثم قل ما الذي يأتي بعد الخامسة.

Measure efficiency, accelerate (optimize), analyse trade-offs (compare), track the frontier (explore), build and deploy. After deploying you measure the deployed model again, and the loop turns.
قياس الكفاءة، ثم التسريع (التحسين)، ثم تحليل المفاضلات (المقارنة)، ثم متابعة أحدث ما وصل إليه البحث (الاستكشاف)، ثم البناء والنشر. وبعد النشر تقيس النموذج المنشور من جديد، فتدور الحلقة.

Recall

A 3 M parameter model with 8-bit weights: how many bytes, and does it fit 1 MB of flash?نموذج من 3 M معامل بأوزان 8-bit: كم بايتًا يشغل، وهل يتسع في 1 MB من ذاكرة الفلاش؟

3,000,000 × 8 / 8 = 3,000,000 bytes, about 3 MB. It does not fit 1 MB of flash; even at 4 bits it is 1.5 MB.
3,000,000 × 8 / 8 = 3,000,000 بايت، أي نحو 3 MB. لا يتسع في 1 MB من ذاكرة الفلاش؛ وحتى عند 4 بتات يبلغ 1.5 MB.

Recall

Why is on-device training harder than on-device inference?لماذا يكون التدريب على الجهاز أصعب من الاستدلال على الجهاز؟

Training must store activations for the backward pass, gradients and optimizer state, so peak memory is far higher. TinyTL shows activations, not parameters, are the bottleneck, and LiteRT for Microcontrollers does not support on-device training.
لأن التدريب يجب أن يحفظ التنشيطات من أجل المرور العكسي، والتدرجات، وحالة المُحسِّن، فتكون ذروة الذاكرة أعلى بكثير. ويُظهر TinyTL أن التنشيطات، لا المعاملات، هي عنق الزجاجة، وLiteRT for Microcontrollers لا يدعم التدريب على الجهاز.

Slide 12 contains three words: "View on Blackboard". That is the whole syllabus section of the deck. It does not give grading weights, exam dates, project deliverables, a textbook, an office location or office hours. Anything you read elsewhere claiming to know those for this course is not coming from these slides.

تحتوي الشريحة 12 على ثلاث كلمات فقط: "View on Blackboard". وهذا هو قسم الخطة الدراسية كله في الشرائح. فهي لا تذكر أوزان التقييم، ولا مواعيد الامتحانات، ولا مخرجات المشروع، ولا كتابًا مقررًا، ولا موقع المكتب، ولا الساعات المكتبية. وأي مصدر آخر تقرؤه يدّعي معرفة هذه التفاصيل لهذا المقرر لا يستقيها من هذه الشرائح.

What is known so far (meeting details from the course registry, not this deck)ما هو معروف حتى الآن (تفاصيل المحاضرات من سجل المقرر، لا من هذه الشرائح)

Meetingsالمحاضرات
Monday and Wednesday, 20:10 to 21:25الاثنين والأربعاء، من 20:10 إلى 21:25
Roomالقاعة
Building 59, Room 2004المبنى 59، القاعة 2004
Syllabus, grading, deliverablesالخطة الدراسية، والتقييم، والمخرجات المطلوبة
On Blackboard, not in this deckعلى Blackboard، لا في هذه الشرائح
Textbook, office, office hoursالكتاب المقرر، والمكتب، والساعات المكتبية
Not stated in this deck; check Blackboardغير مذكورة في هذه الشرائح؛ راجع Blackboard

Plan the project before the syllabus tells you toخطّط للمشروع قبل أن تطلب منك الخطة الدراسية ذلك

Takeaway 5 promises hands-on experience compressing and implementing models on constrained devices, and the MIT counterpart of this course ends in an open-ended design project. Read that as a strong hint that a hardware Deployment is coming, whatever Blackboard eventually calls it. The students who struggle with such projects are rarely short of techniques; they are short of a baseline to compare against and a board that arrives on time. Both are fixed in week one.

يَعِد المُخرج 5 بخبرة عملية في ضغط النماذج وتنفيذها على أجهزة محدودة الموارد، والمقرر المقابل لهذا المقرر في MIT ينتهي بمشروع تصميم مفتوح. اقرأ ذلك تلميحًا قويًا إلى أن deployment (نشرًا) على عتاد حقيقي قادم، أيًا كان الاسم الذي سيطلقه عليه Blackboard لاحقًا. الطلاب الذين يتعثرون في مثل هذه المشاريع نادرًا ما تنقصهم التقنيات؛ بل ينقصهم خط أساس يقارنون به، ولوحة تصل في الوقت المناسب. وكلاهما يُحسم في الأسبوع الأول.

  1. Pick a device tier first. The memory budget of the tier decides which models are even candidates, so the device is an input to model selection, not an output of it.اختر فئة الجهاز أولًا. ميزانية الذاكرة في الفئة هي التي تحدد أي النماذج يصلح أصلًا أن يكون مرشحًا، لذا فالجهاز مُدخل لاختيار النموذج، لا ناتج عنه.
  2. Pick a candidate model that already fits, or is within one or two optimizations of fitting, and record its parameter count and float32 size with the formula from the previous concept.اختر نموذجًا مرشحًا يتسع بالفعل، أو يبعد عملية تحسين أو اثنتين عن أن يتسع، وسجّل parameter count (عدد معاملاته) وحجمه بصيغة float32 باستخدام المعادلة من المفهوم السابق.
  3. Start a metrics log before the first optimization. A baseline recorded after you have started changing things is not a baseline.ابدأ سجل مقاييس قبل أول عملية تحسين. خط الأساس الذي يُسجَّل بعد أن تبدأ في تغيير الأشياء ليس خط أساس.
TierالفئةExample boardلوحة مثالMemoryالذاكرةWhat it is typically asked to runما يُطلب منها تشغيله عادةً
Microcontrollerمتحكم دقيقArduino Nano 33 BLE Sense Rev2 (nRF52840)Arduino Nano 33 BLE Sense Rev2 (nRF52840)1 MB flash, 256 KB SRAM1 MB ذاكرة فلاش، و256 KB من SRAMKeyword spotting, gesture and anomaly detection, tiny image classifiersاكتشاف الكلمات المفتاحية، واكتشاف الإيماءات والحالات الشاذة، ومصنّفات صور صغيرة جدًا
Microcontrollerمتحكم دقيقRaspberry Pi Pico and Pico 2Raspberry Pi Pico and Pico 22 MB flash and 264 KB SRAM; Pico 2 has 4 MB and 520 KB2 MB ذاكرة فلاش و264 KB من SRAM؛ وفي Pico 2 يبلغان 4 MB و520 KBSame class, a little more headroomالفئة نفسها، مع هامش أوسع قليلًا
Single-board computerحاسوب أحادي اللوحةRaspberry Pi 4 Model BRaspberry Pi 4 Model B1 to 8 GB LPDDR4 RAMمن 1 إلى 8 GB من ذاكرة LPDDR4 RAMQuantized MobileNet-class vision, small detectors, a Linux runtimeرؤية حاسوبية من فئة MobileNet بعد التكميم، وكواشف صغيرة، وبيئة تشغيل Linux
GPU moduleوحدة GPUJetson Orin Nano Super Developer KitJetson Orin Nano Super Developer Kit8 GB LPDDR5 at 102 GB/s, 67 INT8 TOPS8 GB من LPDDR5 بسرعة 102 GB/s، و67 INT8 TOPSReal-time detection, small transformers, on-device fine-tuningاكتشاف في الزمن الحقيقي، ونماذج transformer صغيرة، وضبط دقيق (fine-tuning) على الجهاز
One example board per tier, with datasheet capacities (Arduino, Raspberry Pi and NVIDIA product pages)لوحة مثال واحدة لكل فئة، مع السعات المذكورة في أوراق البيانات (صفحات منتجات Arduino وRaspberry Pi وNVIDIA)

The last column is a guide, not a datasheet claim. MCUNet reached over 70% ImageNet top-1 accuracy on a commercial microcontroller, so the microcontroller tier is more capable than its numbers suggest, but only after the whole loop has been applied to a purpose-built architecture. A model chosen for a GPU module and then squeezed onto a microcontroller is the hardest path in the course.

العمود الأخير إرشادي، وليس ادعاءً من ورقة بيانات. فقد بلغ MCUNet دقة top-1 تفوق 70% على ImageNet باستخدام microcontroller (متحكم دقيق) تجاري، لذا ففئة المتحكمات الدقيقة أقدر مما توحي به أرقامها، لكن فقط بعد تطبيق الحلقة كاملة على معمارية مصممة لهذا الغرض. أما النموذج الذي يُختار لوحدة GPU ثم يُعصر ليتسع في متحكم دقيق فهو أصعب مسار في المقرر.

WhenمتىWhat to recordما الذي تسجله
Week 1الأسبوع 1Target device tier and its flash, SRAM or RAM budget from the datasheetفئة الجهاز المستهدف وميزانية ذاكرة الفلاش أو SRAM أو RAM فيه من ورقة البيانات
Week 1الأسبوع 1Candidate model, its parameter count and float32 weight sizeالنموذج المرشح، وعدد معاملاته، وحجم أوزانه بصيغة float32
Week 1الأسبوع 1Baseline accuracy on a held-out set you will not change laterدقة خط الأساس على مجموعة بيانات محجوزة (held-out) لن تغيّرها لاحقًا
First run on hardwareأول تشغيل على العتادLatency per inference and peak memory as the runtime reports themlatency (زمن الاستجابة) لكل استدلال وذروة الذاكرة كما تبلغ عنهما بيئة التشغيل
Every optimizationكل عملية تحسينThe same four numbers again, next to the baseline, plus what it costالأرقام الأربعة نفسها مجددًا، بجوار خط الأساس، مع ما كلّفته الخطوة
A starter metrics logسجل مقاييس للبداية

Keep the log as a plain table with one row per experiment and the same columns every time: accuracy, parameter count, size, peak memory, latency, energy if you can measure it, and a one-line note of what changed. This is the compare step made permanent, and it is the table an examiner or a reviewer will want to see.

احتفظ بالسجل جدولًا بسيطًا فيه صف واحد لكل تجربة والأعمدة نفسها في كل مرة: الدقة، وعدد المعاملات، والحجم، وذروة الذاكرة، وزمن الاستجابة، والطاقة إن استطعت قياسها، وملاحظة من سطر واحد عما تغيّر. هذه هي خطوة المقارنة وقد صارت دائمة، وهو الجدول الذي سيرغب الممتحن أو المراجع في رؤيته.

Quick checkاختبار سريع

Where is the COE 592 grading scheme published, according to the deck?أين يُنشر نظام التقييم في COE 592 بحسب الشرائح؟

Recall

Why does the deck not tell you the grading scheme, and what should you do about it?لماذا لا تخبرك الشرائح بنظام التقييم، وماذا يجب أن تفعل حيال ذلك؟

Slide 12 says only "View on Blackboard". The syllabus, assessments, textbook and office hours live on Blackboard, so check there; the site will add assessments once the syllabus is transcribed.
الشريحة 12 لا تقول إلا "View on Blackboard". الخطة الدراسية وأدوات التقييم والكتاب المقرر والساعات المكتبية موجودة على Blackboard، فراجعه هناك؛ وسيضيف الموقع أدوات التقييم بعد تفريغ الخطة الدراسية.

Recall

What three numbers should be in your metrics log before you run the first optimization?ما الأرقام الثلاثة التي يجب أن تكون في سجل مقاييسك قبل أن تُجري أول عملية تحسين؟

Baseline accuracy, weight size (from parameter count and bit width) and latency on the target hardware, with peak memory as soon as the runtime reports it.
دقة خط الأساس، وحجم الأوزان (من عدد المعاملات وعرض البت)، وزمن الاستجابة على العتاد المستهدف، مع إضافة ذروة الذاكرة بمجرد أن تُبلغ عنها بيئة التشغيل.

Recapالخلاصة

If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا

  • Introduce yourself with name, education and work background, and fill in the pre-course survey so the course can be calibrated to the room.عرّف بنفسك باسمك وخلفيتك التعليمية وخلفيتك العملية، واملأ استبيان ما قبل المقرر حتى يُضبط المقرر على مستوى القاعة.
  • Five takeaways: measure efficiency, accelerate, analyse trade-offs, track the frontier, build and deploy. Read them as a loop, not a list.المخرجات الخمس: قياس الكفاءة، والتسريع، وتحليل المفاضلات، ومتابعة أحدث ما وصل إليه البحث، والبناء والنشر. اقرأها حلقةً لا قائمة.
  • Weight size in bytes equals parameters times bits per weight divided by 8: 3 M parameters is 12 MB at 32-bit and 1.5 MB at 4-bit.حجم الأوزان بالبايت يساوي عدد المعاملات مضروبًا في عدد البتات لكل وزن مقسومًا على 8: نموذج من 3 M معامل حجمه 12 MB عند 32-bit و1.5 MB عند 4-bit.
  • Size, peak memory, compute, latency, throughput and energy are separate metrics and can disagree.الحجم، وذروة الذاكرة، والحوسبة، وزمن الاستجابة، والإنتاجية، والطاقة مقاييس منفصلة وقد تتعارض فيما بينها.
  • Compression trades accuracy and effort; Deep Compression's 35x came with retraining, not for free.الضغط يقايض على الدقة والجهد؛ وتقليص Deep Compression بمقدار 35x جاء مع إعادة التدريب، لا مجانًا.
  • Training on device must hold activations and gradients, far more than inference, and LiteRT for Microcontrollers does not support it.التدريب على الجهاز يتطلب الاحتفاظ بالتنشيطات والتدرجات، وهذا أكثر بكثير من الاستدلال، وLiteRT for Microcontrollers لا يدعمه.
  • The syllabus, grading and deliverables are on Blackboard, not in this deck. Class: Mon and Wed 20:10 to 21:25, Building 59, Room 2004.الخطة الدراسية والتقييم والمخرجات المطلوبة موجودة على Blackboard، لا في هذه الشرائح. المحاضرات: الاثنين والأربعاء من 20:10 إلى 21:25، المبنى 59، القاعة 2004.
  • Pick a device tier and a candidate model in week one, and start a metrics log before the first optimization.اختر فئة جهاز ونموذجًا مرشحًا في الأسبوع الأول، وابدأ سجل مقاييس قبل أول عملية تحسين.

Sourcesالمصادر