Storybooks › Jugnupur Tales, Volume 2 › Chapter 2

Sunrise on top of Nandi Hills. Kabir chachu, Bunny, Happy and Riya stand at an old stone wall in warm jackets, looking out over a sea of white fog, with Mitthu on Bunny's shoulder.Illustrated with AI

Jugnupur Tales · Volume 2 · Chapter 2

Fog on Nandi Hills

Big idea: a model learns by taking small steps downhill on its errorsClasses 8–10

Part 1 · Nine wrong Sundays

Prakash uncle’s notebook was older than Happy’s school bag and fatter than a telephone directory. For three years, every single Sunday, he had written down the sky, the ground, the exams, the players, and whether Silverline Heights had played cricket or not.

Bunny and Riya fed every one of those Sundays into the paper neuron. Most of the time, it got the answer right. But nine times, it was wrong.

“Nine out of a hundred and fifty,” said Riya, tapping her calculator. “That’s not bad. But it’s not good either.”

“So we change the weights,” said Bunny. “But which ones? And by how much? If we just guess, we’ll be arguing till next monsoon.”

That evening, Kabir chachu called. “You want to know how a neural network fixes its own weights?” he said. “Don’t ask me to explain it on the phone. Be ready at four in the morning on Sunday. Warm clothes. We’re going to Nandi Hills.”

“Four in the MORNING?” squawked Mitthu. “Even the roosters will still be asleep.”

Part 2 · Above the clouds

They drove out of the sleeping city in the dark, past the airport, up the twisting hairpin bends. By the time they climbed the last steps to the top, the sky was turning pink and gold.

And below them, there was no world at all. Just a sea of white fog, soft as cotton, filling every valley as far as they could see.

“We’re above the clouds!” shouted Happy.

Chachu smiled. “Enjoy the view. Because in a few minutes, we’re going to walk down into that.”

He led them off the main road to a quiet grassy slope, where an old shepherd’s path wound down towards a village at the bottom. “The village has a tea stall,” said chachu, “and the best idlis in Karnataka. Our job is to reach it. There’s just one rule: we stay together, and we only go down.”

Then the fog swallowed them.

Part 3 · Feel the slope

On a grassy hillside in thick white fog, Kabir chachu crouches and presses his shoe flat on the slope to feel which way it tilts, while Bunny copies him, Riya watches and Happy holds Bunny's sleeve. Mitthu sits puffed up on Riya's shoulder.Illustrated with AI

It was like walking inside a glass of milk. Bunny could see Riya’s purple hoodie, a rock, two bushes, and then nothing but white.

“Which way is the village?” asked Happy, his voice very small.

“I have no idea,” said chachu cheerfully. “I can’t see it either. But I don’t need to see the village. I only need to know one thing: which way is downhill, right here.”

He put his shoe flat on the grass and pressed gently. “Feel that? The ground tilts this way. That’s the slope. So I take one step in the steepest downhill direction.” He stepped. “Now I feel again. And step again.”

Bunny tried it. Feel. Step. Feel. Step. Slowly, the path kept going down.

“That’s it?” said Riya. “You never see the bottom? You just keep going downhill, one step at a time?”

“That’s it,” said chachu. “Mathematicians call it gradient descent. ‘Gradient’ is a fancy word for slope, and ‘descent’ means going down. It is how almost every neural network in the world learns.”

Part 4 · Giant leaps and baby steps

On a misty hillside, Happy is in mid-air in a giant comic hop, sailing right across a small grassy dip, while Bunny walks carefully behind and Riya laughs. Mitthu flies above Happy, squawking.Illustrated with AI

Happy decided that if one step downhill was good, a giant leap downhill must be even better.

“WHEEEE!” He jumped as far as he could, sailed right across a little dip in the ground, and landed on the slope on the other side, a good bit higher than where he had started.

“I went down,” he said, confused, “and then I went up.”

“Your step was too big,” said chachu. “You jumped right over the bottom. If you keep leaping like that, you’ll bounce from side to side forever, like a cricket ball in a drain.”

Meanwhile, Bunny had become extremely careful. He was taking steps the size of a mango seed, heel touching toe.

“Bunny, at that speed,” said Riya, “we’ll reach the tea stall in time for dinner.”

Chachu laughed. “The size of your step has a name too. Engineers call it the learning rate. Too big, and you overshoot. Too small, and you take forever. Choosing a good one is half the art.”

Part 5 · The hollow that wasn’t the bottom

Bunny, Riya, Happy and Kabir chachu stand puzzled in a small grassy hollow with a tiny pond, where every side slopes up into fog. High above, Mitthu has flown out of the fog into the sunshine and can see the real valley and a village far below.Illustrated with AI

After a while, they reached a small grassy bowl with a tiny rain pond in the middle. Bunny felt the ground with his shoe. Up in front. Up behind. Up to the left. Up to the right.

“Every direction goes up,” he said. “So this must be the bottom!”

Riya looked around. “Then where’s the village? And the tea stall?”

