Design Automation And Fpga Implementation Of Machine Learning Classifiers /
أتمتة التصميم و التنفيذ باستخدام مصفوفة البوابة القابلة للبرمجة حقلياً لمصنفات تعلم الألة /
by Ratshih Sayed Abd El-Azeem Ahmed ; Under the Supervision of Prof. Dr. Ahmed Hussein Mohamed Khalil, Prof. Dr. Amin Mohamed Nassar, Prof. Dr. Heba Ahmed Shawkey, Dr. Mohamed Refky Mohamed Amin.
- 162 pages : illustrations ; 30 cm. + CD.
Thesis (Ph.D)-Cairo University, 2023.
Bibliography: pages 111-134.
Machine learning applications have evolved in recent years due to the huge amount of data generated in different disciplines, such as medical, automotive, and the Internet of Things (IoT). Machine learning is concerned with developing, analyzing, and applying algorithms that allow computers to learn. Supervised learning is one of the branches of machine learning that makes the model able to predict future outcomes after training. There are different supervised classification techniques, including decision tree, Support Vector Machine (SVM), Naive Bayes, K-Nearest Neighbor, and Neural Networks. The hardware- based implementation of machine learning classifiers is becoming significantly important to process real-time data with high efficiency. Two design flows can be considered to implement classifiers in hardware: Field Programmable Gate Array (FPGA) design flow and Application Specific Integrated Circuit (ASIC) design flow. This thesis is divided into two parts; the first part presents a framework for auto-generating machine learning classifiers based on the tree- based ID3 algorithm. The second part proposes optimization for binary weight Convolutional Neural Network (CNN). The first part presents a framework that automates the creation of a trained- classifier integrated circuit from a dataset. The framework accepts a dataset in a comma-separated value format and performs several processing steps to create a trained model. After creating the model, the framework generates a tree-based machine learning classifier in two formats; Extensible Markup Language (XML) and Verilog. We use the XML representation to present the hierarchy of the generated tree and the Verilog code as a hardware description language representation of the trained model. Our framework uses the Verilog code as an input to FPGA design validation flow. Then, we automate the ASIC flow implementation and build a customized classifier integrated circuit. The proposed framework builds low- cost, high-performance classifier chips that operates at 100 MHZ and achieves 80.79% average 10-fold cross-validation accuracy across five different datasets. The second part proposed optimization for SpooNN-MNIST framework, a binary weight CNN inference FPGA-based framework that uses binary weights and quan- tized activation functions of 5-bits. Our modifications are to use fewer bit-width activation functions of (2, 3, and 4 bits) to reduce the hardware cost with comparable accuracy. Also, we study the trade-off between utilizing area, power consumption, and accuracy when changing the number of layers. The modified SpooNN with 2 bit-width activation functions achieves an accuracy of 98.45% on the MNIST dataset. تطورت تطبيقات تعلم الآلة فى السنوات الأخيرة بسبب الكم الهائل من البيانات التى يتم انشاؤها فى مختلف التخصصات مثل الطب, السيارات و انترنت الأشياء (IOT) . يهتم تعلم الآلة بتطوير وتحليل تطبيقات الخوارزميات التى تسمح لأجهزة الكمبيوتر بالتعلم. التعلم الخاضع للإشراف هو أحد فروع تعلم الآلة الذى يجعل النموذج قادراً على توقع النتائج المستقبلية بعد تدريبه. هناك تقنيات تصنيف مختلفة خاضعة للإشراف مثل شجرة القرار (Decision Tree) وأقرب جار (K-Nearest Neighbor) ونايف بايز (Naive Bayes) وآلة دعم المتجهات (Support Vector Machine). يعد التنفيذ القائم على الأجهزة لمصنفات تعلم الآلة أمراً مهماً لمعالجة البيانات فى الوقت الفعلى بكفاءة عالية . يوجد طريقتان لتصميم المصنفات فى الأجهزة (Hardware) طريقة تصميم باستخدام مصفوفة البوابة القابلة للبرمجة حقلياً (FPGA) وطريقة تصميم باستخدام الدوائر المتكاملة الخاصة بالتطبيق (ASIC) وتنقسم هذة الرسالة إلى قسمين: يقدم القسم الأول إطاراً لمصنفات تعلم الآلة المولدة تلقائياً استناداً إلى خوارزمية (ID3) المستندة إلى شجرة القرار. الجزء الثانى يقدم تحسين للشبكة العصبية ذات الأوزان الثنائية. يقدم الجزء الأول إطار عمل يقوم بأتمتة (Automation) إنشاء دائرة متكاملة لمصنف مدرب من مجموعة بيانات يقبل إطار العمل مجموعة البيانات بتنسيق القيم المفصولة بواسطة الفاصل (CSV) حيث ينفذ عدة خطوات لإنشاء نموذج مدرب. بعد إنشاء النموذج يولد إطار العمل مصنفاً لتعلم الآلة لشجرة القرارات بتنسيقين الأول لغة التوصيف الموسعة (XML) والثانى لغة وصف الأجهزة (Verilog). حيث نستخدم (XML) لوصف التسلسل الهرمى للنموذج الذى تم إنشاؤه بينما يستخدم رموز (Verilog) كمدخل لتنفيذ التصميم على مصفوفة البوابة القابلة للبرمجة حقلياً (FPGA) للتحقق من صحة التصميم. وبعد ذلك نقوم بأتمتة التنفيذ على الدوائر المتكاملة الخاصة بالتطبيق (ASIC) لبناء الدائرة المتكاملة الخاصة بالمصنف. يبنى الإطار المقترح مصنفات منخفضة التكلفة وعالية الآداء تعمل بسرعة 100 ميجا هرتز وتحقق متوسط الدقة 80.79% عبر خمس مجموعات من البيانات المختلفة. يقترح الجزء الثانى تحسيناً لإطار عمل (SpooNN-MNIST) وهو إطار يستند إلى الشبكة العصبية ذات الأوزان الثنائية و وظائف تنشيط (5-bit) تهدف التعديلات المقترحة إلى