Peter Norvig (Google Director of Research) – Deep Learning and Understandability vs Software Engineering and Verification (Mar 2016)
Chapters
00:00:06 Bridging the Gap Between Machine Learning Experts and Software Engineers
Introduction: Speaker Adrian introduces Peter Norvig, Director of Research at Google and expert in machine learning and AI. Norvig discusses the separation between machine learning experts and the broader software engineering community.
Software Engineering Process: Software development involves ideation, coding, testing, and verification. Assertions are used for testing equality, truthfulness, and sameness. Traditional software engineering relied on mathematical principles and proving correctness.
Shift Towards a Natural Science Approach: Hal Abelson suggests that software has become a natural science. Developers now rely on downloading and experimenting with existing software. Theories about software behavior are formed based on documentation and experimentation.
Scientific Approach to Software Development: Developers form hypotheses about software behavior. Experiments are conducted to test hypotheses. Theories are updated based on experimental results, rather than mathematical proofs.
00:06:11 Machine Learning as an Agile Tool in Software Engineering
The Evolution of Software Development: Software development has shifted from implementing functions based on specifications to using machine learning to derive functions from example input-output pairs.
Defining Deep Learning: Deep learning involves forming representations with multiple levels of abstraction, enabling recognition of patterns and features at different levels.
Growing Popularity of Deep Learning: Deep learning has experienced a surge in popularity, particularly in South Korea, likely influenced by the recent AlphaGo match.
Machine Learning as an Agile Tool: Machine learning, guided by data scientists, is now used as an agile tool in software engineering, facilitating the development of functions from examples.
Example: Learning Functions from Points: A simple example of machine learning is fitting a function to a set of points, such as fitting a straight line to data points.
00:10:19 Agile Software Engineering with Machine Learning
Machine Learning in Agile Software Engineering: Machine learning can be used to learn parts of programs from examples, leading to more agile software engineering. An example is a spelling correction program that uses a dictionary to correct misspelled words. However, dictionaries are not always accurate, leading to incorrect suggestions. A naive Bayes learner can be used to improve the accuracy of spelling correction, resulting in a more effective program with fewer lines of code.
Machine Learning and Human Programmers: Machine translation systems often combine hand-coded components with parameters learned by machine learning algorithms. AlphaGo, a Go-playing program, uses a structure written by hand with parameters learned by machine learning. This partnership between human programmers and machine learning algorithms allows for more sophisticated and effective programs.
The Chasm in AI: Some argue that AI has not yet fully crossed the chasm between human-like intelligence and current capabilities. Critics argue that using a combination of complex algorithms to aid reinforcement learning is cheating, as it is not purely learned through experience.
Historical Attempts at Program Induction: Researchers have long explored the concept of program induction, aiming to generate programs from examples. Initial efforts focused on simple examples, such as sorting or reversing a list. Inductive logic programming, genetic programming, and logical and functional languages were among the techniques used. Despite progress, these methods faced limitations in handling larger and more complex programs.
Advancements in the 2000s: Increased computing power and improved representations led to advancements in program induction. The focus shifted from logic-based to probability-based approaches, enabling the identification of the most likely programs. Deep learning techniques, LSTMs, and complex intermediate representations further enhanced the capabilities of program induction.
Tricks and Techniques for Efficient Program Induction: Utilizing languages with a single way to express operations reduces the search space for possible programs. Stronger type systems and total functional programming help eliminate the halting problem. Domain-specific languages are more amenable to program induction compared to general-purpose languages.
Alternative Approaches to Program Generation: Instead of generating complete programs, researchers explored the generation of parameters for existing program structures. Deep neural networks can replace complex translation systems, achieving similar state-of-the-art performance by directly mapping inputs to outputs. Deep learning algorithms can also learn to play Atari games by receiving game experience as input.
Challenges and Limitations: Program induction remains challenging for complex programs, such as 10,000-line C++ programs. The boundaries of where deep learning approaches succeed and fail are not fully understood. Long-range planning and strategic thinking pose difficulties for deep learning algorithms.
Yann LeCun’s Analogy: Yann LeCun compared different learning techniques to components of a cake: Unsupervised learning: the cake itself Supervised learning: the icing Reinforcement learning: the cherry This analogy highlights the importance of unsupervised learning as the foundation for intelligence.
00:21:10 Learning Entire Programs: Challenges and Approaches
Limitations of Reinforcement Learning: Reinforcement learning struggles when it lacks reinforcements and supervised examples. Learning entire programs is challenging.
Dijkstra’s Critique of Small Changes and Effects: Dijkstra argued that small changes in programs can lead to significant effects.
Neural Turing Machines: Neural Turing machines have a convolutional field and read/write heads. They offer differentiability, enabling gradient descent and small changes. However, the space of programs may still have many “spikes” or discontinuities.
Differentiable Programs: Differentiable programs allow for small changes and effects. They address Dijkstra’s critique, but the program space may still be challenging.
Franz Och and Ney’s Paper on Machine Translation: Och and Ney’s paper highlighted the alignment problem in machine translation. It demonstrated that a few lines of math can translate into thousands of lines of code.
Alignment Problem: The alignment problem involves determining which words in different languages correspond to each other. Efficient implementation of this alignment requires additional code.
Declarative Expressions and Neural Networks: Neural networks can sometimes achieve surprising results, such as predicting quadratic functions. However, they may be limited in representing programs of arbitrary depth and complexity.
Learning Interpreters: Learning interpreters is possible to some extent, but the goal is not to replace them. The focus is on exploring new possibilities and expanding the capabilities of neural networks.
00:29:55 Understanding User Intent in Formal Programming Languages
Wolfram Alpha and the Balance Between Programming Languages and Google: Wolfram Alpha is a unique tool that falls between a programming language and Google. Unlike programming languages, Wolfram Alpha accepts various inputs and aims to interpret user intent rather than following strict syntax rules. Wolfram Alpha engineers continuously analyze user input to improve the system’s understanding of natural language.
Interpreting User Intent in Formal Languages: Formal languages, like programming languages, typically require precise syntax, and errors lead to no output. Wolfram Alpha adopts a flexible approach, interpreting user intent even when the input doesn’t strictly adhere to a fixed language. The system relies on Gricean maxims to infer the user’s probable meaning, rather than relying on predetermined interpretations.
Enhancing User Interaction with Formal Languages: The speaker expresses a desire for formal languages to better understand user intent, leading to more intuitive interactions. The example of pressing a button multiple times on an app without a response is given, highlighting the need for apps to handle such situations gracefully. Instead of remaining unresponsive, apps should provide feedback, explanations, or alternative options to users.
00:32:37 Compilers and Interpreters: Learning from User Errors
Machine Learning for User-Friendly Error Messages: Machine learning can be used to create user-friendly error messages by analyzing user interactions and identifying common misconceptions.
Tutoring from Examples: Peter Norvig presents an example of tutoring from examples, where a student tries to write a Python program and receives unhelpful error messages.
Syntactic and Semantic Errors: Users often encounter syntactic and semantic errors when writing code. Compilers and interpreters should provide more helpful error messages that explain the underlying issue and suggest potential solutions.
Database of Interactions: Google provides more helpful error messages because it has a database of user interactions and can suggest alternative queries based on previous user behavior.
Compilers and Databases of Misconceptions: Compilers should have a database of common misconceptions about the language to provide more informative error messages. This would help users understand the errors and correct them more easily.
00:35:56 Machine Learning as an Agile Software Tool
Human-Machine Partnership for Efficient Program Assessment: Peter Norvig’s student, Chris Peach, devised a method to summarize and group submissions to Andrew Ng’s online classes. Each program was projected onto a two-dimensional space, showing relationships between them. The goal was to identify similar programs and provide feedback efficiently.
Impressive Results: Peach’s method achieved a remarkable 98.8% coverage of the programs. Out of 50,000 programs, only 500 required grading or feedback, reducing the workload significantly.
Benefits of Human-Machine Partnership: Machine learning assists in handling a large volume of work efficiently. Humans remain essential for providing feedback and ensuring accuracy.
Technical Debt in Machine Learning: Machine learning can introduce technical debt, leading to future maintenance challenges. It is crucial to understand when and how to incur technical debt wisely. Machine learning enables rapid development but requires careful consideration of long-term implications.
Lack of Clear Abstraction Barriers: In traditional programs, fixing a bug typically doesn’t affect other instances, but in machine learning, changes often have cascading effects, making it difficult to predict outcomes.
Changing Anything Changes Everything: Machine learning systems are like pachinko machines, where a single change at the top can drastically alter the patterns of outcomes, making corrections and predicting results challenging.
Failure of Success: Once a machine learning system becomes a player in a marketplace, its actions create a feedback loop, influencing the behavior of others and requiring careful consideration of how actions may change the world.
Attractive Nuisance: When a machine learning resource is created, it may be misused or applied in contexts where it is not suitable, leading to unexpected or undesirable outcomes.
Non-Stationarity Effect: Data changes over time, and machine learning systems must continually adapt to these changes, requiring careful decisions on when to update the system or stick with current data.
00:42:24 Challenges of Machine Learning in Software Engineering
Challenges in Machine Learning for Software Engineering: Data selection and management: Determining how much past data to use, handling configuration dependencies, and ensuring consistency between training and production data. Tooling and infrastructure: Lack of established tools and frameworks for data management and analysis in machine learning, leading to increased chances of errors. Privacy and security: Ensuring the protection of sensitive data used in machine learning systems. Wide vs. narrow interfaces: Balancing the need for minimal data transfer between modules with the risk of insufficient information for decision-making. System complexity: Difficulty in combining different components and modules effectively, leading to potential failures despite individual components functioning correctly.
Combining Machine Learning and Traditional Software Engineering: Integrating machine learning and software engineering approaches: Exploring ways to combine machine learning models with traditional software engineering techniques to create robust and maintainable systems. Continuous learning and adaptation: Developing systems that can learn and adapt over time, incorporating new data and knowledge to improve performance.
AlphaGo’s Success in Go: Leveraging self-play: AlphaGo’s ability to play against itself and generate meaningful data for training, enabling it to surpass the performance of existing Go programs. Developing an evaluation function: AlphaGo’s ability to evaluate board positions effectively allowed it to make informed decisions and focus on promising moves, leading to its superior performance.
The Future of Machine Learning in Software Engineering: Potential for improvement: Machine learning holds promise in software engineering, but there is a need for further research and development to address challenges and improve its effectiveness. Combining different approaches: Combining machine learning with traditional software engineering techniques can lead to more robust and adaptable systems. Continuous learning and adaptation: Ongoing learning and adaptation of machine learning systems are crucial for maintaining high performance and addressing evolving requirements.
Deep Learning and Go: Lee’s victory over the Go champion was a significant moment, but AI’s rapid progress suggests that human dominance in Go, like in chess, will be short-lived.
Fundamental Tools for Deep Learning: Deep Dream and image processing tools provide insights into deep networks but are limited to two-dimensional data. High-dimensional data, common in deep learning, poses challenges for visualization and interpretation.
Experimental Frameworks: Machine learning systems require better experimental frameworks to assess performance and progress. Persistent build systems, common in traditional software development, can be applied to machine learning systems for continuous testing and validation.
Transition from Supervised to Unsupervised Learning: Unsupervised learning lacks an explicit cost function, making it challenging to evaluate progress.
Meta-learning and Data Structures: Meta-learning aims to optimize data structures for representing knowledge and improving transfer learning across tasks. Identifying shared knowledge and best practices for building global models is an ongoing research area.
Abstract
Unraveling the Evolution of Software Engineering: Bridging Machine Learning and Traditional Development
Introduction
In a rapidly evolving tech landscape, the paradigm of software engineering is shifting. Sponsored by Wipro, a leader in global technology services, Peter Norvig, Google’s Director of Research, recently shed light on this transformation. He emphasized the burgeoning relationship between machine learning and traditional software engineering, suggesting a fusion of these domains. This article delves into the changing nature of software engineering, the rise of deep learning, and the challenges and opportunities that lie at the intersection of machine learning and traditional software practices.
The Evolution of Software Engineering
Software engineering, traditionally viewed as a mathematical science, is undergoing a radical transformation. Its essence, once rooted in the rigorous coding and validation by individuals or teams, is now morphing into a more natural science-like discipline. Developers increasingly rely on pre-written code from repositories like GitHub, forming hypotheses about their behavior, much like scientists. This shift, as pointed out by Norvig, reflects a growing trend where software development is less about proving correctness and more about empirical validation and iterative refinement.
The Convergence of Machine Learning and Software Development
The intersection of machine learning with software development is redefining the landscape. Software, essentially a function meeting specified needs, is now increasingly intertwined with machine learning, which seeks to approximate functions based on input-output examples. This approach, exemplified in deep learning’s multiple abstraction levels, has gained significant traction, particularly highlighted by the global attention on the Lee Sedol-AlphaGo match in South Korea.
In this new era, a data scientist’s role transcends traditional boundaries, encompassing the formulation of ideas, data interpretation, and algorithmic feedback. Machine learning has seeped into diverse aspects of software engineering, from spell correction using Naive Bayes algorithms to the sophisticated neural networks driving machine translation and game-playing strategies in systems like AlphaGo.
Learning from Examples: A Paradigm Shift
A pivotal aspect of this evolution is the concept of learning programs from examples. The journey, beginning in the 1980s with inductive logic and genetic programming, has now reached a stage where probabilistic representations and deep learning significantly enhance program induction. The focus has shifted towards synthesizing programs in domain-specific languages, with a more recent trend being the generation of parameters for existing program structures. Yann LeCun’s analogy beautifully encapsulates this: unsupervised learning is the substantial cake base, supervised learning the icing, and reinforcement learning the cherry on top.
Challenges in Machine Learning for Software Engineering:
– Data selection and management: Determining how much past data to use, handling configuration dependencies, and ensuring consistency between training and production data.
– Tooling and infrastructure: Lack of established tools and frameworks for data management and analysis in machine learning, leading to increased chances of errors.
– Privacy and security: Ensuring the protection of sensitive data used in machine learning systems.
– Wide vs. narrow interfaces: Balancing the need for minimal data transfer between modules with the risk of insufficient information for decision-making.
– System complexity: Difficulty in combining different components and modules effectively, leading to potential failures despite individual components functioning correctly.
Combining Machine Learning and Traditional Software Engineering:
– Integrating machine learning and software engineering approaches: Exploring ways to combine machine learning models with traditional software engineering techniques to create robust and maintainable systems.
– Continuous learning and adaptation: Developing systems that can learn and adapt over time, incorporating new data and knowledge to improve performance.
Researchers have long explored the concept of program induction, aiming to generate programs from examples. Initial efforts focused on simple examples, such as sorting or reversing a list. Inductive logic programming, genetic programming, and logical and functional languages were among the techniques used. Despite progress, these methods faced limitations in handling larger and more complex programs.
Increased computing power and improved representations led to advancements in program induction in the 2000s. The focus shifted from logic-based to probability-based approaches, enabling the identification of the most likely programs. Deep learning techniques, LSTMs, and complex intermediate representations further enhanced the capabilities of program induction.
Tricks and techniques for efficient program induction include utilizing languages with a single way to express operations, employing stronger type systems and total functional programming to eliminate the halting problem, and using domain-specific languages that are more amenable to program induction compared to general-purpose languages.
Alternative approaches to program generation involve generating parameters for existing program structures, using deep neural networks to replace complex translation systems, and having deep learning algorithms learn to play Atari games by receiving game experience as input.
However, challenges and limitations remain. Program induction is challenging for complex programs, and the boundaries of deep learning approaches’ success and failure are not fully understood. Long-range planning and strategic thinking pose difficulties for deep learning algorithms.
The Challenge of Learning Entire Programs
Despite these advances, learning entire programs remains an arduous task, primarily due to the traditional non-differentiable nature of programs. Neural Turing machines present a promising direction by enabling differentiation and optimization through gradient descent. However, their effectiveness is still limited, evident in the complexity of tasks like the alignment problem in machine translation, which requires extensive code for relatively straightforward mathematical formulas.
Improving Human-Computer Interaction and Understanding
Wolfram Alpha represents a significant stride in this direction, blending natural and formal languages to interpret user queries. This approach, focusing on user intent, is a stark contrast to the rigid formal languages typically used in programming. The recommendation is clear: programming languages should evolve to better understand user intent, akin to Wolfram Alpha. This evolution extends to compilers, which can benefit from a database of user interactions, helping them provide more context-aware error messages and suggestions.
The Role of Machine Learning in Agile Software Development
Machine learning, now a potent tool in agile software development, offers rapid iteration and improvement capabilities. However, this comes with a caveat – the risk of accumulating technical debt. The dynamic nature of machine learning systems means that changes in one part can have far-reaching effects, necessitating a continuous adaptation and update cycle. This phenomenon, coupled with data-related challenges like handling non-stationary data and the intricacies of tooling, underscores the need for a cautious approach in integrating machine learning into software development.
AlphaGo: A Case Study in Deep Learning Success
AlphaGo’s Success in Go:
– Leveraging self-play: AlphaGo’s ability to play against itself and generate meaningful data for training, enabling it to surpass the performance of existing Go programs.
– Developing an evaluation function: AlphaGo’s ability to evaluate board positions effectively allowed it to make informed decisions and focus on promising moves, leading to its superior performance.
AlphaGo’s triumph in the field of Go is a testament to the efficacy of deep learning in complex decision-making scenarios. By harmonizing expert data, self-play, and novel evaluation functions, AlphaGo demonstrated a level of proficiency that surpassed existing Go programs. This success story also underscores the challenges in debugging and understanding machine learning systems, highlighting the need for better visualization and analysis tools.
Machine Learning for User-Friendly Error Messages
Machine learning can be employed to create user-friendly error messages by analyzing user interactions and identifying common misconceptions. Compilers and interpreters should provide more helpful error messages that explain the underlying issue and suggest potential solutions. By analyzing user interactions and identifying common misconceptions, compilers can offer more informative error messages.
Human-Machine Partnership for Efficient Program Assessment
Machine learning has proven effective in assisting humans in handling large volumes of work. For instance, Chris Peach, Peter Norvig’s student, developed a method to summarize and group submissions to Andrew Ng’s online classes. This method reduced the workload significantly by identifying similar programs and providing feedback efficiently.
Technical Debt in Machine Learning
Machine learning can introduce technical debt, leading to future maintenance challenges. It is crucial to understand when and how to incur technical debt wisely. While machine learning enables rapid development, it requires careful consideration of long-term implications.
Challenges in Machine Learning
Deep Learning and Go:
– Lee’s victory over the Go champion was a significant moment, but AI’s rapid progress suggests that human dominance in Go, like in chess, will be short-lived.
Fundamental Tools for Deep Learning:
– Deep Dream and image processing tools provide insights into deep networks but are limited to two-dimensional data.
– High-dimensional data, common in deep learning, poses challenges for visualization and interpretation.
Experimental Frameworks:
– Machine learning systems require better experimental frameworks to assess performance and progress.
– Persistent build systems, common in traditional software development, can be applied to machine learning systems for continuous testing and validation.
Machine learning systems often lack clear abstraction barriers, making it difficult to predict outcomes. Changes in one part can have cascading effects, requiring careful consideration. Additionally, machine learning systems can be prone to failure if they are misused or applied in unsuitable contexts. The changing nature of data over time, known as the non-stationary effect, poses further challenges in maintaining the accuracy of machine learning systems.
The Future of Machine Learning in Software Engineering
Transition from Supervised to Unsupervised Learning:
– Unsupervised learning lacks an explicit cost function, making it challenging to evaluate progress.
Meta-learning and Data Structures:
– Meta-learning aims to optimize data structures for representing knowledge and improving transfer learning across tasks.
– Identifying shared knowledge and best practices for building global models is an ongoing research area.
The landscape of software engineering is undeniably shifting towards a more integrated approach with machine learning. This integration promises to revolutionize traditional practices, offering new dimensions of efficiency and capability. However, it also brings to the fore significant challenges – from the need for better tools and practices to the handling of technical debt and data issues. As we stand at this crossroads, the future of software engineering appears both exciting and daunting, filled with opportunities for innovation and areas demanding careful navigation.
Fat tails, fragility, and ergodicity challenge traditional statistical models and risk management approaches, necessitating more robust methods to understand and manage risk in the face of extreme events. To address these challenges, multidisciplinary insights from finance, philosophy, and science are crucial for developing resilient systems and strategies that can withstand...
Programming has evolved from basic code instructions to advanced system simulations, with languages like eToys enabling live coding and intuitive object manipulation. Higher-level languages and innovative research can simplify programming and address the challenge of complex legacy systems....
Alan Kay emphasized strategic thinking in software engineering with a focus on domain-specific languages, criticized current computing systems, and envisioned dynamic and efficient computing in the future. Kay highlighted the need for strategic thinking in software engineering with a focus on domain-specific languages, criticized current computing systems, and envisioned dynamic...
Programming has undergone a remarkable transformation from early computers to modern devices, while challenges remain in making it universally accessible and incorporating natural language processing. Machine learning shifts the paradigm from traditional programming to an empirical model, extending beyond training to include data management and deployment....
Programming has dramatically evolved from strict logic instructions to assembling code from various sources, with ML revolutionizing the field and conversational AI promising a more natural user experience. The future of AI assistants relies on balancing innovation with ethical considerations, privacy, and security....
Alan Kay, a pioneer in object-oriented programming, emphasized the significance of holistic approaches, creativity, architectural integrity, and continuous innovation in programming. Smalltalk's influence extends beyond syntax and libraries, embodying architectural principles and structural integrity, akin to the construction of the Chartres Cathedral....
The evolution of programming has shifted from traditional methods to probabilistic approaches, embracing AI collaboration for faster problem-solving and improved responsiveness. AI's role extends beyond code generation to encompass all stages of software development, necessitating continuous learning, adaptation, and ethical considerations for responsible AI adoption....