Mitthu had had enough of walking. He flapped his wings, rose straight up out of the fog, and burst into bright sunshine. Far, far below, he could see a winding road, red roofs, and a thin curl of smoke from a tea stall.

“You’re in a little hole!” he shrieked down. “The real valley is MUCH lower! That way!”

Chachu nodded. “A spot that looks like the bottom, but isn’t, is called a local minimum. Neural networks can get stuck in them too. Sometimes a bigger step helps, or starting again from a different place, or a little randomness, like a parrot who can see from above.”

They climbed out of the hollow and carried on down. Feel. Step. Feel. Step. And at last, the fog thinned, and there it was: the village, the road, and a tea stall with a steaming pot of idlis.

Happy ate six.

Part 6 · The valley in the notebook

Over breakfast, chachu took a paper napkin and drew a curved line, like a bowl.

“Here is the secret,” he said. “For your paper neuron, imagine a hill. But it isn’t made of rock and grass. Its height is how many Sundays the neuron gets wrong. Its position is the value of one weight. Change the weight, and you move along the hill.”

“So the bottom of the valley,” said Riya slowly, “is the weight that makes the fewest mistakes.”

“Exactly. The neuron can’t see the whole hill. It’s in fog too. But it can feel the slope: if I nudge this weight a tiny bit, do the mistakes go up or down? Then it takes a step downhill. Again and again.”

Part 7 · Thatha’s knee

In the society clubhouse, Riya and Bunny proudly show a U-shaped curve drawn on graph paper beside Prakash uncle's fat notebook. Gowda thatha laughs with delight, Prakash uncle claps, Happy sips from a cup, and Mitthu perches on a chair.Illustrated with AI

Back at Silverline Heights, Bunny and Riya tried it for real. They picked one weight to start with: Gowda thatha’s knee, which they had set to −1.

They counted the wrong Sundays in the notebook. Nine. Then they nudged the knee weight a little, to −2, and counted again. Six! Fewer mistakes, so that was downhill. They took another step, to −3. Four! Another step, to −4. Five. That was uphill.

“We stepped past the bottom,” said Riya. “Like Happy’s jump. Go back to −3.”

Knee weight −19 wrong Sundays Knee weight −26 wrong ↓ downhill Knee weight −34 wrong ↓ lowest! Knee weight −45 wrong ↑ uphill, step back Keepknee weight = −3

They showed the result to the committee that evening. Prakash uncle read the numbers twice. “So the knee,” he said slowly, “deserves a weight of minus three.”

Gowda thatha slapped his knee so hard he nearly fell off his chair. “MINUS THREE!” he roared. “Three times more important! I told you this knee was never wrong!”

“It’s still wrong sometimes, thatha,” said Riya gently. “Just less often than we thought.”

But thatha wasn’t listening. He was already telling Jyoti aunty about it, for the third time.

That night, Bunny looked at the fog-shaped curve on the graph paper. “Chachu said real networks do this for millions of weights at once,” he said. “Millions of tiny steps, all downhill.”

From the balcony, Mitthu fluffed his feathers. “And not one of them can see the bottom,” he said. “They just keep feeling the slope. I suppose that’s a kind of courage.”

Moral of the story

You don’t have to see the whole way to find it. Feel where you are, take a small step in the right direction, and keep correcting. Small corrections, again and again, will get you home.

The fog was thick, the path unknown,
but every step went further down.
Not giant leaps, not steps too small:
just steady ones, to win it all.

Mitthu’s notebook

What really happened?

In the storyIn a real neural network
How high you are on the hillThe error, or loss: how wrong the model’s answers are
Where you are standingThe current values of the weights
Feeling which way the ground tiltsWorking out the gradient: which way each weight should move to reduce the error
Walking downhill step by stepGradient descent: the way most neural networks are trained
Happy’s giant leap, Bunny’s baby stepsThe learning rate: too big overshoots, too small is slow
The hollow with the little pondA local minimum: looks like the bottom, but isn’t
The village and the tea stallA good set of weights with low error
Prakash uncle’s notebookTraining data: the examples used to measure the error

Try it yourself

Find the valley in the fog

You can only see the ground right around you. Pick where to start and how big your steps are, then press Feel and step. Can you reach the lowest point? Watch out for the little hollow.

Start:
Step size:
Steps: 0Height: –Choose a start

Try the left hilltop with baby steps, then with “just right”, then lift the fog to see what really happened.

Maths corner

One step of gradient descent

Each step follows one simple rule:

new weight = old weight − learning rate × slope

The minus sign is the important part. If the slope is positive (the error goes up as the weight goes up), the rule makes the weight smaller. If the slope is negative, the weight gets bigger. Either way, you move downhill.

Your turn. A weight is 2. The slope there is 4. The learning rate is 0.1. What is the new weight? Now try a learning rate of 1. What happens?

Answer: 2 − 0.1 × 4 = 1.6, a small sensible step. With a learning rate of 1: 2 − 1 × 4 = −2, a giant leap that might jump right over the valley.

