SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

[Understandable even for middle schoolers] Conquer the AI learning hurdle of "differentiation" in seconds! The ultimate introductory guide to intuitive understanding without mathematical formulas


Hello, this is Komaten.

"I want to study AI, but the moment math appeared, I closed my browser."
Have you ever had that experience?

Yes, I was like that too in the past.

Recently, AI side hustles and ChatGPT prompt engineering have become popular, but when you try to take a step further and learn the "mechanisms of AI," there is always a huge wall that stands in your way.

That is"Mathematics."Especially"differentiation."I understand the feeling of wanting to break out in hives just by seeing mysterious symbols like $$\frac{dy}{dx}$$ or $${f'(x)}$$ all too well. Giving up by saying "I'm a liberal arts person" or "I haven't done math since high school" is a real waste!

Actually,

differentiation is the "compass" for AI (artificial intelligence).Without differentiation, AI cannot learn anything. ChatGPT probably wouldn't have been born either.Conversely,



if you can understand "what differentiation is," even vaguely, you will be able to understand the AI learning process like the back of your hand.
In this article, we won't be crunching through mathematical formulas.
So that even middle schoolers can understand,


"Why is differentiation necessary for AI?" and "What is differentiation in the first place?"
I will explain only the essence, super-intuitively and in a fun way.By the time you finish reading this, you should be able to talk with a smug look on your face, saying, "Differentiation? Oh, that thing. It's indispensable for AI growth, right?"Now, let's go take the antidote for math allergies!




"Differentiation" is magic glasses to know "the momentum of that moment"

First, please throw the textbook definition into the trash can.
There is only one image of differentiation you need to understand AI.

"How intensely is it changing right now (slope)?"

That's all.

"Differentiation" thought of through a roller coaster

Imagine it. You are currently riding a roller coaster in pitch darkness.

You cannot see the full picture of the course.

In the middle of a steep drop, if you were asked, "What is the angle (slope) of this moment right now?", how would you answer?

You would answer, "It's at a very steep downward angle!"

Conversely, when you are running on a flat road?

You would answer, "The slope is almost zero right now," wouldn't you?

Quantifying this "slope at a certain moment." This is the true nature of differentiation.


Slope is large (positive) = Ascending rapidly
Slope is large (negative) = Descending at high speed
Slope is zero = Flat (peak, bottom, or level ground)

Using the tool called differentiation, you can understand the "momentum of change" in data like the back of your hand.

It's not "what happened as a whole," but"in this moment, which way and with how much momentum are we moving?"The magic glasses that tell you that are differentiation.

Why is differentiation necessary for AI? Complete understanding with "blindfolded mountain climbing"

Then, why is knowing this "slope" necessary for cutting-edge AI?

Here, let's compare the AI learning process to"a game of descending a mountain while blindfolded."

The goal of AI is to make "error" zero

When AI (neural network) learns, it is actually desperately trying to"the gap from the correct answer (error)"smaller.

• AI's answer: "This is a dog!"
• Correct answer: "It's a cat"
• AI: "Oh, I was wrong... (large error)"

Imagine this "error" as the height of a mountain (altitude).

Large error = High altitude (near the summit)
Zero error = Zero altitude (ground level)

The AI's mission isto descend the mountain and reach the ground in order to make the "error (altitude)" as close to zero as possible.

How do you descend while blindfolded?

However, AI doesn't have a map at first. Moreover, it is blindfolded.
It doesn't know at all where it is on the mountain or which way to go to reach the ground.

This is where"differentiation"appears!

AI uses the sensation of the ground under its feet (differentiation) to judge as follows.

1. Check theslope (gradient)under its feet. (This is differentiation!)
2. Sense, "Oh, the right foot side is lower."
3. Move just a little bit in the direction where the slope is descending.
4. At the place it moved to, check the slope under its feet again.

By repeating this thousands and tens of thousands of times, the AI gets closer to the valley floor (the point of zero error) step by step, surely.

What if there was no differentiation?

The AI wouldn't know which way to move to get closer to the "correct answer," and might stand still at the summit or, conversely, climb up the mountain.

The role of differentiation is to tell you "which way to move to improve."

In technical terms, this is called"gradient descent."The name sounds tough, but what it's doing is a simple task of "looking at the slope under your feet and moving in the direction of the descent."

The true nature of "learning" is fine-tuning called "parameter adjustment"

Let's peek inside the AI a little more concretely.

Once you understand this, you should slap your knee and say, "I see!"

Hundreds of millions of "knobs" inside the AI

Modern AI, such as Large Language Models (LLMs), contains hundreds of millions or even trillions of adjustment knobs called "parameters". Imagine having countless knobs for adjusting radio volume or shower temperature.

AI "learning" is actually

"fine-tuning these hundreds of millions of knobs to their optimal positions." is what it is.1.

Try turning the knobs randomly (initial state) • AI: "I was shown a picture of a cat, but... the answer is 'airplane'!" (Way off)
2.

Calculate the error • AI: "I made a huge mistake. The error (height of the mountain) is 1000..."
3.

Use differentiation to decide how to turn the knobs (this is the important part!) • AI: "If I turn this knob a little to the right, the error should decrease (I can go down the mountain)!"
• AI: "Let's turn this knob to the left!"
• Here,
we use differentiation to calculate "which knob" to turn, "which way," and "by how much." 4.

Update the knobs (parameter update) • Actually turn the knobs.
5.

Repeat • If you repeat this with a vast amount of data, before you know it, all the knobs will be set to "positions where it can correctly recognize a cat."
This is the full picture of AI learning.

Differentiation was the

guide that tells you "which way to turn the knobs to get closer to the correct answer." all along.

Don't get discouraged! AI math strategy for non-math majors

If you've read this far and thought, "I understand the logic, but calculating is still impossible..."

Rest assured. In the modern age, there is 99% no need to be able to do differentiation by hand.

Leave it to Python

The programming language "Python," which is actually used in AI development, has convenient libraries (toolboxes) like PyTorch and TensorFlow.

These actually have a feature called "automatic differentiation." If you write the program, the computer will handle the troublesome differentiation calculations on its own.

What we need to do is not solve calculation drills.

1.

Understand the mechanism (image): Being able to imagine, "Oh, it's calculating the slope here and correcting it in the direction that reduces the error." 2.


Grasp the big picture
: Knowing the flow from when data enters until it learns and becomes smart. With just this, you can talk to AI engineers and gain the ability to read the latest AI papers (even if only vaguely). "Conceptual understanding ability," not "calculation ability,"

is the skill required in this era.

How will this knowledge be useful in the future AI era?

"But ChatGPT can be used without knowing differentiation, right?"

That's correct. It's the same as not needing to know how an engine works to drive a car.

However, if you want to move from "the side that uses AI" to "the side that creates new value using AI," this knowledge will be a powerful weapon.

Inferring the cause when AI behavior is strange
You can form hypotheses like, "Learning isn't progressing... maybe the learning rate (the step size for descending the mountain) is too large, and it's jumping over the valley floor?"

Changing the resolution of the latest AI news
You will be able to understand the meaning of news like "a new optimizer (something like shoes for descending a mountain) has been released."

Above all, by understanding that the inside of AI, which you thought was a black box, is "just math (repeated differentiation)," the inexplicable fear of AI disappears.AI is not magic.

It is a crystallization of effort, packed with vast amounts of data and the mathematical wisdom of "differentiation" accumulated by our predecessors.

Summary: Differentiation is the "teacher" of AI

How was that?

Did the relationship between the seemingly difficult "differentiation" and "AI" feel a little more familiar?

Let's summarize the main points.
1. Differentiation is knowing the "slope at that moment."
2. AI learning is a game of "descending a mountain blindfolded (making the error zero)."
3. Differentiation is the "feeling under your feet (directional indicator)" for descending the mountain.
4. Hand calculation is unnecessary. Just understanding the mechanism is enough!

Just by knowing this concept of "slope," the way you see the world changes a little.

In the split second before AI outputs an answer, "differentiation" is being performed at an incredible speed behind the scenes to find the optimal answer—.

When you think about that, doesn't AI start to look a bit endearing and cute?

I hope this article becomes the "first slope (first step)" of your AI learning, and that your knowledge improves exponentially from here!

If you found this article "helpful," please like or share it! It encourages me to write more!


いいなと思ったら応援しよう!