This video is sponsored by Masterworks. You’ve heard this from some famous and credible
people, something to the effect that AI will take over the world,
and will spell the end of humanity. Is this a sensible forewarning
of things to come, or an alarmist overreaction on a harmless technology?
Part of the problem is that very few people understand how AI works. And if you don’t really
understand how it works, then it is going to be an unknown. And we fear the unknown.
In this video, I’m going to try to allay some of this fear by explaining how AI really works
in detail. I made a more general video on how AI apps like ChatGPT work. If you haven’t seen that,
I highly recommend you view it first to get a general idea of what’s going on.
But in this video, I’m going to get into much more detail about what’s really going
on by showing you how neural networks work, which the essential element of AI.
And by the end of this video, I’m hoping the unknows will become more of a known,
and you will be able to understand just how the “mind” of an AI actually works.
Stay tuned because that’s coming up right now…
First you should understand that an artificial neural network, also called neural network for
short, is at its core a mathematical equation, no more, no less. A powerful
neural network is typically a very complex equation, but nevertheless it’s just math.
The term neural network comes from its analogy to neurons in our body. In our brain we have
around 86 billion neurons. These neurons are what give us the ability to do anything. They send the
signals to the various parts of our body to act, and they send signals to our brain that
can enable us to think and be humans. Neurons in neural networks serve an
analogous role, and that’s why the nomenclature is similar. But let me stress this from the start,
neurons in our brain are much more complex and advanced than neurons in an artificial
neural network. Artificial neurons do not work the same way. The analogy with artificial neurons is
limited because it applies to the way that they are networked, not the way that they function.
Like in the brain, we connect multiple neurons together and form a neural
network which we can train to perform a task. If we continue with the analogy a little further,
and look at a biological neuron, and that in an artificial neural network, we see why it
makes some sense to draw this comparison. A biological neuron has a cell body with
a nucleus, this is the core of the neuron where the processing takes place. Around
this cell body there are dendrites which are the signal receivers. They take in
inputs which the cell body can then process. On the other end, there is an axon which ends
with the terminal axons that can pass on a signal to the dendrites of the next neuron.
In a similar way, a neuron in a neural network is a processor, which is essentially a function
with some parameters. This function takes in inputs, and after processing the inputs,
it creates an output, which can be passed along to another neuron. The input is
analogous to the dendrites and the output is analogous to the terminal axons. The function
in the neural network is like the cell body. Like neurons in the brain, artificial neurons
can also be connected to each other via synapses. This is what a neural network is. It’s neurons
connected with each other, receiving inputs and passing along outputs in a complex network.
While an individual neuron can be simple and might not do anything too impressive,
it’s the networking that makes them so powerful. And that network is the
core of artificial intelligence systems. So how do these artificial neurons work?
Well, essence of an artificial neuron is nothing but this simple equation from elementary school,
Where x is the input, w is a weight, b is a bias term and the result or
output is Z(x). What does this mean? Essentially, any input x is being modified
by multiplying with the weight and then a bias is added to it in order to get a result or output.
This allows the AI system to map the input value x to some preferred output value Z(x).
How are W and b determined? This is where training, which is what I talked about in
a prior video, comes in. We have to train the parameters w and b into the AI system,
such that the input can be modified into the most appropriate or correct output.
So, how is the training done? Let’s do a very simple example so that you can get
an intuitive feel for what’s happening. Let’s say you have $5. You are trying
to determine - Can I afford a cup of coffee? The coffee costs $3. So the inputs are $5 representing
the money that you have, $3 for the cost of the coffee, and the question, “can I afford this?”
You know the output should be yes. And you are trying to train the system to give you a “yes”
result. Initially, the system may choose an arbitrary value for the weight and bias. You
enter the inputs and see what the output is. If the output is “no,” the system adjusts the
weight and bias and keeps iterating until the correct answer, “yes,” is given in the output.
Then you change the input to $2 and do this process again. You know the
answer should be “no” this time. So if the output is yes, then the system adjusts its
weights and bias again until the output is “no.” Similarly, the inputs are changed
over many iterations until the system output gives the correct answer over a variety of
inputs. This is what training is all about. Note that when we have multiple inputs,
the function Z(x) representing the neuron is modified to be a sum like this:
If you think about how our mind works, we sort of do the same thing. We take in all the inputs,
and we process this with the math that we have learned, and numbers we understand. With this,
we can figure out what we can afford and what we can’t. Essentially this is what
a neural network can do too, but just in a more explicit way using purely mathematics.
This leads us to a problem with our equation. The case I just showed is
a very simple yes or no output. Our function Z(x), which is a
simple linear equation, can provide the correct output. But what happens when
the boundary conditions are not linear, when the output cannot be so simple and clear cut.
For example, what if you are a mortgage lender at a bank and want to use an AI
system to determine how much money you can lend a particular customer. In this case,
many inputs would need to be taken into account, things like the person’s income, housing market
conditions in the area, the loan term, amount of cash deposit, and a host of other factors.
In this case, the output would not have such a distinct linear boundary. The output might
look more like the chart on the right. A problem like this is solved by using
a mathematical trick which is called an activation function. this activation function,
represented by “A” on this formula is a mathematical function we apply to
our output Z(x). There are different choices for an activation function,
but a good example is the sigmoid function. An example of a sigmoid function is the following:
This mathematical treatment allows for a greater variability in the decision boundary,
by introducing non-linearity to the linear formula Z(x). The following
images show how a linear decision boundary can be modified for more complex decision-making.
And with the addition of an activation function, our flow chart is modified to look more like this,
where the activation function, sigmoid function in this case, is added as additional step in
the process before we get a final result. So with an appropriate activation function,
there is nothing stopping an AI from answering much more complex questions.
Keep in mind with a single neuron we cannot do a lot, and you need more neurons to account for
the complexity of deciding, for example, how much money to loan a customer to
buy a certain house. I used a single neuron to give you a general understanding since you can
see the fairly simple math behind it. But it’s not complex enough to do much by itself, even with the
power of non-linear activation functions. But the combination of several neurons
that form what we call a neural network, is where the power lies.
So when we make complex networks with thousands, if not millions of neurons like
that used in ChatGPT or BARD, we can obtain some incredible results, as you probably have found
if you used either of these apps. Now, I’m going to tell you something
about this neural network that you might find surprising, and perhaps even scary.
But before I tell you that, let me first touch on another subject that’s also scary for many.
Nearly 1 in 5 people can have their jobs replaced by AI entirely. That’s 300 million
people across the globe, equivalent to the entire population of the United States. That’s a scary
future for many. Especially since we’re already dealing with rampant inflation,
and one negative headline after another. This is why some of the biggest money
managers in the US have been diversifying outside the stock market, into luxury assets
with far less correlation…like fine art. Today’s sponsor, Masterworks, offers this
diversification strategy, which had once been one of the most exclusive, to ordinary investors.
Masterworks is an art investing platform. They buy the art outright,
register it with the SEC, and then break it into investable shares. Net proceeds from
its sale are distributed to its investors. Masterworks allows almost anyone to invest
in fractional shares of contemporary art. Since their inception, they have sold over
$45 million dollars worth of artwork from legends like Picasso, Banksy, and Monet.
And so far, each of Masterworks’ exits have had positive net returns for their investors.
You should know that historical returns are not a guarantee for future returns.
I’m not a financial advisor, and you should do your own due diligence before investing
any money anywhere. And like any other investment, there is always a risk of loss.
Masterworks has over 700,000 users, and their art offerings usually sell out in hours,
which is why they’ve had to make a waitlist. But my viewers can skip the line and get priority
access right now by clicking the link in the description.
I just found Masterworks
to be a great way to diversify for myself. And I think it’s worth your consideration.
And now back to what some people fear most about neural networks.
When I talk about training the network to obtain certain known results,
the simple case was the example of whether we could afford to buy a coffee or not,
and in such a case there is not much processing that needs to happen in these various nodes.
But for more complex results, such as how much money can be loaned to a customer for a mortgage,
or other complicated demands, the adjustments that the system makes in the training process
is a bit of black box. What do I mean by this? When we train the system using known inputs
and known outputs, we are having the system self-adjust its internal networking results
from the various nodes, to match what the known result should be. This is the training process.
But how exactly the network adjusts the various layers of intermediate outputs, to achieve the
final output we want is not really known. In other words we don’t know how the system
is adjusting all the intermediate layers that are not the input or output layer.
The input and output layers are known. But the stuff inside is not. And so these intermediate
layers of neurons are called “hidden” layers. The hidden layers are a black box. We don’t
really know what these various layers are doing. They are performing some transformation
of the data which we don’t understand. This is not to say that we can’t find
the calculated results from any particular node. We can because they are just doing mathematics.
But the result will not make any sense to us. It would just appear as some arbitrary number,
which the network has determined to be a suitable intermediate, in order to correctly
obtain the final result in the output layer. It is the combination of numbers of the various
individual nodes of the hidden layers in the network that results in the power of AI.
So we have a huge black box which does complex transformations by stitching together the simple
linear equation with an activation function, to create complex highly nonlinear outputs
which maps the given inputs to that output. Some people consider this hidden or unknown
processing a scary problem because they say since the system is doing things we don’t understand,
it could start to do things on its own and pose a threat to humanity.
I find this argument to be unconvincing myself because, these networks are doing only what they
are trained to do. This is not to say that they couldn’t be trained to behave in more complex
ways in the future, but with what we know today, there is no way these networks can do anything
they are not trained to do on their own. An bad person, I suppose, could train an
AI to do bad things. But how is this any different than hackers we have
today that use computers to do bad things? No AI technology based on neural networks
today could become something like Skynet in the Terminator movies, that suddenly
becomes conscious and threatens mankind. I think the real threat of AI is in its
power to do things that humans do today, and thus potentially eliminate jobs. This is in my
view the main thing we need to contend with. And that’s going to happen whether we like it or not.
AI might eliminate some jobs, but it will also help us do our jobs better, as well as create
some new jobs. But, it’s unlikely to kill us. I think Elon, Woz and others, at least for now,
should be able to sleep soundly at night. I’ll see you in the next video my friend.