Try it on a computer · optional

Walking downhill in Python

Here the error is (w + 3)², a bowl whose bottom is at −3, just like thatha’s knee. The slope of that bowl is 2 × (w + 3).

# start where Bunny and Riya started
w  = -1.0
lr = 0.1               # learning rate (step size)

for step in range(30):
    slope = 2 * (w + 3)  # feel the slope
    w = w - lr * slope     # take a step downhill

print(round(w, 2))

-3.0

Change lr to 0.5, then 1.0, then 1.1, and print w inside the loop. At 1.0, the walker bounces between the two sides forever. At 1.1, every bounce is bigger: Happy’s giant leaps in code.

AI security tip

The notebook decides where the valley is

Gradient descent always walks towards the fewest mistakes on the training data. So if someone quietly changed a few entries in Prakash uncle’s notebook, the valley itself would move, and the neuron would walk happily to the wrong answer. That’s why engineers protect their training data as carefully as their code, and check where every example came from. (You’ll see this attack again in Chapter 7.)

Did you know?

Fun facts

An idea from 1847The French mathematician Augustin-Louis Cauchy described the idea behind gradient descent in 1847, more than a hundred years before the first computer neural networks.
Backpropagation, 1986A famous paper by David Rumelhart, Geoffrey Hinton and Ronald Williams showed how to work out the slope for every weight in a network with many layers at once. It’s still how networks are trained today.
Nearly 1,500 metres upNandi Hills, about 60 km from Bengaluru, rises to nearly 1,500 metres above sea level. On winter mornings, the valleys below often fill with fog.
Weeks of walkingTraining a very large AI model can mean billions of downhill steps, run on thousands of computer chips for weeks at a time.

Myth or fact?

“Bigger steps always mean faster learning.”

Myth

Big steps can help at the start, but too big and the model jumps over the best answer, bounces around, or gets worse and worse. Many engineers start with bigger steps and make them smaller as training goes on, just like you’d slow down near the bottom of a slippery hill.

Try this · no computer needed

The secret number valley

You need: a partner, a pencil and paper.

  1. Your partner secretly writes a number between 0 and 100. That is the bottom of the valley.
  2. You guess a number. Your partner tells you only the error: how far away you are, not which direction. (Guess 30, secret 72: “error 42”.)
  3. To find the slope, try a number a little bigger, like 31. Did the error go down? Then the valley is that way.
  4. Take a step in that direction. Try a big step, then smaller ones as the error shrinks.
  5. Count how many guesses you needed. Swap roles. Who found a better “learning rate”?

Careers corner

Data scientist

Data scientists are like Riya with Prakash uncle’s notebook. They collect and clean data, look for patterns, train models, and check carefully whether the results really make sense, or whether the model just found a hollow that isn’t the true bottom.

Useful to learn: statistics and graphs, Python or another programming language, and the habit of asking “how do we know this is true?” Data scientists in India work on everything from crop prices and cricket to hospitals and train timetables.

Quiz time

How well did you learn?

Score: 0 / 8

Think and discuss

No wrong answers here

  • When you learn something hard, like a new language or a sport, do you learn in giant leaps or small corrections? Which works better for you?
  • Have you ever been stuck in a “local minimum”, doing something that seemed good enough, until someone showed you a much better way?
  • The training data decides where the valley is. What could go wrong if Prakash uncle had only written down the sunny Sundays?
  • Mitthu said that taking steps without seeing the bottom is a kind of courage. Do you agree?

Be curious

Ask a teacher, parent or engineer

How does a computer feel the slope for a million weights at once? How do engineers know when to stop training? What is a “loss curve” and what does a good one look like? Can a model ever reach the true bottom of the valley? Why do bigger models need so much electricity to train?

Word bank

New words from this chapter

Error, or loss: a number that measures how wrong a model’s answers are.
Slope, or gradient: which way, and how steeply, the error changes when a weight changes.
Gradient descent: improving a model by stepping each weight a little downhill on the error, again and again.
Learning rate: how big each step is.
Local minimum: a low point that isn’t the lowest point.
Training: the whole process of adjusting a model’s weights using examples.
Overshoot: stepping so far that you go past the best answer.
Backpropagation: the method networks use to work out the slope for every weight at once.

For teachers and parents: this chapter fits two 40-minute periods. Period 1: read Parts 1–7 aloud (18 min), go through the two valley diagrams and the knee-weight table (10 min), then the Maths corner (10 min). Period 2: “The secret number valley” in pairs, the interactive valley if devices are available, the quiz, and Think and Discuss. The key ideas: training means reducing a measured error; the gradient tells each weight which way to move; the learning rate controls step size, with overshooting if it is too large and slow progress if it is too small; local minima can trap the search; and the training data defines what “low error” means, so it must be protected. The numbers in the knee-weight walk are part of the story, not real weather data. The Python corner is optional. The story illustrations marked “Illustrated with AI” were made with an AI image generator; the diagrams, tables and the valley game were made by hand.