Science & Technology Q&A for Kids (and others) [Part 148]

Transcript of a Stephen Wolfram episode of a Science & Technology Q&A (informal, pedagogical). Wolfram explains machine learning in lay terms (learning from examples vs. step-by-step programming), artificial neural networks (layers, neurons, weights, activation functions such as ReLU), training via backpropagation and alternatives using discrete rule arrays and random mutations, and contrasts ML strengths (human-like perception, language, generative models) with systematic computation tasks. He also discusses thermodynamic/randomized computing ideas (trading precision for randomness and energy efficiency), explains evaporation and phases of water (molecular motion, surface escape, boiling point), and clarifies volume vs. mass vs. weight (mass as inertia, weight as gravitational force, volume as space occupied).
Questions this video answers
About 14 years ago (Wolfram's estimate).
9.8 meters per second squared.
About one sixth of Earth's gravity.
1 gram per cubic centimeter (1 g/cm³).
Typical computer: about 100,000 electrons per bit; proposed reduced example: ~100 electrons per bit.
Chapters
Hello, everyone. Welcome to another episode of Q and A about science and technology for kids and others. Let's see, I always, I come, I sit down here. I see there are all kinds of questions. I never know what's going to come up here. Let's see. All sorts of interesting things. All right, I see double is asking, what is machine learning? In layman's terms, I should know something about this because I just posted this thing yesterday about what's really going on in machine learning. Let me see what I can do to explain this. When you write a computer program, the typical thing that you are used to doing is telling the computer step by step, this is what you should do. If you will get a number as input, then you take that number and you multiply it by two and then you give that the output of the result from that. Or you take in an image and you find the places where there are rapid changes of color and you highlight those to find edges or something. You're kind of telling the computer sort of step by step, given what it intrinsically knows how to do, you're telling it what you want it to do. Now, my own effort in building Wolfram language over these years has been to provide sort of a range of primitives, what you could tell the computer to do that kind of correspond to the things that are sort of high level computational things that you might want to do. Like there's a function in Wolfram language that's called edge detect that will take an image and will replace that image by an image of just the edges. Or there's some function that will tell you the geodistance between two points on the earth or something. But the general way that one uses one programs a computer is it has certain operations that it knows how to do. You tell it how to string together those operations to do whatever you have in your mind for the computer to do. So that's sort of the standard way of doing things. Machine learning has a somewhat different idea. Machine learning. The idea is you tell the computer, here are examples of what I want you to do. And then just follow those examples and do your version of those examples. So for instance, you might say, here's a whole bunch of, let's say, handwritten digits, 1, 2, 3, 4, 5, and you show the computer examples of a thousand different ways to write a 2, and then you say to it, okay, learn from that. Now I'm going to show you an image of a digit and you tell me what digit it is. So you never told it step by step to recognize a 2. You look for the rounded bit at the top and the flat bit at the bottom and things like that. All you did was to show it a bunch of examples of twos and then said, go use those examples to decide what to do. So the essence of machine learning is that, that you want to learn from examples and then follow those examples. Now, what gets very tricky almost immediately is, well, you've got particulars, you've got this type of handwriting and that type of handwriting and so on. But what if it's another kind of handwriting? What will happen then? You haven't told it what will happen. It's kind of for it to determine by the innards of its machine learning process what to do. So give another example. Let's say you want to teach it, as became really possible about 14 years ago or so now, to recognize, let's say, 5,000 different kinds of things in the world, cats, dogs, elephants, airplanes, cars, trees, whatever else. So each of these things, you might give it, oh, I don't know, a thousand examples, ten thousand examples of each of these. So ten thousand pictures of cats, ten thousand pictures of dogs, et cetera. And you say, okay, I'm going to give you these examples now I'm going to show you a picture. What's in this picture? So, for example, that one question would be, let's say that somebody has rather unreasonably taken their dog and dressed it in a cat suit and put cat ears on the dog, so to speak. Then the question is, should that be classified as a cat or a dog? A human might make some decision, might have some argument about what should happen, but the question is, what does the generalization, what is the extrapolation that's done by this machine learning system? At what point does it say, oh, the dog is so encased in the cat suit that I'll call it a cat versus I know it's a dog inside there type thing. So that's sort of a tricky aspect because when you're writing a program in a sort of computational formal way, you've defined this is what should happen. I know you may not be able to foresee exactly what the consequences of the program you set up are, but at least you've defined a definite path for sort of the steps that you should take to do what you're doing. Okay, so that's kind of the objective of machine learning, is learn from examples and do this kind of generalization. Now, how does it actually work? Well, let's see. I mean, first thing is, what are some Examples of where one might use machine learning. An example would be to recognize an image of text, read off the actual letters and words in the text. So called optical character recognition. Ocr. That, that was a classic example of machine learning where it was kind of set up in the end by just giving it a whole collection of examples of. These are different fonts, these are different images. It's like, now sort of learn from that to recognize this. Another one was the one I just mentioned of recognizing, classifying different kinds of images. What is this image? Is it a cat? Is it a dog? More usefully, you know, you've got an X ray image. Is it a tumor? Is it not a tumor? Is it or something, some other kind of thing, you know, is this piece of fruit ripe or not ripe? Those kinds of things. So that is the, the task of kind of classifying things. And a typical type of task would be to classify something from an image. Is it a cat or a dog? Whatever else. Another thing you might want to do in classifying things is, here's a piece of text. Is this a piece of text that is very enthusiastic positive sentiment, or is this a piece of text that's negative sentiment? Is it a thing that's saying when it reviews this product, this is the greatest thing since sliced bread? Or is it a thing that's saying, this is terrible, I threw mine in the trash immediately. Can you classify, Is that a positive sentiment or a negative sentiment? That's another kind of example of a classifier. Another thing you might want to do. Well, there are many generalizations of that. Another thing you might want to do is to say, I've got all these examples of things. There are all these different pictures of galaxies or whatever else. Try and arrange those galaxies in a way where you're clustering galaxies that look similar together. You kind of say, imagine that there are different features of these galaxies. Some are spiral galaxies, some are globular clusters, some are this and that and the other. And somehow without me telling you, look at how round they are, how elongated they are and so on, just figure out some way of categorizing them so that you can kind of draw them. And in sort of a feature space where you say, these are the ones over here and they all happen to be spirals, Here are the ones over here, they all happen to be spheres and so on. That's kind of another. Another application, another one. You know, there are. Another kind of thing would be something like, here's a piece of speech and a sound, an audio file or something. Like that. What are the words from this audio file? Or this is a chirping sound. What kind of bird made that chirping sound? There's some that are kind of more direct classifying. Like, here's a chirping sound. Name the bird. There's some that are more like kind of a more running thing. Like, here's a bunch of audio. Tell me the whole collection of words that were made, the whole sequence of words, what was said in this audio, those kinds of things. So those are other kinds of sort of tasks for machine learning. Then one that's come into great prominence recently is generative AI, where one is not just saying, what is this classified, is it this or that? But one instead is saying, I want a thing more or less like this. Generate one for me. And the most. Well, there are a couple of common cases of this. One is what large language models do and things like ChatGPT do, where their fundamental operation is, I've got a piece of text. What's a reasonable way to continue that text? So, classic example might be the piece of text is the cat sat on the. What's the likely next word? Okay, it's Matt. Okay, what if the text was tell me a story about a blue wolf. And that is sort of a prompt. And the idea would be sort of continue that in a way that is somehow typical of the way that one has seen examples of that being continued on the web. Now an important example of that particular case is, let's say, tell me a story about a blue green wolf with yellow antlers, not the wolves have antlers. You can pretty much guarantee that that prompt has never occurred on the web. So what has to happen is this AI system, this machine learning system, it has learned from examples on the web, but the way that it continues has to be based on sort of the innards of, of the thing it learned, not sort of a literal. Oh, yes, I've seen one like this before on the web. Another example, just to sort of fill this in, would be generating images or videos or something from, let's say, a textual prompt. Where what you're roughly trying to do again is to follow the example. So let's say you're generating images, let's say you've seen billions of images from the web or something. And then what you're doing is you're trying to make that arrangement of pixels that sort of is like the arrangements of pixels you've seen on images on the web, but you're trying to guide the particular arrangement of pixels to be One that, for example, you would classify as being a picture of a crocodile dancing on the moon or something, where the thing that says, what is this picture? Would say, oh, yes, based on the examples, I know this is a crocodile dancing on the moon and so on. Okay, so that's sort of the objective. Now, how do you actually make this work? Well, what you want to do is have some system where you give it a bunch of examples, and it will be able to sort of adapt itself to the point where when you give it another example, it will kind of follow the. The path that from the examples you already gave. Okay, so how would you actually do that? Well, there was this idea that people wondered, how did brains do that? And actually, I've just been researching some of this ancient history, but already by kind of the late 1800s, people have been sort of imagining, oh, the brain is made of all these nerve cells, and they're all connected, and there might even be billions of them. And somehow that collection of nerve cells and the electrical interactions, they knew they were electrical already at that time. Interactions between them somehow have the result of doing these thinking kinds of tasks. They hadn't been nearly as crisp in the kinds of tasks that one might sort of think about as we will be today. But any case. So what then happened is in the 1940s, people started saying, well, what about making kind of artificial versions of what seem to be in brains? What about making neural networks that are like the neural networks that we have in our actual brains? Maybe we can get them, these neural networks to learn, kind of like humans learn. Okay. So for a long time, this really didn't work out. It was like there were toy examples and there was. It wasn't really clear it was working. And then it. In the beginning of the 2000 and tens, suddenly a bunch of stuff along these lines started working. And it seems to be the case that we kind of have this model of sort of human, like, thinking that we can capture in these artificial neural nets. Okay. And that's kind of how most machine learning today is done, is using artificial neural nets. How do they work? Well, let's see. I just wrote this piece on a kind of a new way to have them work. But let me explain the kind of traditional way that they work. And maybe I'll a little bit about the new ways to think about how they work. But the kind of. The idea is you've got a bunch of neurons, artificial neurons. These artificial neurons, they are arranged in a bunch of layers. So it's like a layer of neurons and that layer of neurons gets its inputs from a layer of neurons above it. Let's say you kind of have this cascade going on where every neuron is getting inputs from neurons on the previous layer and so on. And at the very beginning, there's the input of. You've got all the values of all the pixels in the image or something. And you feed that to the first layer of neurons, and then they feed their values through to the next layer of neurons, next layer of neurons, and eventually 200 layers later, you've actually not even that many for these kinds of tasks. But let's say 50 layers of neurons later, you have a neuron which kind of lights up when it's a picture of a cat as opposed to a picture of a dog. Okay? So these neurons, as you go through the input, is basically a bunch of numbers. Those numbers could represent kind of the character codes of characters in a piece of text. They could represent the values of red, green, blue pixels. They could represent a sound intensity. They could represent any of those things. But basically it's an array of numbers that come in, and each number is sort of assigned to a neuron. And then you're going through these layers of neurons where as you go through these layers, every neuron gets a value. So at the beginning, a particular neuron in the first layer might have value 0.2, and then another neuron, the next layer might have value minus 0.6, and then another layer neuron might have value 2.3. You keep going, you keep going, you keep going. And then, for example, a typical thing might be, let's say you were recognizing digits 0 through 9. Let's say then at the very end, there might be a layer that just has 10 neurons in it. And those 10 neurons are sort of, we know, are associated with digit zero, digit one, digit two, and so on. And then what would happen is that at the end, the value of those neurons will be such that the, the neuron associated with the digit seven has value one, and basically all the other neurons have value zero or very close to zero. And then you say, okay, I recognized it's a seven type thing. So the idea is you're flowing through from the array of numbers at the beginning, you're going through the inside, where all these neurons keep getting these, as they go from layer to layer, they get different values. And then it comes out. And then you interpret the, the numbers that you get out at the end. For example, in the case that I just mentioned, you might interpret it as, oh, I see that the 7 neuron is sort of lighting up with value 1, and all the other ones have value 0. So I know I got a 7. Or in something like an LLM, you might have an array of 50,000 neurons on the last layer that more or less represent words in a language. And you might see, oh, the, you know, it brightly lights up with the word mat and then the word sofa lights up a little bit less. And that tells you what's the likely next word that you're going to put down as the LLM keeps running and generating text. Okay, so that's kind of the idea. So now the question is in a little bit more detail, how is this set up the way it's traditionally been set up? It's a big question of which a particular neuron, where does it get its values from? So the simplest thing is a fully connected network where a neuron in a particular layer gets its values, gets sort of a number from every neuron on the layer before it. But it doesn't just take those numbers all as they were. It has a collection of weights. So every connection from one neuron on the first layer to the neuron on the second layer has a weight associated with it. That weight might be 1.6, it might be minus 0.02. It's some number. Okay. And the way it works is the way the typical neural net works is you just take the value of the neuron on the layer before you multiply that value by the weight associated with the connection to the layer up to the neuron on the next layer. And then you take all those numbers multiplied by weights and you add them all up. Just simple addition, just add them all up. And then, well, you also typically add a constant to each one of those, a bias to each one of those numbers, and then you get some number. It might be 7.3 comes out, or it might be minus 0.26 is the thing you get by adding up all of those values multiplied by weights, adding biases. So what do you do with that number? What you do with that number is you run it through an activation function. So in the very earliest neural nets, the activation function was just if the value is less than 0, if that total is less than 0, make the result be 0. If it's greater than 0, make the result be 1. Many more modern neural nets do something that's really pretty close TO that called ReLU, a rectified linear unit, where if the value is less than zero, it's zero. If the value is greater than zero, it's just equal to the value. And then there are slightly more elaborate activation functions that have little swish shapes and all kinds of things like this. But basically what happens is this total is run through the activation function which is sort of thresholding it and trying to turn it into something a little bit closer to like 01. And then out comes a value. And that value is what's then used by the neurons on the next layer and so on. And much of the technology of neural networks has to do with exactly what this pattern of connections should be. So in the simplest case, everything's connected to everything. Then you can have so called convolutional neural nets, which are used often for dealing with images and things like that, where there's some definite geometry to what the. You know, you've got all these values of neurons, but you know that these neurons are in a two dimensional array near to other neurons. And so you basically want to have sort of the connections between neurons are more from neuron to neighboring neurons than just a neuron to any other neuron that could be there. Or for example, the big innovation in large language models, transformers, they are basically looking at a sequence of neurons and thinking of them as laid out in a string bit like text words in a piece of text. And then a transformer is saying, okay, I'm going to look at this value and I'm going to base my new value on only values that were to the left, let's say, of the new neuron. And I'm going to kind of probe which values I look at and I'm going to kind of learn which values were worth looking at, whether it was the one that was three back and 18 back and 257 back and so on. I just sort of have these little taps that access the past in my string of values. So that's, that's kind of. So there's a bunch of ideas about kind of how you, how you set up the neural net, how you connect it together. There are also ideas about, you know, how many neurons do you have at each layer? And do you kind of squeeze it down so that the thing has to be transmitting its information through some very compressed number of neurons in the middle of its, of its, kind of in the middle of its process. Okay, so that's how you might go from the input to a neural net to its output. But how do you determine what that transformation should be? Well, the answer is you have to give examples and you have to learn from those examples. So let's say you have this Neural net and just came out of the oven, so to speak. Not that neural nets go in ovens, but you're just starting it off. And what you typically do is just assign random weights to all these neurons. Just say it's all random. Well, then if you say, well, given this input, what output comes out? You might put in your picture of a cat and out comes telephone or something as the thing that it thinks it is completely wrong. Might say, there's a probability of this for a telephone and a probability of that for a table and a probability of that for an elephant and so on. All complete nonsense. Okay, okay. But you're looking at all these examples that you have, and you know that it's nonsense. So the goal is to basically be able to use. To be able to get it to adjust the weights that it has to make it be less nonsense. And as soon as it manages to get it right, it's like, okay, you're a winner. We want to keep those weights. We don't want to change those. And it finally says, yes, it's a cat, you know, as opposed to keeping on saying, it's an elephant. Then you're like, okay, we don't want to change those weights now. And, you know, maybe something else it'll say, gradually, you know, you feed it a different picture. You feed it a picture of a tree and it says, it's a macaroon or something. And then again you're like, no, it's a macaroon. And you sort of push it in that direction. So you're always trying to adjust these weights so that the thing will be more correct more. Follow the examples that you give. So you do that. You might do it a million times for some simple training of digits. You might do it a billion times or a trillion times or more for a more sophisticated kind of training. You keep on just bashing it and saying, hey, you got it wrong. Move those weights more in a direction towards what you would need so that you're moving the output to be closer to the correct value. Okay? So the traditional way to do this is these are all continuous numbers, and you're using essentially calculus to say, okay, you want to make a change to the output. That change to the output is you use the chain rule of calculus to say that that sort of. As you want to change the output, these are the changes that you need to make to the weights, sort of at intermediate stages, roughly. You can think of it this way. If you literally have a chain and you've got links in the chain and you've got. And then you have the bottom of the chain. Maybe not. Let's not have an actual chain. Let's have a linkage where you've got kind of links from one rigid chain sort of piece to another. Well, then you say, okay, I've got to move the end of my chain, linkage, whatever, to be closer to the cat and further from the elephant, let's say. How do I do that? Well, some part of moving it has to do with the later links in the chain. I got to move in this way. But I've also can kind of propagate up the chain. And I can see, well, how much do I have to move the links at the beginning of the chain in order to get from the elephant to the cat. So that's roughly what you're doing in neural net training called back propagation, usually where you're trying to say, hey, I want to get the output to move in this way. What do I have to do, these weights to achieve that change in the output. And what you're typically doing is, as I say, you might be doing this a billion times. Just keep bashing it. Oh, no, that's wrong. Do this, do that. And sometimes, you know, there's a lot of kind of, kind of black magic in. Exactly. If you've got, you know, let's say you've got a billion examples, or let's say you've got 10 million examples, how many times do you run through those examples? In what order do you run through them? You know, do you keep. Do you run through them about once, or do you come back and you have to say a hundred times, hey, look at the same example again and again and again. So there's a whole bunch of detail in how that's done and a certain amount of folk information about how that's done. The thing I just worked on, I was trying to understand sort of what's going on inside machine learning. And so I was trying to simplify this whole process of, okay, these neural nets where everything's connected to everything, and they've got all these continuous numbers and it's hard to see what's happening. So I decided, let me try and make it super simple. Let me just have these neurons just in a grid. Not everything's connected to everything, but just in a grid. And instead of having something where we have kind of numbers and weights and so on, just have discrete values, just have, let's say, a grid. And on that grid, at every point on the grid, you can take the values coming from the layer before, let's say the two neighboring values from the layer before and just say do one of two operations. Like for example, if you're doing sort of technically, let's say do an and of those two inputs or an XOR of those two inputs. And that's all you get to do. You just get to make this array where you've chosen ands and xors and you're rippling through from the top of the array down to the bottom of the array. And how do you learn in that setting? Well, the most straightforward thing you can do is it's just random mutations in that array. Something was an and change it to an xor. You do that at random and you simply say I'm going to keep those arrays that do better. When I look at my training, that improve the results from my training, I flip one of those things and I rerun a bunch of training examples. And if it does better on those training examples, I keep the change. If it does worse, then I throw out that change. So a very kind of very simple minded way of saying let's adapt by just making random changes and seeing whether it gets better. Okay. Surprising thing is that works. I didn't do the most, I didn't do, I didn't build an LLM that way. I actually started building a little proto LLM. We'll see how it goes to scale it up. But did some simple tasks and turns out that's all you need. Just this completely discrete values. You don't need these weights, you don't need calculus, you don't need all of these things. Just doing these random mutations is enough. You can make it a bit more efficient. There's a kind of booleanized version of calculus that I came up with for doing sort of a rough analog back propagation. This is all rather technical and complicated, but probably relevant in practice. So that means that the thing that so you can, it's enough to just have discrete values. By the way, one thing that's interesting about that is traditionally in computers, computers ultimately are dealing with bits, ones and zeros, things like that. Everything has to be built up from bits. When one's dealing with neural nets, it has seemed to be the case that one's fundamentally dealing with with real numbers, floating point numbers, infinite precision numbers, 2.738464 going on rather than just 2 or 6 or 7 or whatever. So it has seemed that neural nets kind of use sort of real numbers in an important way because they're kind of using calculus to be able to learn and so on. I think it's completely unnecessary. I think it's sort of an interesting quirk of history that that's what neural nets were set up with. But I think it doesn't need to be that way. And that has a bunch of significance for things like the kinds of computers you need in order to run neural nets efficiently or something analogous to neural nets, machine learning efficiently, and so on. Okay, but the other advantage of being able to do these very simplified versions of machine learning, where you have just these rule arrays and things like this, is neural nets are very hard to visualize what's going on. You've got all these neurons all connected to each other. It's like, what on earth is going on inside there? You try and make a picture. Everything's connected to everything. You can't lay it out in a nice way. It's a big mess. But with these arrays, you can actually make pictures. And what you see is in some ways a bit shocking. It's just really complicated in there. When it learns, it doesn't learn the way that you might think it should learn, where it's like recognizing all these kinds of structures and it has some whole mechanism where you can recognize the pointy ear thing, recognizing cats. And you can kind of see, oh, yes, I could have written that program myself, but I didn't. I let the machine automatically make it. With machine learning. It could have been the case that what you would see inside was essentially the equivalent of what a programmer, a human programmer would have written or something where we can sort of understand its mechanism. But that's absolutely not what you see. What you see is an incomprehensible mess. And what you see in particular is you see these kind of computational processes that are going on, and they flap around in complicated ways. And what you see is that what essentially is happening is that the machine learning process, the training process, is picking out sort of ones of these sort of complicated lumps of computation that happen to fit what you want. It's not that they were carefully engineered and very, you know, carefully polished to fit what you want. It's just they were this weird shape, and they fit in this template that you've defined to get, you know, recognizing cat pictures or something. So, you know, an analogy I guess I was making is this. If you have sort of. If you're building a wall, you can build it out of bricks, you can build it out of stones. If you are doing sort of the engineering thing, building it out of bricks that are all the same shape where you make this nice pattern of, you know, of sort of alternating bricks and so on. That's. That's what you do. Okay, Plan B is I'm building a stone wall, and I'm going to use the stones that are lying around. They happen to be certain shapes. So what I do is the next piece of the wall. I have to say, oh, let me find a stone. It's roughly the right shape. Let me put it in there. So you do that. Well, you can build a stone wall. Around where I live in Massachusetts, there are lots of very fine ones. It's. But it doesn't look like a brick wall. A brick wall. It's very well defined. There's a definite pattern to how the bricks are laid out. Stonewall is not like that. It's just, well, those are the stones that happen to be there. And, you know, you found a way to fit them in. That's much more what seems to be happening in machine learning. What seems to be happening is these neural nets or simplified neural nets or whatever they are, they do certain lumps of computation. And what you need to do to figure out sort of can you train it, is can I find the lump of computation that fits the thing I want to do? And so that's sort of what's going on. And so when you say, why is it set up this way? There isn't really a good answer. It's, well, because this particular stone happened to be lying 10ft away. So I picked it up, type thing. It's that level of explanation rather than, well, there's a whole story about how this mechanism does this and so on. It's basically, it happens to work. Okay, so one of the questions then is, if it sort of happens to work, how does it generalize things? How does it, you know, you've set it up with these particular examples. How does it generalize from those examples when it wasn't a cat that looked exactly pixel for pixel, like the cats that you gave it in its training, but it's kind of generally cat like. How does it determine what generally catlike means? We don't really know yet. The only thing we can say is it seems to work well in tasks where the discrimination we're asking it to make is going to be similar to the ones that humans make. In other words, somehow when it generalizes, it does it in a way that's familiar to us. It's very human like, generalization. Well, maybe that's not a surprise, because maybe neural nets, which were originally modeled on human brains work Kind of the same way the human brains work. So it's not surprising that the generalizations that are made by these artificial neural nets are ones that are reminiscent, familiar ones that are like what brains make. I think that when you look at the tasks that neural nets are successful at, most of them are tasks that are sort of. Sort of correspond to tasks that we humans do. Recognizing cats from dogs, being able to know what the next word that we should say is. Those kinds of things. If we ask it, on the other hand, to do something that's like a complicated math problem or something that requires sort of many computational steps, or we just say, even run this program, and you say to the neural net, run this program. It really doesn't have a hope. It's not doing that kind of thing. It's not doing the kind of thing that a sort of ordinary computer does where it's got these definite rules and just applies the rules and does it, you know, a billion times and just step by step by step by step, does something. Instead, it's trying to sort of flow through these. These pieces that are kind of assembled like the stone wall and so on. And did it happen to, you know, did you lock into that piece? It's kind of like, oh, I don't know. It might be maybe a bad analogy. The game that in British English is called Snakes and Ladders. American English, Chutes and Ladders, I think, where you're kind of going along and sometimes you get on this ladder, the snake and so on, you hit that thing and it makes forward progress or whatever else, or backward progress. And I think that's kind of more the thing that's happening when you're kind of, you know, you're sort of connecting in some useful way in a way that sort of corresponds to the kind of ways that we humans will also recognize things. Now, there's some examples where it seems like one sort of going beyond the typical human experience. So that's a separate thing to talk about. I think it is actually much more. Many of those examples are, in the end, the thing we care about. About that example, even though it's about folding proteins or whatever else, the thing we care about is a kind of human feature of the output that, again, throws us back into the do as the humans do type thing. So a rough description of machine learning. Let's see. Gosh, I have questions here. My gosh, you guys are asking me all kinds of very different things. Let's see. All right, there are a lot of different questions here. I'm sorry. I'm just. There's a question here from Frog. What do you think about opossums? Mine is getting big. It's over £3 now. I have to admit, I have no special opinion about opossums other than they've got a cool name. Okay, well, let's get off. Machine learning, I think. One more question about machine learning here from Erin about thermodynamic computing. Let me try to explain that, if I can. So one, when you do a standard computation on a computer, you define certain rules, you expect the computer to follow those rules and get you an answer. You don't expect the computer to just sort of right in the middle, kind of randomly do this or that. You expect it to follow the rules you specified. Now, sometimes maybe it's useful to just sort of try things at random and not just so, for example, here's an example you might think about. Let's say your. That's a good case. You're trying to. Well, some of these things I was just mentioning with machine learning, you're trying to find an arrangement of weights in this machine learning system or an arrangement of rules in the rule array that will make the machine learning system do a good job of reproducing these examples. So one thing. How do you do that systematically? Well, it's not necessarily clear. How do you do that by just randomly trying something? Well, that might be the best thing you can do. Just randomly try it and see if it works. So that's kind of an example of a randomized algorithm where you're not saying, I know exactly what to do. I always try the first example, then the second, then the third, then the fourth. You say, just try it at random. There are many cases where saying do the first one, then the second one, then the third one, you get stuck all the time. Whereas if you just say, try a random one, there's a good chance it will work, and then you're done, so to speak. So a good example of this that's much more abstract is in checking whether numbers are prime numbers, 2, 3, 5, 7, 11, etc. Where there's no way of writing that number by multiplying together two other numbers, like the number six, for example, is two times three, but the number five, there's nothing you can multiply together to get five other than five times one. So prime numbers. Question is, can you tell whether a number is prime? Okay, and turns out chap called fermat in the 1600s came up with a thing. There's a thing called Fermat's last theorem, which is pretty famous sort of long unsolved problem in math, which was finally solved, solved 20 years ago or so now. Actually, it's 30 years ago. Now there's another thing called Fermat's little theorem, which is this funny result that says you take a prime number and you raise it to the power of another number and you do modular arithmetic, you reduce it modular another number. Then if that exponent number is a prime, then you'll always get a particular residue out. The result of that computation will always be one, let's say. Okay, but so it says that will happen if that thing in the exponent is a prime. It also occasionally happens when it isn't a prime. But so an algorithm somebody invented, oh, I don't know, 30, 40 years ago now is the algorithm. Well, just try different raisings to the power and modulo whatever. Just try it for a bunch of different bases and just see whether for you're trying to test if a number is prime. So what you do is you say, I'm going to do this computation for various different base numbers and so on, and just see, is the residue always one or not? If it isn't one, you're done. You know, it isn't a prime. If it keeps on being one, you get more and more evidence that it is a prime. And so it's a probabilistic algorithm, but one where just trying it at random is really a good strategy. If you tried it from the smallest to the next one to the next one, you would run into all kinds of weird pathological things. But you do these sort of special cases, that isn't the right thing to do. It's better to just say, just try it at random. That's the best chance you'll have of getting a good estimate of what the answer is. Okay, so the question is, well, when people were first building digital computers, the big thing they were worried about is let's get rid of any noise, let's make sure we really get precise answers out. And in fact, people, when they were first building digital computers, were very worried that there would be a certain rate of errors and that those errors would accumulate and they would prevent you ever being able to do correct computations that didn't pan out. Because the error rate in a computer is unbelievably small. Like a computer. My computer might run doing billions of instructions per second, might run for a year without ever having a glitch, or even much longer than that. And glitches often come from things like cosmic rays, but even those don't usually cause glitches these days. So it's really digital electronics is very noise free. But there are these algorithms where you really want some randomness injected. And so now the question is if you don't worry about, about making this perfect digital electronics, if you back off from that and you say, okay, we can have some randomness. Well, a couple of things are true. One, that randomness might be useful in a bunch of these algorithms. And two, by allowing yourself to have that level of randomness, you can potentially have a more, a faster, less power usage, et cetera, kind of computing type device. So for example, in a typical computer, there are about 100,000 electrons that represent every bit of information in the computer. But let's say you take that down to 100 electrons, well, every so often there'll be just a few electrons that are a little bit off, out of kilter and so on. And that thing that was supposed to be a one, you'll read it as a zero. But if what you're trying to do is a computation where you want randomness, that's okay. So kind of the idea is lean into the randomness, so to speak, but ramp down the, you know, just drive the computer so hard that it's, you know, you're not letting it do what digital computers have been doing for the last 60 years, which is, you know, try to really get a precise digital answer. So that's kind of the idea. I don't know how well it will work out. Sort of an interesting thing to think about. It's interesting to imagine a lot of the algorithms that we've got and developed are sort of ultimately based on the way that computers work. Right now if you have a different infrastructure for how computers work, how would you change that? I have to say though, that when you say this randomness, one of the things that's confusing is, well, it looks kind of random at first, but if you really home in on where does every electron go and where does the randomness come from? It's sort of heat of molecule of atoms bouncing around and so on. You realize that if you start running your sort of thermodynamic computer really fast, the thing that you thought was going to be pure randomness and where the simple theory said it's pure randomness, it won't be pure randomness. It actually has dynamics of, oh, this atom moved this way and vibrated that way, and a nanosecond later it will vibrate back. And so there will be a correlation between what happened Then and what happens now? And so on. So it's a little bit more complicated than just saying let's approximate it by saying it's all perfectly random. Let's see. Gosh, there's some complicated philosophical questions here. Let me see what I can. Okay, from George here, very different kind of question. Question is, how does water vapor work? Says when the sun shines on the ocean, it doesn't get to 100 degrees. So how does water escape being a liquid and rise up to the clouds? Good question. Okay, so, all right, so water consists of water molecules. And the question is sort of how are those water molecules packed together? So in ice, for example, the water molecules are packed so that they are arranged in a particular regular arrangement. Actually there are many forms of ice. There are, I don't know, maybe 15 known now. And you get different forms of ice depending on how much pressure you put the ice under. At the bottom of a glacier, it will be different than what you in your typical ice maker or something, or something like that. So in ice, water molecules are arranged in a very regular array. So it's just, you go one water molecule, then the next one, then the next one, and they're all just lined up in a very regular fashion. Maybe not a single crystal of ice. The core of a snowflake, for example, will be a single crystal of ice, typically a hexagon. And the molecules of water are arranged in this particular array. That leads them even in the exterior to have a hexagon. The way snowflakes grow, they're sort of overgrowing. And so they're arms that grow out. And when an arm kind of pokes out, it releases some heat that prevents anything sort of forming on the snowflake right nearby. And so you have this growth inhibition that ends up with these kind of separated arms growing. But that's a separate issue. The main point is that in ice, the water molecules are all arranged in this regular array. Okay, how about in water vapor? Well, in water vapor, the water molecules are just running around at random. Much lower density of water molecules in ice they're packed, they're closely packed. In fact, some forms of ice are so called hexagonal close packed crystals where the things are just sort of arranged kind of think about it like in a grocery store where you see spherical fruit, oranges or something arranged in this, you know, maybe it's a pyramid shape or something where the oranges are packed in and there's around every orange, there are 12 other oranges actually that are in this particular packing that's a sort of close packing that. In fact, we know now that that is the closest packing you can get of spheres and three dimensions. Okay, so. And that's what happens that ice has a particular packing of water molecules. One form of ice packs water molecules pretty much like that. So they're as packed as close as possible. In a gas and water vapor, they're not close at all. They're running around, they're going at a high speed, and they're just crashing into each other. And, you know, in typical air, for example, a. Let's see. I think a typical air molecule at typical room temperature and pressure goes. I think it goes about a millionth of a meter before it crashes into another water molecule. But that's a long way because the molecule itself is less than a billionth of a meter across. So it's gone a long way before it crashes into another. Another molecule. And that's in a gas. That's the typical thing that happens. Okay, So a liquid is intermediate between those things. It's not the case that molecules in a liquid are packed in, sort of all arranged so that they're as closely packed as possible. Nor is it the case that they're sort of going around and moving a long distance before they hit another molecule. Instead, liquids are a very weird thing that really isn't that well understood even now where the molecules are kind of. Well, they're sort of packed in and they're pretty close, but they still have enough wiggle room that they can kind of flow freely from around the liquid. They don't flow completely freely. That's why liquids have viscosity. They have a. I mean, even gases have viscosity as well, but it's much smaller than liquids. There's a lot of sort of resistance to starting motion in a liquid because you've kind of got to move those molecules out of the way and so on. So the liquid has molecules sort of packed in, not as close as a solid, but they're not sort of freely moving like in a gas. So, for example, one difference in a gas, if you put a gas in a container, the gas is going to fill that container because the molecules, if the molecules there are only molecules there, they'll just keep going in that direction until they hit the wall of the container. On the other hand, a liquid, the molecules are sort of packed together at a certain density. And so, for example, if you put your water in a bigger container, well, it's not like it expands to fill the container. If it's in gravity on The Earth, it will just go down to the bottom of the cup or something. If it's on the space station in microgravity or whatever, zero gravity, then there'll just be a blob of water sitting in front of you. And that blob of water is a certain size. It doesn't expand to sort of fill the space station, so to speak. It just is that size. And what's happening is that the water molecules are attracting each other. So typical molecules have a certain force of attraction between molecules. We can explain how that's produced. In the end, it's a story of quantum mechanics and so on. But basically, molecules will always have a certain force of attraction between them. If you push them too close together, they'll also have. At the core, they'll have a repulsive force. So they have typically kind of how much force it goes to. They're attractive. They don't feel much force at all. When they're far apart, it's attractive, and then it's repulsive again. In the center, it's repulsive. So a typical thing for molecules are these things called Leonard Jones potentials, where just to fill in some Math, there's a 1 over R to the 6th, a 1 over R to the 7th attractive force, 1 over R to the 12th repulsive force is the typical kind of thing. So anyway, this means that molecules like to kind of attract each other a bit. But if you try and crush them too close together, they'll sort of push themselves apart. So you can't crush matter to nothing. You'll be having repulsive forces that kind of hold matter from being crushed to nothing. But on the other hand, there'll be a tendency of these molecules to hang onto each other. Okay? So in water, normally the molecules are hanging onto each other. So, for example, in that blob of water that you might have on the space station, the molecules are hanging onto each other tightly enough that they're making this blob. Okay? If you poke the blob, it'll blob around, so to speak, and it'll move and the water will rearrange itself, all that kind of thing. But fundamentally, the molecules are holding onto each other tightly enough that they just make this blob. Okay, well, at the surface, there will be molecules that are like. They happen to be kind of running towards the surface. They get to the surface and, oh, they're actually going so fast that they escape the surface that the forces that kind of pull them back to keep them part of the blob don't manage to pull them back. Instead, just because of sort of the random motion of molecules. Molecules always have a certain amount of random motion. The amount of motion is determined by temperature. Basically what temperature is is the amount of motion of molecules. So these molecules will always have a certain random sort of motion. And if that random motion is just wrong, the molecule will be heading for the surface. It hits the surface, it escapes, and then it's a piece of water vapor. So the liquid is where the molecules are all sort of pulled together enough that they stay in the blob. But you get a certain rate of evaporation that is associated with molecules that hit the surface and don't get pulled back in again. Now what happens is that there is a phase transition where you take the water, you heat it up at standard pressure to 100 degrees centigrade, and it all turns into gas. What's happening there is that the forces between these molecules basically they just sort of give up. By the time the average energy associated with the sort of motion of these molecules is bigger than something. They basically all the molecules just lose their connection, lose the ability to. They're running so fast that these forces can't pull them in and make them a liquid. So the thing becomes a gas. And that happens at a very well defined temperature. It's a very discrete transition that at that temperature, kind of the forces of motion sort of outweigh the forces of the molecular forces pulling them back. Okay, so that's what happens in the bulk material is at a fixed temperature, there's a phase transition. It all turns from liquid to gas. Okay, but even below that temperature at the surface, there will be some molecules that are going fast enough that they escape the intermolecular forces. And there are roughly. There's a distribution of speeds of molecules. It's not so easy to figure out what it is in a liquid. It's easier in a gas. In a gas is an exponential decay in the speeds of molecules. Actually in the kinetic energy, it's E to the minus V squared for the speed. There's an exponential, it's exponentially damped. So, you know, at twice the speed there are, you know, let's say half as many molecules at four times the speed there are. I'm not saying that, that very well, but, but it's, it's, it's, it's a. Every, every time you double the speed, you're, you're, you're increasing the exponent of every time you increase the speed by, by one unit. Let's say you're increasing, let's say every time you increase by one unit, you're halving the number of molecules that have that speed. Another unit you're halving again, quarter an eighth, et cetera, et cetera, et cetera. So there's this exponential tail of speeds, at least in a gas. In a liquid, it's more complicated, but roughly it's the same thing. And as you increase the temperature, the place where that tail happens pushes further and further out. So even when you're below the phase transition temperature, below the boiling point, there will still be the case. There'll be some molecules that will be energetic enough that when they hit the surface, they'll escape the surface, they won't get pulled back in again. And so that's why there's a certain rate of evaporation. Even when you are below the temperature, even when the bulk liquid hasn't turned into gas, there's still some rate of evaporation. And that rate of evaporation increases. I think. Oh, gosh, I have to remember this. I think it increases exponentially as you get close to the boiling point. And that's why there's some water vapor that comes off an ocean, for example, even when there's, even when the temperature is not above 100 degrees, there are other effects. In an ocean, for example, the water is sloshing around, you get these waves and sometimes you'll get. Waves will break and you'll see these white caps. And those white caps are little tiny droplets of water. And I think those, when that happens, there is a higher likelihood of. Because you have more surface area, you have more places where the molecule would get to the surface and escape in that little tiny sort of atomized piece of water that you'll end up with a higher rate of evaporation in those particular places. I mean, water is an incredibly complicated substance. The structure of liquid water is still very, very far from understood. And water, even right at the get go, has this very weird property that it expands when it freezes. Almost nothing else does that. And water in liquid water, I said, well, these molecules are bouncing around randomly, but that's really not true. There are these kind of clusters of molecules and these very complicated structures still not very well understood that are sort of organization, a level of organization of molecules in water that exists even though in the end, sort of any molecule can get to anywhere in the end, because that's how liquids work. Let's see. Gosh. Well, George asks back to a previous question, previous topic. What's your intuition about the future of machine learning. After my most recent research, I think there's sort of a considerable optimization that might be possible in the hardware. I think that quite a lot of what has been done in terms of all this, the grinding of computers, may not really be necessary. There may be a simpler way to get to that same result. I think when it comes to why did the machine learning system do what it did, make it explainable. I think I've always thought that was kind of hopeless. I think that's really hopeless. And by the way, I think that has implications for neuroscience as well, because it's like, how did you learn that? Show me how you learned that. Well, there was just the structure in my brain where I happened to be able to recruit this particular process that happens between this clump of neurons that made me recognize that cats have pointy ears or something. And there won't really be a. Let me explain the mechanism. Let me tell you the story of how this works. It's more just, well, I happen to be able to recruit this particular clump of neurons in this particular way, in this particular whatever. That's another piece. I think that there's a set of things that neural nets and so on are really good at. They're very kind of things that humans do off the top of their head, like recognize a cat from a dog. The things that neural nets are hopeless at is things like do this systematic computation. That's a thing where we built computers and I spent the last 40 years building our sort of computational language to make it easy to do kind of human, interesting, systematic computational things. So neural nets on the one side are doing these things that humans do off the top of their head. Computational language is doing things that, once you formalize it, computers can do and humans can't do. So one of the questions is, how do you bring those together? And the thing that we've done a whole bunch in the last year and a half or so is having an LLM act as a linguistic interface where you have a conversation, a chat with your LLM. And from that chat, it tries to kind of synthesize. This is the code. This is the computational language code that I thought you were talking about. Here it is. If that's what you wanted, let me run that code and do this computation and see the result. So that's, you know, that we've been doing that. Where there's a linguistic interface, there's a layer of neural net activity, and then sort of the hardcore is the computation. And that's, I think, a really powerful thing. I think people are after this initial enthusiasm of neural nets will do everything. I think people are realizing quite broadly that actually neural nets are a good interface layer and they're good for certain kinds of tasks, but then you still need computation. And what's actually really cool is that the kind of computational language that I've just spent the last four decades building is kind of in this absolutely unique position of being a computational language that describes lots of things about the world and that neural nets can interface with, that sort of thinks about the world in a way that's compatible with the way humans think about the world and the way that neural nets can kind of describe the world with words and so on. So that's kind of an exciting thing to see that come together. Now, one of the things that has been long a question is, is can you weave kind of sophisticated computation into the innards of a neural net computation? Can you somehow have the neural net do its neural netty thing, but somewhere in the middle have a little piece of systematic computation that's been very hard to do. I kind of think the things we've been doing recently, I've been doing recently, might give one a possible window into how to do that. Don't know how to do it yet, but it's a sort of possible window into those things. So that's a few kinds of thoughts from that. There's a question from Yosha here. What is the simplest form of machine learning and the hardest? Well, you might ask what things can be machine learned and what cannot. As I mentioned, anything that involves sort of systematic computation. The phenomenon I call computational irreducibility, where you do a computation and there's really no shortcut to just running every step of the computation and seeing what happens. Those really can't be machine learned. The case where things are easy to machine learn is where it's all sort of everything kind of smushes into each other and it's kind of a very kind of smooth thing where this is like that and so on. Those are things which are easy to machine learn. I think the general principle, the general kind of heuristic is if you're doing something and you want sort of 100% success, you want to know two plus two equals four. It's not like it's usually four, but sometimes it's five and sometimes it's three and sometimes it's 82 you want two plus two is four and it's always four. Those kinds of tasks are not good for machine learning. The tasks where you say, hey, I want to figure out, you know, what are the best websites to look at for this? Well, you know, if you. If somewhere in the top five that you surface are two that you really want, it's a win. Even if one of those websites is really pretty silly and not what you wanted at all, it's okay, you know, even if there's an error rate, 10, 20% error rate of just total goofiness, there are plenty of tasks where that's okay, and those are tasks where machine learning is likely to be good. But I think a first guess about where machine learning is going to work easily is what do humans find easy? If humans find it easy, there's a good chance machine learning will find it easy. So there are things where one already can see that language was a big surprise from a year and a half ago or so. Another one which humans find quite easy is mechanical stuff like robotic type. Move my hand, pick up this thing with my hand. Those kinds of things that's sort of, I think coming soon to machine learning is that stuff will end up being comparatively easy, I think. But these things that are based on sort of very systematic, kind of step by step computation, that stuff is hard. All right, I should probably wrap up very soon. I wonder if there's just one quick question here. I'm not sure if any of these are quick. All right, I'll try one here. Sort of an seemingly elementary. Those are always the ones that are hardest for me. Hyvie asks, what's the difference between volume, weight and mass? See what I can do with that. So you've got an object, some solid thing, for example. First question is, so really volume is, how big is it? What are the lengths? What size of box can you fit it into? Let me just go through these quickly. And then weight is. You've got this thing and you're holding it. How hard is it pushing down on your hand when you hold it? A mass is. If you wanted to, if you want to, kind of, it's on, let's say it's on a air table or an ice or something where there's not much friction. You want to get the thing moving. How hard do you have to push it to get it moving? So clearly all these things are related. Let's take weight and mass to begin with. So mass is this quality of things that is in a first instance, the thing that determines how hard you have to push them to get them to move a certain amount. Basically there's this formula, it's Newton's second Law force equals mass times acceleration. And that's kind of a definition of mass. That's the so called inertial mass is sort of the thing that appears in that formula. How much force do you have to put to achieve this amount of acceleration? Now, important fact, it's called the principle of equivalence, is that that mass that appears in the how, how hard you have to push it to get it to move is the same mass that determines how much gravity the thing will produce. So when, you know, when you have a planet, for example, it has a certain mass and it's producing a certain amount of gravity. And the mass that appears in producing that gravity is the same, we know it's the same to one part in a thousand trillion, one part in a quadrillion, it's the same. The mass that's associated with the pushing mass is the same as the gravitational mass. So anyway, that's the notion of mass. The notion of weight is what is the effect of gravity on that mass. So for example, on the Earth we have a certain amount of gravity things accelerated about 9.8 meters per second per second near the surface of the Earth. On the Moon, things accelerate one sixth that much. So on the Earth, the weight of something is its mass, and then the weight is the force that's associated with being pulled down by gravity on the surface of the Earth. And so that's related to mass by the pull of gravity. So on the Moon, the weight of something will be one sixth what is on the Earth, even though the mass will be the same. Okay, so volume is, you take the thing and you're asking how much space does it take up? So you know, the thing, if it's a solid, it's a certain shape. But imagine that you melt it down, so it's a liquid and so on. And you just say, how big a measuring container, how much space is it taking up? So you might take little pieces of the thing, and each one, you might say, how many little cubes do you have to have to fill up the space? That's the same space as the object you have. So that's related to mass by the density of the object, the volume of every little cube. For any given substance, there's a certain density. The density is the amount of mass in a cube of a fixed size. So for example, famously, the density of water is 1 gram per cubic centimeter. So in every cubic centimeter of water at normal pressure and so on, the density, the weight, the mass rather is one gram for every cubic centimeter. So the volume determines how much water there is in terms of the size, the amount of space it takes up. And for every unit of space, water has a certain density. And so you can determine for every unit of space how much mass that lump of water will have. So that's kind of the relationship. The volume is measuring the amount of space something takes up. Mass is measuring how hard you have to push it to get it to move. And weight is measuring how much force is associated with it pushing down when there's gravity, so to speak. And in a sense, the relation between all these things, I mean, like weight and mass, depends where you are. If you're on the moon, if you're on the space station, things will be weightless. They'll be in microgravity, so the weight will maybe close to zero. Even though the mass is substantial, and even though you want to get it moving, you have to push it pretty hard. But it doesn't push down on a thing. It's weightless, so to speak. But, you know, it's. And it's the volume. For something like a solid, the volume is pretty fixed. For something like a gas, the volume can change as you squash the gas into a different container. The mass. As you have a certain amount of gas, the mass will stay the same. If you have the same number of molecules, the total mass will be the same, but the volume may change as you squash it. So that's an attempt to explain that. All right, I better go to my day job here. But I see a lot of other interesting questions that I. I always enjoy trying to answer these things, and it's very. I hope you guys find these answers useful. I find it interesting and useful to just try to sort of move my brain through thinking about these kinds of things. So thanks for asking all these questions and look forward to talking to you another time. Bye for now.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






