1. The Era of Billion-Parameter Keywords
Glancing through today's news outlets, you will be overwhelmed by terms like DeepSeek, ChatGPT, and Claude with hundreds of billions or even trillions of parameters—advertised with the idea that the more parameters they have, the smarter they seem to be. So, to avoid being left behind in today's AI era, let's explore what parameters are through a simple example.
I will use the control knobs on a Bluetooth speaker to illustrate this.
2. The Bluetooth speaker with 2 knobs to adjust sound nuances
When listening to music through a speaker, we sometimes feel that the speaker is too quiet, or the singer's voice lacks resonance.
And here is how AI guides us to do it: we turn the volume knob and twist the echo knob until we achieve the sound that feels most satisfying. That is exactly how AI models learn. Parameters are those very control knobs.
That concept is: Linear Regression.
3. The Linear Regression Model - A Mathematical Representation
If you took high school mathematics, the formula for Linear Regression is simply a first-degree equation in the form of:
In which:
- x: Input data (Input / Feature) fed into the machine.
- w: Weight - The first control knob, representing the degree of influence of x.
- b: Bias - The second control knob, a constant value added to the equation.
- y: The target output value / Prediction.
With just these two components, Linear Regression can already be applied to real-world tasks such as sales forecasting or real estate valuation.
We will take the real estate home price prediction problem as an example.
4. When Data Is Knowledge and the Reversal of the Problem
Back in school, we were used to solving equations like 5x - 2 = 0. In those problems, given coefficients remained fixed, while the variable x was the unknown we had to find. But entering the world of AI, real-world data is what stays constant. A house's area x and its actual selling price y are fixed figures taken from real life, while the coefficients w and b become the unknowns that must be discovered.
Imagine you have a historical dataset containing information on houses successfully traded by a real estate expert in the city. You already know the exact area x and real price y for each home. This set of historical records serves as ground-truth data to train our model, turning them into fixed constants. At this point, the two control knobs w and b become the true variables. The machine's job is to continuously adjust, probe, and tweak these two values w and b to find a pair of numbers that best fits that dataset.
5. Finding the Perfect Knob Positions
Suppose the horizontal axis represents area (x - \text{tens of } m^2) and the vertical axis represents house price (y - \text{billion VND}):
| House | Actual Area | Converted Area (x) | Real-world Notes | Actual Price (y) |
| House 1 | 50 | 0.5 | Prime storefront, great for business | 6.5 |
| House 2 | 80 | 0.8 | Standard house, regular layout | 6.6 |
| House 3 | 100 | 1.0 | Deep inside an alley, prone to flooding | 6.5 |
Now, let's step into the shoes of the computer during its initial exploratory phase.
Suppose we randomly pick the bias knob b = 5 and the weight knob w = 2. At this moment, our prediction equation is:
Let's see how poorly this machine predicts:
| House | Actual Price (y) | Predicted Price (\hat{y} = 2 \cdot x + 5) | Error (y - \hat{y}) |
| House 1 | 6.5 | 2 \cdot 0.5 + 5 = 6.0 | 6.5 - 6.0 = +0.5 |
| House 2 | 6.6 | 2 \cdot 0.8 + 5 = 6.6 | 6.6 - 6.6 = 0.0 |
| House 3 | 6.5 | 2 \cdot 1.0 + 5 = 7.0 | 6.5 - 7.0 = -0.5 |
Looking at the results above, we see that the computer is making incorrect predictions for 2 houses: House 1 and House 3. However, to train a model, the computer cannot adjust its knobs by looking at each house individually, as it might predict 100\% accurately for some (like House 2) while straying off by varying degrees for others.
It needs a single unified metric to evaluate the overall accuracy across the entire dataset—a representative number indicating just how 'bad' the model is performing.
The most natural idea that comes to mind is: Let's sum all those deviation values together to calculate the total error!
And when substituting the specific numbers from our housing price table, the formula becomes:
When we sum these deviation values together, a disastrous mathematical phenomenon occurs: positive-negative cancellation.
How does this cancellation phenomenon happen?
- House 1 was underestimated by +0.5 billion.
- House 3 was overestimated by -0.5 billion.
When summed up, the positive deviation of +0.5 for House 1 and the negative deviation of -0.5 for House 3 automatically cancel each other out completely, pulling the total sum back to exactly 0.
Why is this extremely dangerous?
This number 0 tricks the machine. It complacently thinks: "A total error of 0 means I've priced all three houses perfectly; there's no need to adjust knobs w and b anymore!"
To prevent distances from cancelling out improperly, the mandatory solution is to square each error before summing them up.
And when substituting the specific numbers from our housing price table, the formula becomes:
To allow the machine to calculate predictions for any $i$-th house (house 1, house 2, house 3,...), we add the index subscript i under the variables. The prediction equation now takes the standard form:
(Where: x_i is the area of the $i$-th house, and \hat{y}_i is the corresponding predicted price calculated by the machine).
Now, we substitute the prediction formula \hat{y} = w \cdot x + b into each position of \hat{y}_1, \hat{y}_2, \hat{y}_3. We obtain the final standard Loss formula expressed in terms of the two knobs w and b:
with our input dataset, we have:
At this point, the ultimate goal of the AI machine is revealed: We must find what values to turn knobs w and b to so that the Loss value reaches its absolute minimum (meaning the total prediction error across the dataset is minimized, or in other words, the model makes the most accurate predictions). Once those perfect numbers for w, b are found, our model will have the lowest overall error across the whole dataset, meaning its home price predictions align most closely with reality.
But the challenging question arises: How does the machine know whether to turn knobs w and b to the left or to the right? How does it know whether to increase or decrease them among billions of mathematical possibilities out there, rather than sitting around guessing blindly by trial and error?
To solve this directional problem, we need an ultimate mathematical tool capable of 'pointing out' exactly which path leads to the bottom of the valley of accuracy. That tool is none other than Derivatives—something we learned back in high school.
In the next article, we will unpack together:
- The practical nature of Derivatives in AI.
- The Gradient Descent algorithm—one of the core foundations of modern AI.
