Consistent, Transparent, and Fair AI Pipelines
Yada Pruksachatkun, Matthew McAteer, Subhabrata Majumdar

#Machine_Learning
#ML
#AI
🛡️ ساخت سیستمهای Machine Learning قابلاعتماد
🤖 با گسترش AI در حوزههای حساسی مثل پزشکی، حقوق و دفاع، قابلاعتماد بودن مدلهای Machine Learning دیگه یک ویژگی جانبی نیست. این کتاب یک نقطه شروع عملی ارائه میده تا تیمهای توسعه بتونن مدلهایی امنتر، مقاومتر، منصفانهتر و توضیحپذیرتر بسازن و اونها را برای شرایط پیچیده دنیای واقعی آماده کنن.
✨ ویژگیهای کلیدی
🔍 یاد میگیری مدلهای ML و خروجیهای اونها را به شکلی روشن برای Stakeholderها توضیح بدی و تصمیمهای مدل را قابلدرکتر کنی.
⚖️ با روشهای شناسایی و برطرف کردن مشکلات Fairness، سوگیری و تفاوت عملکرد مدل میان گروههای مختلف داده آشنا میشی.
🔐 یاد میگیری نشت اطلاعات خصوصی را در ML Pipeline پیدا کنی و ملاحظات Privacy را در فرایند توسعه مدل در نظر بگیری.
🛡️ با روشهای ساخت سیستمهای ML مقاوم و امن در برابر حملات مخرب و شرایط پیشبینینشده آشنا میشی.
🧭 موضوعات سیستمی مهمی مثل مدیریت Trust Debt و تشخیص موقعیتهایی که به مداخله انسانی نیاز دارن بررسی میشن.
📘 توضیح کتاب
🌍 امروزه سیستمهای Machine Learning در حوزههایی مثل پزشکی، حقوق و دفاع استفاده میشن؛ حوزههایی که یک تصمیم اشتباه میتونه پیامدهای انسانی جدی یا زیانهای اقتصادی چند میلیون یا حتی چند میلیارد دلاری ایجاد کنه. به همین دلیل، امنیت، پایداری، عدالت و توضیحپذیری مدلها اهمیت زیادی پیدا کرده.
⚠️ یک سیستم ML ممکنه امنیت کافی نداشته باشه، بهشکل غیرقابلپیشبینی شکست بخوره، میان گروههای مختلف داده اختلاف عملکرد قابلتوجهی نشان بده یا نتونه دلیل تصمیمهای خودش را توضیح بده. نویسندگان این کتاب تلاش کردن راهکارهایی ارائه بدن که مدلها بعد از خروج از محیط کنترلشده توسعه، در دنیای واقعی هم عملکرد قابلاعتمادی داشته باشن.
🏗️ یادا پروکساشاتکون، متیو مکآتیر و سوبهابراتا ماجومدار، Best Practiceهای موجود در پژوهشهای دانشگاهی درباره آمادهسازی Datasetها و ساخت مدلها را به یک Blueprint عملی برای ایجاد سیستمهای ML قابلاعتماد در صنعت تبدیل کردن. هدف کتاب اینه که مفاهیم پژوهشی را به زبان و ابزارهایی منتقل کنه که Engineerها و Data Scientistها بتونن مستقیماً در پروژههای واقعی به کار بگیرن.
🚧 نویسندگان با تجربه فعالیت همزمان در پژوهشهای ML و سیستمهای ML مستقرشده در Production، متوجه شدن فاصله زیادی میان ساخت یک مدل اولیه برای یک Dataset ثابت و استقرار موفق اون وجود داره. بخش بزرگی از این فاصله به نبود Trustworthiness مربوط میشه، چون مدلهایی که در محیط توسعه خوب کار میکنن، ممکنه در Production به روشهای مختلف شکست بخورن.
🏢 بسیاری از شرکتهای بزرگ، تیمهای اختصاصی Responsible AI و Safety دارن که ریسکها و پیامدهای سیستمهای فعلی و آینده را بررسی میکنن. بااینحال، بیشتر تیمها و شرکتهای فعال در حوزه ML منابع و ظرفیت لازم برای چنین کاری را ندارن. حتی وقتی تیم ایمنی وجود داره، ممکنه با کمبود منابع روبهرو باشه یا سرعت چرخه توسعه مدلها بهدلیل رقابت برای عرضه زودتر محصول، بیشتر از توان بررسی اون تیم باشه.
📚 این کتاب برای کاهش موانع ورود به حوزه Trustworthy ML نوشته شده. برخلاف منابعی که فقط وارد بحثهای عمیق نظری میشن، این راهنما Frameworkها، شیوههای تفکر درباره Trustworthiness و روشهای ارزیابی و بهبود مدلها را در اختیار افرادی قرار میده که پیشزمینه پژوهشی تخصصی در Machine Learning ندارن.
💻 برای عملیتر شدن مطالب، کتاب شامل Code Blockهایی است که میشه مستقیماً در پروژهها کپی و استفاده کرد. همچنین فهرستهایی از پروژههای Open Source و منابع مرتبط، همراه با لینک Tutorialهای عمیق کدنویسی ارائه شده که بسیاری از اونها مستقیماً داخل مرورگر قابل بررسی هستن.
🌐 نویسندگان تأکید میکنن که هیچ جایگزینی برای تجربه وجود نداره، اما برای کسب تجربه ابتدا باید نقطه شروع را شناخت. این کتاب همون پایه موردنیاز برای عرضه برنامههای Machine Learning در دنیایی پر از نویز، بینظم و گاهی خصمانه را فراهم میکنه و تلاش داره دستاوردهای تعداد زیادی از پژوهشگران و مهندسان را برای متخصصانی که سیستمهای ML را مستقر میکنن، قابلاستفادهتر کنه.
🎯 در پایان، درک محکمی از Trustworthiness به دست میاری و میتونی بررسی کنی این مفهوم چطور در سیستمهای ML مورد استفاده قرار میگیره. همچنین میتونی Code Snippetهای کتاب را با پروژههای خودت تطبیق بدی و جنبههای مختلف قابلاعتماد بودن سیستم را ارزیابی و تقویت کنی.
🎯 چیزهایی که یاد میگیری
🔍 یاد میگیری مدلهای Machine Learning و خروجیهای اونها را برای Stakeholderها توضیح بدی.
⚖️ میتونی نگرانیهای مربوط به Fairness و Bias را در ML Pipeline شناسایی و اصلاح کنی.
🔐 یاد میگیری Privacy Leakها را پیدا کنی و از اطلاعات حساس بهتر محافظت کنی.
🛡️ میتونی سیستمهای ML مقاومتر و امنتری در برابر حملات مخرب توسعه بدی.
📊 با روشهای Explainability و Interpretability برای بررسی تصمیمهای مدل آشنا میشی.
🧬 یاد میگیری تولید داده امن و قابلاعتماد را وارد چرخه توسعه Machine Learning کنی.
🧭 درک میکنی Trust Debt چطور شکل میگیره و چطور باید اون را در طول عمر سیستم مدیریت کرد.
👥 میتونی تشخیص بدی کدوم موانع و تصمیمهای ML به مداخله و قضاوت انسانی نیاز دارن.
👤 این کتاب برای چه کسانیه؟
👨💻 این کتاب برای همه افرادی نوشته شده که با مدلهای Machine Learning کار میکنن و میخوان مطمئن بشن نتیجه کارشون بعد از عرضه در دنیای واقعی، آسیب ناخواسته ایجاد نمیکنه. مخاطبان اصلی کتاب Engineerها و Data Scientistهایی هستن که آشنایی اولیهای با Machine Learning دارن.
📋 بخشهایی از کتاب برای افراد غیرمهندس مثل Product Managerها و مدیرانی که درک مفهومی از ML دارن هم قابلاستفاده است. این مطالب بهخصوص برای افرادی مناسبه که وارد پروژههایی با تصمیمهای حساستر از تجربههای شغلی یا دانشگاهی قبلی خودشون شدن.
🐍 برای دنبال کردن نمونهکدها، آشنایی با Python و مبانی اولیه Deep Learning در نظر گرفته شده. مطالعه اولیه کتاب یک دید منسجم درباره Trustworthiness ایجاد میکنه و در ادامه مسیر شغلی هم میشه برای استفاده و تطبیق Code Snippetها دوباره به اون مراجعه کرد.
📝 نقد و بررسی
💭 «کتابی عملی و عالی با مثالهای کدنویسی برای ساخت سیستمهای AI منصفانهتر، خصوصیتر، توضیحپذیرتر و مقاومتر. نکته تحسینبرانگیز اینه که کتاب تونسته خودش را با انفجار کامبرینِ در حال وقوع در حوزه Foundation Modelها همگام نگه داره.»
— کوش وارشنی، Distinguished Research Scientist بخش Foundations of Trustworthy AI در IBM Research
💭 «این کتاب مقدمهای ارزشمند و مسئولانه برای حوزههای روزبهروز مهمتر AI Safety، Privacy و Interpretability است و با مثالها و Code Snippetهای فراوان، کاربرد عملی زیادی برای متخصصان Machine Learning داره.»
— تیموتی نگوین، پژوهشگر Deep Learning و میزبان پادکست The Cartesian Cafe
💭 «کتابی چشمگیر که همزمان بنیادی و پیشرفته به نظر میرسه. این اثر مرجع ارزشمندی برای Data Scientistها و Engineerهایی است که میخوان مطمئن باشن مدلهایی که وارد جهان میکنن، امن و منصفانه هستن.»
— تری کازی، Head of AI Ethics در Indeed
📖 فهرست مطالب
فصل ۱. حریم خصوصی
فصل ۲. عدالت و سوگیری
فصل ۳. توضیحپذیری و تفسیرپذیری مدل
فصل ۴. مقاومت
فصل ۵. تولید داده امن و قابلاعتماد
فصل ۶. پرسشهای پژوهشی پیشرفتهتر
فصل ۷. از نظریه تا عمل
فصل ۸. اکوسیستم اعتماد
پیوست A. ابزارهای تولید داده مصنوعی
پیوست B. سایر مجموعهابزارهای تفسیرپذیری و توضیحپذیری
👥 درباره نویسندگان
👩🔬 یادا پروکساشاتکون، Machine Learning Scientist در Infinitus است؛ یک استارتاپ Conversational AI که تماسها را در سیستم مراقبتهای بهداشتی خودکار میکنه. او پیشتر بهعنوان Applied Scientist در Amazon روی Trustworthy Natural Language Processing فعالیت کرده و اولین برنامه Healthcare NLP را در استارتاپ متوسط ASAPP رهبری کرده. او در دوره تحصیلات تکمیلی خود در NYU درباره Transfer Learning در NLP پژوهش کرده و زیر نظر پروفسور Sam Bowman فعالیت داشته.
👨💻 متیو مکآتیر در Formic Labs روی Machine Learning کار میکنه؛ استارتاپی که روی شبیهسازی In Silico سلول تمرکز داره. او همچنین سازنده 5cube Labs، یک شرکت مشاوره ML، است که با بیش از ۱۰۰ شرکت در صنایعی از معماری و پزشکی گرفته تا کشاورزی همکاری کرده. متیو پیشتر همراه تیم TensorFlow در Google روی Probabilistic Programming و همچنین در شرکت پژوهشی General-Purpose AI با نام Generally Intelligent فعالیت کرده. او پیش از تبدیل شدن به ML Engineer، در آزمایشگاههای پژوهش زیستپزشکی MIT، Harvard Medical School و Brown University کار کرده است.
👨🔬 سوبهابراتا «سوبهو» ماجومدار، Senior Applied Scientist در Splunk است. او پیش از این سه سال در AT&T فعالیت داشت و تحقیق و توسعه در زمینه Ethical AI را رهبری میکرد. سوبهو عمیقاً به قدرت داده برای ایجاد تغییرات مثبت در جهان باور داره؛ او یکی از همبنیانگذاران Trustworthy ML Initiative بوده و در چندین همکاری موفق میان صنعت و دانشگاه در حوزه Data for Good مشارکت داشته است. او مدرک PhD خود را در رشته Statistics از University of Minnesota دریافت کرده.
With the increasing use of AI in high-stakes domains such as medicine, law, and defense, organizations spend a lot of time and money to make ML models trustworthy. Many books on the subject offer deep dives into theories and concepts. This guide provides a practical starting point to help development teams produce models that are secure, more robust, less biased, and more explainable.
Authors Yada Pruksachatkun, Matthew McAteer, and Subhabrata Majumdar translate best practices in the academic literature for curating datasets and building models into a blueprint for building industry-grade trusted ML systems. With this book, engineers and data scientists will gain a much-needed foundation for releasing trustworthy ML applications into a noisy, messy, and often hostile world.
You'll learn:
We live in a world where machine learning (ML) systems are used in increasingly high-stakes domains like medicine, law, and defense. Model decisions can result in economic gains or losses in the millions or billions of dollars. Because of the high-stakes nature of their decisions and consequences, it is important for these ML systems to be trustworthy. This can be a problem when the ML systems are not secure, may fail unpredictably, have notable performance disparities across sample groups, and/or struggle to explain their decisions. We wrote this book to help your ML models stand up on their own in the real world.
Why We Wrote This Book
As people who have both conducted research in ML and worked on ML systems that have been successfully deployed, we’ve noticed that the gap between building an initial ML model for a static dataset and deployment is large. A major part of this gap is in lack of trustworthiness. There are so many ways in which ML models that work in development can fail in production. Many large companies have dedicated responsible AI and safety teams to analyze the potential risks and consequences of both their current and potential future ML systems.10 Unfortunately, the vast majority of teams and companies using ML do not have the bandwidth to do this. Even in cases where such teams exist, they are often underresourced, and the model development cycles may be too fast for the safety team to keep up with for fear that a competitor will release a similar model first.
We wrote this book to lower the barrier to entry for understanding how to create ML models that are trustworthy. While a lot of titles already exist on this subject, we wanted to create a resource that was accessible to people without a background in machine learning research that teaches frameworks and ways to think about trustworthiness, as well as some methods to evaluate and improve the trustworthiness of models. This includes:
While there’s no replacement for experience, in order to get experience, you need to know where to start in the first place. This book is meant to provide that much-needed foundation for releasing your machine learning applications into the noisy, messy, sometimes hostile real world. This work stands on the shoulders of countless other researchers, engineers, and more—we hope this work will help translate some of that work for people working to deploy ML systems.
Who This Book Is For
This book is written for anyone who is currently working with machine learning models and wants to be sure that the fruits of their labor will not cause unintended harm when released into the real world. The primary audience of the book is engineers and data scientists who have some familiarity with machine learning. Parts of the book should be accessible to non-engineers, such as product managers and executives with a conceptual understanding of ML. Some of you may be building ML systems that make higher-stakes decisions than you encountered in your previous job or in academia. We assume you are familiar with the very basics of deep learning and with Python for the code samples.
An initial reading will allow engineers to gain a solid understanding of trustworthiness and how it may apply to the ML systems you are using. As you continue on your ML career, you can refer back and adapt code snippets from the book to evaluate and ensure aspects of trustworthiness in your systems.
Table of Contents
Chapter 1. Privacy
Chapter 2. Fairness and Bias
Chapter 3. Model Explainability and Interpretability
Chapter 4. Robustness
Chapter 5. Secure and Trustworthy Data Generation
Chapter 6. More State-of-the-Art Research Questions
Chapter 7. From Theory to Practice
Chapter 8. An Ecosystem of Trust
Appendix A. Synthetic Data Generation Tools
Appendix B. Other Interpretability and Explainability Tool Kits
"An excellent practical book with code examples on making AI systems more fair, private, explainable, and robust. Impressively, it has kept up with the ongoing Cambrian explosion of foundation models."
-- Kush Varshney,
Distinguished Research Scientist, Foundations of Trustworthy AI, IBM Research
"This book is a valuable and concientiously written introduction to the increasingly important fields of AI safety, privacy, and interpretability, filled with lots of examples and code snippets to make it of practical use to machine learning practicioners."
-- Timothy Nguyen,
deep learning researcher, host of The Cartesian Cafe podcast
"This is an impressive book that feels simultaneously foundational and cutting-edge. It is a valuable reference work for data scientists and engineers who want to be confident that the models they release into the world are safe and fair."
-- Trey Causey,
Head of AI Ethics, Indeed
Yada Pruksachatkun is a machine learning scientist at Infinitus, a conversational AI startup that automates calls in the healthcare system. She has worked on trustworthy natural language processing as an Applied Scientist at Amazon, and led the first healthcare NLP initiative within mid-sized startup ASAPP. She did research transfer learning in NLP in graduate school at NYU and was advised by Professor Sam Bowman.
Matthew McAteer works on machine learning at Formic Labs, a startup focused on in silico cell simulation. He is also the creator of 5cube Labs, an ML consultancy that has worked with over 100 companies in industries ranging from architecture to medicine to agriculture. Matthew previously worked with the TensorFlow team at Google on probabilistic programming, and with the general-purpose AI research company Generally Intelligent. Before he was an ML engineer, Matthew worked in biomedical research labs at MIT, Harvard Medical School, and Brown University.
Subhabrata (Subho) Majumdar is a Senior Applied Scientist at Splunk. Previously, he spent 3 years in AT&T, where he led research and development on ethical AI. Subho deeply believes in the power of data to bring about positive changes in the world---he has cofounded the Trustworthy ML Initiative, and has been a part of multiple successful industry-academia collaborations in the data for good space. Subho holds a PhD in Statistics from the University of Minnesota.









