1. Home
  2. Explore
  3. Computer Science
  4. Probabilistic Machine Learning

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Probabilistic Machine Learning

Speaker 1Speaker 2

Probabilistic Machine Learning

18:45
0:00-18:45
  1. Simon

    Welcome to the episode. Today we're exploring probabilistic machine learning and artificial intelligence, including how AI developed, what deep learning can and cannot do, and why probability may be central to the next generation of intelligent systems.

  2. Hope

    Let's begin with the historical path. Early AI focused on logic, search, and symbolic systems. Then, during the 1980s and early 1990s, machine learning became much more prominent, shifting attention toward systems that learn from data.

  3. Simon

    Neural networks were especially exciting in that period, under the name connectionism. They were seen not only as a new engineering approach, but potentially as a computational model for human and animal cognition, linking symbolic and subsymbolic processing with neural processing.

  4. Hope

    But enthusiasm faded in the mid-1990s and early 2000s. Neural networks were difficult to train, and their engineering performance was not yet impressive enough. Researchers turned toward mathematically elegant approaches such as kernel methods, support vector machines, probabilistic models, graphical models, and Bayesian inference.

  5. Simon

    Then neural networks returned dramatically in the early 2010s with the deep learning revolution. That period produced major breakthroughs, revived links with neuroscience, and continues to shape AI today. The larger question is what might come after the deep learning era.

  6. Hope

    Before answering that, we need to be careful with the language of AI. The phrase artificial intelligence can be misleading because intelligence in a machine need not be considered artificial. We do not describe what an aeroplane does as artificial flying; it flies. The distinction between biological and machine systems may also be less fundamental than the terminology suggests.

  7. Simon

    Another important distinction is between intelligence and autonomy. An autonomous system can make decisions on its own, and many concerns about AI actually arise from autonomy combined with limited intelligence. Intelligence itself is generally positive; the risk may come from delegating decisions to a system that is not capable enough or not properly constrained.

  8. Hope

    That also helps clarify the idea of general intelligence. Specialist systems are enormously useful and should not be dismissed simply because they are narrow. Human intelligence is flexible, but it is not completely general either, because human abilities evolved for particular survival needs.

  9. Simon

    The same caution applies to the phrase human-level AI. Humans are not necessarily the ideal model for every intelligent machine. Human reasoning is often flawed, and human memory, calculation, and communication are limited. A better goal may be systems that complement human abilities rather than imitate humans exactly.

  10. Hope

    And when we celebrate human achievements, we should distinguish the abilities of one brain from the accumulated products of societies and organisations. A civilisation's accomplishments result from collaboration over time, not simply from the capabilities of an individual human mind. Mimicking one brain may therefore be the wrong route to reproducing those achievements.

  11. Simon

    AI has already produced major advances in games and in practical areas such as speech and language technology, computer vision, scientific data analysis, recommender systems, online commerce, self-driving cars, finance, climate, weather, and economic systems. Many of these advances have been powered by deep learning.

  12. Hope

    So what exactly is deep learning? A neural network is a tuneable nonlinear function with many parameters, usually called weights. It is called a neural network because simple computational elements are organised in a network inspired by a highly simplified picture of how the brain works.

  13. Simon

    Deep learning models organise computation into layers. Each layer passes its result to the next, so the overall function from inputs to outputs is a composition of functions. When there are many layers in that composition, we call the model deep.

  14. Hope

    Training usually involves maximum likelihood or penalised likelihood, together with a form of stochastic gradient descent. In that sense, a deep neural network combines a flexible nonlinear function with basic statistical principles for training and optimisation to reduce error or increase likelihood.

  15. Simon

    The recent success was not because the basic concept suddenly appeared. Neural networks had existed for decades. The difference was the combination of better architectures and algorithms, much larger datasets from the web, vastly more computing power, better software frameworks, and increased investment and media attention. These factors created a reinforcing cycle of excitement and development.

  16. Hope

    Several technical ideas were especially important. Very large, flexible models can work extremely well, but they generally require huge datasets. When real data are unavailable, simulated data can sometimes be generated. Automatic differentiation made training easier, while improved initialisation helped stochastic optimisation work surprisingly well.

  17. Simon

    Researchers also learned how to make deep networks by keeping each computational layer somewhat close to the identity function, allowing many layers to be stacked. Parameter tying encodes symmetries in data; convolutional networks, recurrent networks, and graph neural networks are examples of that idea.

  18. Hope

    Another major advantage is that the internal representations learned by deep networks can be reused. A network pretrained on one task may help with many others, sometimes allowing a new task to be learned with only a small amount of additional data.

  19. Simon

    Deep learning also has serious limitations. It is data hungry, often needing millions of examples, and it is computationally expensive to train and deploy. It can be fooled by adversarial examples, making it less robust, and its non-convex optimisation is finicky, with many choices affecting the result.

  20. Hope

    These models are also often black boxes: difficult to interpret, explain, and trust. They do not naturally incorporate prior knowledge or symbolic representations, and they are poor at representing uncertainty. Those limitations motivate probabilistic approaches.

  21. Simon

    A probabilistic model describes data that could be observed from a system. Because the model may be wrong, it should be testable or falsifiable through observations. We must also represent uncertainty about its parameters, its structure, and its assumptions.

  22. Hope

    Probability theory gives us a language for expressing noise and uncertainty. Bayes' rule then lets us update our knowledge after seeing data. Before observing data, we represent possible hypotheses with a prior distribution. The likelihood tells us how probable the observed data would be under each hypothesis. Multiplying prior and likelihood, then normalising, gives the posterior distribution.

  23. Simon

    In this framework, data are the quantities measured or observed. Everything else is a hypothesis: parameters, model structure, assumptions, or any other uncertain quantity. For a machine learning model, the parameters might be written as theta, the dataset as D, and the broader model class as M.

  24. Hope

    Bayesian prediction naturally averages over possible parameter values. Instead of making a prediction using only one estimated parameter setting, we average the predictions associated with every possible setting, weighting each by its posterior probability. Comparing different model structures applies the same logic at the level of M.

  25. Simon

    This produces an automatic preference for simplicity known as Bayesian Occam's razor. Imagine fitting a polynomial to eight data points. A seventh-order polynomial can fit every point exactly, but that may be overfitting. A model that is too simple may underfit, while Bayesian inference can favour a linear, quadratic, or cubic explanation when the data do not provide enough evidence for higher-order complexity.

  26. Hope

    The same principle can help choose the number of clusters, the intrinsic dimensionality of data, relevant inputs, the order of a dynamical system, the number of states in a hidden Markov model, or the structure of a neural network or graphical model.

  27. Simon

    The quantity driving this process is the marginal likelihood, also called the evidence. It is the likelihood averaged over the prior, meaning that we average over parameter values rather than simply optimising them. In information-theoretic terms, the base-two logarithm of one over the marginal likelihood measures the number of bits of surprise in observing the data under the model.

  28. Hope

    That explains the complexity penalty. A very complex model can fit many possible datasets, but a simple dataset may be surprising under that model. Bayesian comparison therefore rewards models under which the observed data are unsurprising without automatically accepting unnecessary complexity.

  29. Simon

    Probability matters for AI because systems need calibrated uncertainty: they should know when they do not know, especially in medical applications or self-driving cars. Probability also supports complexity control, structure learning, active learning, black-box optimisation, reinforcement learning, exploration versus exploitation, rational decision-making, and the coherent use of prior knowledge.

  30. Hope

    It is also valuable when data are scarce. Deep learning has achieved remarkable results with massive datasets, but intelligent systems should ideally learn from smaller amounts of information as well. Bayesian methods provide a principled framework for updating prior knowledge as new data arrive.

  31. Simon

    One promising direction combines Bayesian inference with deep learning. Treat a neural network as a probabilistic model whose parameters are its weights, and then infer a distribution over those weights rather than selecting only one value. This idea was explored in the early 1990s by researchers including Radford Neal and David MacKay.

  32. Hope

    Neal showed that a Bayesian neural network with infinitely many hidden units in one hidden layer converges to a Gaussian process. Gaussian processes are elegant probabilistic models that have existed for more than a century. The connection has been revisited in deep learning: sufficiently wide deep models can also approach Gaussian processes, and their predictions and uncertainty estimates can be very similar.

  33. Simon

    These relationships reveal that many machine learning methods are closely connected. Deep neural networks, Gaussian processes, kernel methods such as support vector machines, and linear regression can be related through different modelling operations. Bayesian deep learning has been studied for decades, using approximations such as the Laplace approximation, variational methods, Markov chain Monte Carlo, and dropout.

  34. Hope

    The goal is not merely to fit observed data. We also want sensible uncertainty away from the data, where the system may not know the right answer. That is especially important for robust behaviour on situations outside the training distribution.

  35. Simon

    Another combination of probabilistic modelling and deep learning is the deep sum-product network. A sum-product network gives a compact, deep representation of a potentially enormous mixture model, where complicated probability distributions are represented as combinations of simpler ones.

  36. Hope

    These networks can be trained with stochastic gradient descent and automatic differentiation, using hardware and techniques similar to those used for deep neural networks. They can act as generative or discriminative models, have produced predictive results comparable to deep networks in small examples, and offer better-calibrated uncertainties.

  37. Simon

    They also have useful probabilistic properties: likelihoods can be computed exactly, marginalisation and conditioning can be efficient and exact, missing data can be handled, and outliers can be detected. That makes them a promising area for further study.

  38. Hope

    Probabilistic programming is another major direction. Instead of describing a scientific model only as equations, we can write a computer program that generates possible datasets or simulates a system. A universal probabilistic programming language can express any computable probability distribution.

  39. Simon

    A universal inference engine then works backward from observed data to infer hidden variables and parameters in the program. Normally, a simulator runs forward to generate data. Probabilistic inference asks what parameter settings could have produced the data we actually observed, effectively applying Bayes' rule to computer programs.

  40. Hope

    This has similarities to automatic differentiation, which also works backward through a program, although it computes derivatives rather than posterior distributions. Probabilistic programming languages can express models such as Bayesian hidden Markov models, after which the user supplies data and inference is performed by the system.

  41. Simon

    The larger vision is that probabilistic programming could transform scientific modelling, particularly when combined with deep learning. Examples include Pyro, a deep universal probabilistic programming language developed at Uber and released as open source, and Turing, developed at the University of Cambridge and also open source.

  42. Hope

    So do we already have the mathematical principles needed to build machine intelligence? For perception, deep learning is powerful. For learning, we have optimisation, likelihood principles, and Bayesian inference. For reasoning, we have logic and probability theory.

  43. Simon

    For decision-making, we have decision theory, control theory, Bellman's equation, reinforcement learning, and game theory. Perhaps the missing ingredients are not entirely new principles, but better ways to approximate difficult computations, improved optimisation and probabilistic inference, stronger Monte Carlo and variational methods, plus more data and computing resources.

  44. Hope

    AI also brings major opportunities and social challenges. It could accelerate progress in science and technology, but data-driven systems create privacy concerns. Interpretability is difficult, although machines can sometimes be more transparent or reliable than humans because their code can be inspected.

  45. Simon

    Control is another concern, because autonomy carries risks. AI can concentrate power, but it can also empower individuals by giving them specialised capabilities. Fairness must be considered carefully, and diverse design teams are one important way to make systems more responsive to diverse users.

  46. Hope

    The central message is that AI should be treated as a tool for society and developed to support human flourishing. Probabilistic modelling offers a framework for systems that learn from data and reason under uncertainty, while Bayesian deep learning and probabilistic programming point toward possible future advances.

  47. Simon

    The lecture's questions add some important qualifications. First, the marginal likelihood is sensitive to the prior because it integrates over the prior. Changing the prior changes the distribution over functions, so that dependence is not necessarily a flaw; it encourages us to choose sensible priors rather than treating them as arbitrary settings.

  48. Hope

    However, predictive performance on new data can be more robust to the prior, provided the prior describes a sufficiently flexible space of models. In practice, we may care more about how well a model predicts future observations than about the evidence value by itself.

  49. Simon

    On ethics, fairness, accountability, and interpretability become essential when automated systems affect people's lives. Values can depend on designers, cultures, and the people who label training data. Human language data, for example, can carry substantial biases into language models.

  50. Hope

    Technical responses include better tools for probing models, along with model cards and data cards that improve transparency. But the societal side matters just as much: who designs the systems, whose cultures are represented, and whether the AI community is diverse and representative.

  51. Simon

    Another question asks whether limited computing should be spent on a very large non-Bayesian model or a smaller model with a more complete Bayesian treatment. The answer depends partly on the amount of data. With enormous datasets, larger models may be worthwhile; with smaller datasets, calibrated uncertainty from a Bayesian approach may be more valuable.

  52. Hope

    There is also a promising middle ground: train very large models while improving their uncertainty calibration relatively cheaply, perhaps by retraining smaller parts of the model. Ideally, as more computation becomes available, we move along a frontier toward better uncertainty estimates rather than choosing between capability and calibration absolutely.

  53. Simon

    Causal reasoning is important because an intelligent system must eventually act in the world. To choose actions, it needs some model of what effects those actions will produce. That matters in medicine, economics, and AI, where prediction under interventions is more useful than merely describing correlations.

  54. Hope

    One position is that causal inference can be approached through better probabilistic modelling and prediction across many circumstances, including interventions, without necessarily relying on counterfactuals. The contrasting concern is that counterfactual claims refer to situations that cannot be measured directly, so they should be grounded carefully in observed and potentially observable data.

  55. Simon

    What about autonomous systems obeying human laws? The useful starting point is to treat machine intelligence as a tool, with autonomy that can be constrained. A thermostat is a simple example: it senses temperature and changes the setting according to parameters humans established.

  56. Hope

    A self-driving car is a far more complex example. It needs autonomy to drive, but it can also be programmed to obey traffic laws and placed within a regulatory environment. Questions of criminal liability are legally complex, and existing laws may need to develop as autonomous systems become more widespread.

  57. Simon

    Finally, humans often learn concepts from very few examples, while deep networks may require millions. That remains a significant weakness of deep learning. A simple system that learns from ten examples can be more impressive than a large system that needs tens of millions.

  58. Hope

    Bayesian model selection offers one response. In experiments with small artificial-language datasets, Bayesian hidden Markov models could discover the correct generative structure from roughly ten or twenty examples. Sometimes they found compact representations more systematically than humans did.

  59. Simon

    So the overall lesson is not that deep learning should be discarded. It is exceptionally powerful for perception and large-scale pattern learning. But probabilistic methods can add calibrated uncertainty, prior knowledge, structure learning, causal reasoning, and stronger performance when data are limited.

  60. Hope

    And the most promising future may combine these strengths: deep models for flexible representations, probability for uncertainty and rational updating, probabilistic programs for expressive scientific models, and decision and causal frameworks for acting responsibly in the world.

  61. Simon

    That brings us to the close. The goal is not simply to build machines that imitate humans, nor systems that act autonomously without understanding their limits. It is to develop intelligent tools that complement human abilities, remain as trustworthy and fair as possible, and contribute to human flourishing.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent