# Modar M. Alfadly Machine learning researcher and engineer. I work on the parts of machine learning that have to be right: the mathematics of how deep networks behave, the library code others build on, and the systems that serve models at scale. Trained at KAUST, published at CVPR and AAAI, and now building Saudi Arabia's AI engineering curriculum at SDAIA. - Based in: Riyadh, Saudi Arabia - Currently: Director of Programs, SDAIA Academy - Email: modar.alfadly@gmail.com - LinkedIn: https://linkedin.com/in/modar-alfadly - GitHub: https://github.com/xmodar - Google Scholar: https://scholar.google.com/citations?user=QcS8ktMAAAAJ - ORCID: https://orcid.org/0000-0002-3763-3819 - CV: https://modar.me/cv.pdf (https://modar.me/cv.md) ## Now: SDAIA Academy, since November 2024 At the Saudi Data & AI Authority I direct the Academy's programs and its capability-building work. The technical core of that is the AI Engineer curriculum. - **AI Engineer curriculum**: Co-authored the Academy's course catalogue across foundation, data-science and AI-engineering tracks: PyTorch, fine-tuning, retrieval-augmented generation, agentic systems with LangGraph and MCP, MLOps and LLMOps, security and red-teaming. Its expert course on inference performance and cost covers latency and throughput profiling, continuous batching, KV cache and PagedAttention, prefix and semantic caching, quantisation, distillation, model routing and GPU autoscaling, with labs on vLLM, ONNX Runtime and TensorRT. - **AI Productivity: Automation & Agentic AI** (https://sdaia.gov.sa/en/MediaCenter/Initiatives/Pages/Details.aspx?ItemID=19): The Academy's flagship program, delivered nationally through SDAIA's SAMAI initiative: what AI applications, agents and models can do; prompt engineering; process automation and generative coding; responsible use and output verification. - **Professional Badges**: Helped launch SDAIA's badges for AI engineers and data scientists at the Assistant, Associate and Expert levels. - **National standards**: Co-developed three national Data & AI standards (academic, occupational, and the higher-education curriculum), launched at ICAN 2026 and recognised by the Council of Ministers during the Year of AI. - **Artificial Intelligence Association** (https://aia.org.sa/): Board member since 2025. ## Work - **Saudi Data & AI Authority (SDAIA)**, Director, SDAIA Academy Programs & Capability Building Consultant, November 2024 to present. Built the Academy's programs and delivery team from the ground up and trained more than 200 professionals across government entities. - **Artificial Intelligence Association (AIA)**, Board Member, 2025 to present. National AI ecosystem initiatives and the strategic direction of the association. - **KAUST, Image and Video Understanding Lab (IVUL)**, Doctoral Researcher, advised by Prof. Bernard Ghanem, 2018 to 2023. Analytical characterisation of deep networks under input noise, adversarial robustness, and the robustness of visual question answering: CVPR 2018 oral, AAAI 2019 oral, further preprints. Released the code behind the papers and built InvTorch. Teaching Assistant for PhD-level courses from 2018 to 2021. M.S. in Computer Science, 2018, with a thesis on the analytic treatment of deep networks under additive Gaussian noise. - **Meta (Facebook Reality Labs)**, Research Scientist Intern, Summer 2019. Active learning for semantic segmentation in large-scale vision systems. - **Mozn Systems**, Deep Learning Consultant, 2017 to 2018. Joined at the company's inception and built its first data-driven solutions. - **King Fahd University of Petroleum and Minerals (KFUPM)**, B.S. in Software Engineering, with honors, 2011 to 2016. First place in the First National Programming Contest (NC3, 2016); first and second places in the KFUPM Hackathon (2015, 2016). Research intern at KAUST in summer 2014, on GPU methods for 3D neuron skeletonisation in CUDA. ## Code Public code, oldest habit first: writing the utility properly and giving it away. - **invtorch** (2021) https://github.com/xmodar/invtorch: Memory-efficient invertible functions for PyTorch: an invertible checkpoint that frees a module's inputs during the forward pass and reconstructs them in backward, with an InvertibleModule abstraction and inverse checks. - **network_moments** (2018) https://github.com/xmodar/network_moments: A toolkit for computing probabilistic moments of deep networks, the companion to the CVPR 2018 paper and its extensions. - **gaussian-regularizer and ptb** (2019) https://github.com/xmodar/gaussian-regularizer: Official implementations of the Gaussian moment regularizer and the probabilistically true and tight bounds for robust training. - **uvn** (2024) https://github.com/xmodar/uvn: A centralised Python virtual-environment manager for uv: a conda-style workflow on uv's speed. - **PyTorch community** (2018 to 2021) https://discuss.pytorch.org/t/covariance-and-gradient-support/16217: A differentiable covariance implementation on the PyTorch forums that predated torch.cov, and a symmetric matrix square root for the linear-algebra module on the issue tracker (pytorch#25481). - **Gists** (2019 to now) https://gist.github.com/xmodar: PyTorch and NumPy utilities: custom autograd functions, invertible BatchNorm, deconvolution, positional encodings for point clouds, RNG state management; and a Lambert W function in TypeScript adopted by a third-party library. ## Papers Eleven papers and preprints, 2017 to 2025. The full record is on Google Scholar and ORCID. - 2025. Towards a Unified Benchmark for Arabic Pronunciation Assessment: Qur'anic Recitation as Case Study. Interspeech 2025. https://www.isca-archive.org/interspeech_2025/elkheir25b_interspeech.html - 2023. Improving Visual Question Answering Models through Robustness Analysis and In-Context Learning with a Chain of Basic Questions. arXiv preprint (second author). https://arxiv.org/abs/2304.03147 - 2021. Improving Variance Estimates in Generative Models. Technical report. - 2020. Network Moments: Extensions and Sparse-Smooth Attacks. arXiv preprint. https://arxiv.org/abs/2006.11776 - 2019. A Novel Framework for Robustness Analysis of Visual QA Models. AAAI 2019, oral (second author). https://aaai.org/papers/08449-a-novel-framework-for-robustness-analysis-of-visual-qa-models/ - 2019. Assessing the Robustness of Visual Question Answering. arXiv preprint (second author). https://arxiv.org/abs/1912.01452 - 2019. Expected Tight Bounds for Robust Deep Neural Network Training. arXiv preprint. https://arxiv.org/abs/1905.12418 - 2019. Analytical Moment Regularizer for Gaussian Robust Networks. arXiv preprint. https://arxiv.org/abs/1904.11005 - 2018. Analytic Expressions for Probabilistic Moments of PL-DNN with Gaussian Input. CVPR 2018, oral. https://openaccess.thecvf.com/content_cvpr_2018/html/Bibi_Analytic_Expressions_for_CVPR_2018_paper.html - 2018. Robustness Analysis of Visual QA Models by Basic Questions. CVPR Workshop (second author). https://arxiv.org/abs/1709.04625 - 2017. VQABQ: Visual Question Answering by Basic Questions. CVPR Workshop (second author). https://arxiv.org/abs/1703.06492 ## Teaching - **KAUST, 2018 to 2021**: Teaching Assistant for the PhD-level courses Deep Learning for Visual Computing and Introduction to Computer Vision. Designed the courses' hands-on deep learning labs and ran the lab's PyTorch tutorial and reading-group talks on transfer learning, capsule networks and the probabilistic analysis of deep networks. [Lab materials](https://drive.google.com/drive/folders/13Xx6dBr-j57z1qlgMEw8r-TgY7Qa1HM3?usp=drive_link) [Reading group](https://github.com/IVUL-KAUST/GroupReading) - **SDAIA Academy, 2024 to now**: The AI Engineer curriculum and the flagship program described above, plus keynotes and talks at national AI events. [SAMAI edition of the flagship program](https://sdaia.gov.sa/en/MediaCenter/Initiatives/Pages/Details.aspx?ItemID=19) ## Contact Write to me about inference systems, the robustness of deep networks, or building AI capability in Saudi Arabia. - Email: modar.alfadly@gmail.com - LinkedIn: https://linkedin.com/in/modar-alfadly - GitHub: https://github.com/xmodar - Google Scholar: https://scholar.google.com/citations?user=QcS8ktMAAAAJ - ORCID: https://orcid.org/0000-0002-3763-3819 --- # مضر الفضلي باحث ومهندس في تعلّم الآلة. أعمل على الأجزاء التي يجب أن تكون صحيحة في تعلّم الآلة: رياضيات سلوك الشبكات العميقة، وشيفرة المكتبات التي يبني عليها الآخرون، والأنظمة التي تخدم النماذج على نطاق واسع. تدرّبت في كاوست، ونشرت في CVPR وAAAI، وأعمل الآن على بناء منهج هندسة الذكاء الاصطناعي في أكاديمية سدايا. - الموقع: الرياض، المملكة العربية السعودية - حالياً: مدير برامج أكاديمية سدايا - البريد الإلكتروني: modar.alfadly@gmail.com - LinkedIn: https://linkedin.com/in/modar-alfadly - GitHub: https://github.com/xmodar - Google Scholar: https://scholar.google.com/citations?user=QcS8ktMAAAAJ - ORCID: https://orcid.org/0000-0002-3763-3819 - CV: https://modar.me/cv.pdf (https://modar.me/cv.md) ## الآن: أكاديمية سدايا، منذ نوفمبر 2024 في الهيئة السعودية للبيانات والذكاء الاصطناعي (سدايا) أدير برامج الأكاديمية وأعمال بناء القدرات فيها، وجوهرها التقني هو منهج مهندس الذكاء الاصطناعي. - **منهج مهندس الذكاء الاصطناعي**: شاركت في تأليف دليل مقررات الأكاديمية عبر المسار التأسيسي ومسار علم البيانات ومسار هندسة الذكاء الاصطناعي: PyTorch، والضبط الدقيق، والتوليد المعزَّز بالاسترجاع، والأنظمة الوكيلة بـ LangGraph وMCP، وعمليات تعلّم الآلة والنماذج اللغوية، والأمن واختبارات الفريق الأحمر. ويغطي مقرره المتقدم في أداء الاستدلال وتكلفته قياس زمن الاستجابة والإنتاجية، والتجميع المستمر، وذاكرة KV وPagedAttention، وتخزين البادئات والتخزين الدلالي، والتكميم، والتقطير، وتوجيه النماذج، والتوسّع التلقائي لوحدات معالجة الرسوميات، مع تمارين عملية على vLLM وONNX Runtime وTensorRT. - **الإنتاجية بالذكاء الاصطناعي: الأتمتة والذكاء الاصطناعي الوكيل** (https://sdaia.gov.sa/en/MediaCenter/Initiatives/Pages/Details.aspx?ItemID=19): البرنامج الرائد للأكاديمية، ويُقدَّم على مستوى المملكة عبر مبادرة سماي في سدايا: قدرات تطبيقات الذكاء الاصطناعي ووكلائه ونماذجه، وهندسة الأوامر، وأتمتة العمليات والبرمجة التوليدية، والاستخدام المسؤول والتحقق من المخرجات. - **الشارات المهنية**: أسهمت في إطلاق شارات سدايا المهنية لمهندسي الذكاء الاصطناعي وعلماء البيانات بمستوياتها الثلاثة: مساعد، ومشارك، وخبير. - **المعايير الوطنية**: شاركت في تطوير ثلاثة معايير وطنية للبيانات والذكاء الاصطناعي (الأكاديمية، والمهنية، ومنهج التعليم العالي)، أُطلقت في ICAN 2026 وحظيت باعتماد مجلس الوزراء خلال عام الذكاء الاصطناعي. - **جمعية الذكاء الاصطناعي** (https://aia.org.sa/): عضو مجلس الإدارة منذ 2025. ## العمل - **الهيئة السعودية للبيانات والذكاء الاصطناعي (سدايا)**, مدير برامج أكاديمية سدايا ومستشار بناء القدرات, نوفمبر 2024 حتى الآن. أسّست برامج الأكاديمية وفريق تنفيذها من الصفر، ودرّبت أكثر من 200 متخصص في الجهات الحكومية. - **جمعية الذكاء الاصطناعي**, عضو مجلس الإدارة, 2025 حتى الآن. مبادرات منظومة الذكاء الاصطناعي الوطنية والتوجّه الاستراتيجي للجمعية. - **كاوست، مختبر فهم الصور والفيديو (IVUL)**, باحث دكتوراه بإشراف الأستاذ الدكتور برنارد غانم, 2018 إلى 2023. التوصيف التحليلي للشبكات العميقة تحت ضوضاء المدخلات، والمتانة ضد الهجمات الخصومية، ومتانة الإجابة عن الأسئلة البصرية: عرض شفهي في CVPR 2018، وعرض شفهي في AAAI 2019، ومسودات أخرى. نشرت شيفرة الأوراق البحثية وبنيت مكتبة InvTorch. مساعد تدريس لمقررات على مستوى الدكتوراه من 2018 إلى 2021. ماجستير في علوم الحاسب، 2018، برسالة عن المعالجة التحليلية للشبكات العميقة تحت الضوضاء الغاوسية الجمعية. - **ميتا (Facebook Reality Labs)**, باحث علمي متدرب, صيف 2019. التعلّم النشط للتجزئة الدلالية في أنظمة الرؤية الحاسوبية واسعة النطاق. - **مزن**, مستشار تعلّم عميق, 2017 إلى 2018. انضممت إلى الشركة عند تأسيسها وبنيت أولى حلولها القائمة على البيانات. - **جامعة الملك فهد للبترول والمعادن**, بكالوريوس هندسة البرمجيات، بمرتبة الشرف, 2011 إلى 2016. المركز الأول في المسابقة الوطنية الأولى للبرمجة (NC3، 2016)؛ والمركزان الأول والثاني في هاكاثون الجامعة (2015، 2016). متدرب بحثي في كاوست صيف 2014 على طرق وحدات معالجة الرسوميات لاستخلاص هياكل الخلايا العصبية ثلاثية الأبعاد بلغة CUDA. ## الشيفرة شيفرة عامة، وعادة قديمة: أكتب الأداة كما ينبغي ثم أشاركها. - **invtorch** (2021) https://github.com/xmodar/invtorch: دوال قابلة للعكس وموفّرة للذاكرة في PyTorch: نقطة تحقّق قابلة للعكس تحرّر مدخلات الوحدة أثناء التمرير الأمامي وتعيد بناءها في التمرير الخلفي، مع تجريد InvertibleModule واختبارات للعكس. - **network_moments** (2018) https://github.com/xmodar/network_moments: أداة لحساب العزوم الاحتمالية للشبكات العميقة، مرافقة لورقة CVPR 2018 وامتداداتها. - **gaussian-regularizer وptb** (2019) https://github.com/xmodar/gaussian-regularizer: التطبيقان الرسميان لمنظِّم العزوم الغاوسية وللحدود الصحيحة والمُحكمة احتمالياً للتدريب المتين. - **uvn** (2024) https://github.com/xmodar/uvn: مدير مركزي للبيئات الافتراضية في Python مبني على uv: سير عمل بأسلوب conda وبسرعة uv. - **مجتمع PyTorch** (2018 إلى 2021) https://discuss.pytorch.org/t/covariance-and-gradient-support/16217: تطبيق قابل للاشتقاق لمصفوفة التغاير في منتدى PyTorch سبق إضافة torch.cov إلى المكتبة، وجذر تربيعي لمصفوفة متماثلة لوحدة الجبر الخطي في متتبّع المشكلات (pytorch#25481). - **مقتطفات برمجية** (2019 حتى الآن) https://gist.github.com/xmodar: أدوات PyTorch وNumPy: دوال اشتقاق تلقائي مخصّصة، وBatchNorm قابل للعكس، والالتفاف العكسي، وترميز المواضع لسحب النقاط، وإدارة حالة مولّدات الأرقام العشوائية؛ ودالة لامبرت W بلغة TypeScript تبنّتها مكتبة خارجية. ## الأبحاث إحدى عشرة ورقة ومسودة بحثية بين 2017 و2025. السجل الكامل على Google Scholar وORCID. - 2025. Towards a Unified Benchmark for Arabic Pronunciation Assessment: Qur'anic Recitation as Case Study. Interspeech 2025. https://www.isca-archive.org/interspeech_2025/elkheir25b_interspeech.html - 2023. Improving Visual Question Answering Models through Robustness Analysis and In-Context Learning with a Chain of Basic Questions. مسودة على arXiv (المؤلف الثاني). https://arxiv.org/abs/2304.03147 - 2021. Improving Variance Estimates in Generative Models. تقرير تقني. - 2020. Network Moments: Extensions and Sparse-Smooth Attacks. مسودة على arXiv. https://arxiv.org/abs/2006.11776 - 2019. A Novel Framework for Robustness Analysis of Visual QA Models. AAAI 2019، عرض شفهي (المؤلف الثاني). https://aaai.org/papers/08449-a-novel-framework-for-robustness-analysis-of-visual-qa-models/ - 2019. Assessing the Robustness of Visual Question Answering. مسودة على arXiv (المؤلف الثاني). https://arxiv.org/abs/1912.01452 - 2019. Expected Tight Bounds for Robust Deep Neural Network Training. مسودة على arXiv. https://arxiv.org/abs/1905.12418 - 2019. Analytical Moment Regularizer for Gaussian Robust Networks. مسودة على arXiv. https://arxiv.org/abs/1904.11005 - 2018. Analytic Expressions for Probabilistic Moments of PL-DNN with Gaussian Input. CVPR 2018، عرض شفهي. https://openaccess.thecvf.com/content_cvpr_2018/html/Bibi_Analytic_Expressions_for_CVPR_2018_paper.html - 2018. Robustness Analysis of Visual QA Models by Basic Questions. ورشة عمل CVPR (المؤلف الثاني). https://arxiv.org/abs/1709.04625 - 2017. VQABQ: Visual Question Answering by Basic Questions. ورشة عمل CVPR (المؤلف الثاني). https://arxiv.org/abs/1703.06492 ## التدريس - **كاوست، 2018 إلى 2021**: مساعد تدريس لمقرري التعلّم العميق للحوسبة البصرية ومقدمة في الرؤية الحاسوبية على مستوى الدكتوراه. صمّمت التمارين العملية للمقررين، وقدّمت للمختبر دورة تعليمية في PyTorch وعروضاً في حلقة القراءة عن تعلّم النقل وشبكات الكبسولات والتحليل الاحتمالي للشبكات العميقة. [مواد التمارين](https://drive.google.com/drive/folders/13Xx6dBr-j57z1qlgMEw8r-TgY7Qa1HM3?usp=drive_link) [حلقة القراءة](https://github.com/IVUL-KAUST/GroupReading) - **أكاديمية سدايا، 2024 حتى الآن**: منهج مهندس الذكاء الاصطناعي والبرنامج الرائد المذكوران أعلاه، إضافة إلى كلمات رئيسية وحديث في فعاليات الذكاء الاصطناعي الوطنية. [نسخة سماي من البرنامج الرائد](https://sdaia.gov.sa/en/MediaCenter/Initiatives/Pages/Details.aspx?ItemID=19) ## تواصل راسلني بخصوص أنظمة الاستدلال، أو متانة الشبكات العميقة، أو بناء القدرات في الذكاء الاصطناعي في المملكة. - البريد الإلكتروني: modar.alfadly@gmail.com - LinkedIn: https://linkedin.com/in/modar-alfadly - GitHub: https://github.com/xmodar - Google Scholar: https://scholar.google.com/citations?user=QcS8ktMAAAAJ - ORCID: https://orcid.org/0000-0002-3763-3819