
Lecture 8 Part 2: Automatic Differentiation on Computational Graphs
MIT OpenCourseWare: Free Courses from the instituteSummary
The discussion centers on the intricacies of automatic differentiation, particularly focusing on forward and reverse modes. The speaker emphasizes the importance of understanding how derivatives are calculated in computational graphs, which are structured as directed acyclic graphs (DAGs). Each node in the graph represents a variable, and the relationships between these variables dictate how derivatives are computed. The speaker introduces notation to differentiate between one-step derivatives and full derivatives, explaining that while the chain rule is a common method for calculating derivatives, visualizing the process through graphs can enhance understanding.
The conversation also delves into practical applications of forward and reverse differentiation. Forward mode is highlighted for its efficiency when there are many inputs and few outputs, while reverse mode is preferred in scenarios with many outputs and fewer inputs, such as in machine learning. The speaker illustrates how derivatives can be computed by traversing the graph in either direction, emphasizing the need for a clear understanding of the relationships between variables. The session concludes with a discussion on the complexities of implementing these differentiation methods in programming, particularly in languages like Julia, and hints at the potential for further exploration into topics such as complex numbers and custom differentiation rules.
Show Notes
MIT 18.S096 Matrix Calculus For Machine Learning And Beyond, IAP 2023Instructors: Alan Edelman, Steven G. JohnsonUploaded 23-10-23View the complete course: https://ocw.mit.edu/courses/18-s096-matrix-calculus-for-machine-learning-and-beyond-january-iap-2023/YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP62EaLLH92E_VCN4izBKK6OEDescription: Complicated computational processes can be expressed as “graphs” of computational steps that flow from inputs to outputs. Forward/reverse-mode automatic differentiation (AD) traverse in opposite directions, giving very different algorithms.License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
More from MIT OpenCourseWare: Free Courses from the institute
MIT 14.12 Economic Applications of Game Theory, Fall 2025 Instructor: Ian Ball View the complete course: https://ocw.mit.edu/courses/14-12-economic-applications-of-game-theory-fall-2025/YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63quuKvMHCt3cmTmt0O2qpvUploaded 18-05-26This lecture explores how companies compete and decide what prices to charge. Using real-world examples like oil production and cell phone companies, the instructor explains why some markets have one dominant player (like a local monopoly) while others have many competitors. License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
MIT 8.701 Introduction to Nuclear and Particle Physics, Fall 2020Instructor: Markus Klute View the complete course: https://ocw.mit.edu/8-701F20YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP60Do91PdN978llIsvjKW0auUploaded 24-06-21Discussion of the early history and people in nuclear and particle physics from the 1820s to 1939.License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
MIT 18.404J Theory of Computation, Fall 2020Instructor: Michael SipserView the complete course: https://ocw.mit.edu/18-404JF20YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP60_JNv2MmK3wkOt9syvfQWYUploaded 06-10-21Quickly reviewed last lecture. Discussed a connection between games and quantifiers. Described the formula game and showed that generalized geography is PSPACE-complete. Introduced log space: L and NL. Defined the configuration graph to prove NL is a subset of P.License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
MIT 2.997 Direct Solar/Thermal To Electrical Energy Conversion Technologies, Fall 2009Instructor: Prof. Gang ChenUploaded 26-06-24View the complete course: https://ocw.mit.edu/courses/2-997-direct-solar-thermal-to-electrical-energy-conversion-technologies-fall-2009/YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP62sv7_wYRKqvf1HsL4p54KjRichardson formulaThermionic engines: vacuum, solid-stateSchottky barrier and diodepn junction and diodeLicense: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
MIT 14.12 Economic Applications of Game Theory, Fall 2025 Uploaded 18-05-26Instructor: Ian Ball View the complete course: https://ocw.mit.edu/courses/14-12-economic-applications-of-game-theory-fall-2025/YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63quuKvMHCt3cmTmt0O2qpvIn this lecture, Ian Ball discusses infinitely repeated games, which are scenarios where players engage in the same stage game indefinitely, allowing for cooperation that wouldn't exist in one-shot games. License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices