# What is grokking? Finding a meter reading after midnight

A three-hour test starts at 23:00. Which meter reading closes it? We trained a small model and measured when it could apply the same clock rule to unfamiliar questions.

Watt2Work · 2026-11-24 · 5 min read
Canonical: https://watt2work.com/blog/grokking-with-24-hour-meter-records/
Language: en
Topics · [Artificial intelligence](https://watt2work.com/blog/topic/ai/), [Energy](https://watt2work.com/blog/topic/energy/), [Data & measurement](https://watt2work.com/blog/topic/measurement/)

A night test at a hydropower plant’s maintenance workshop starts at 23:00. Which meter reading should the engineer open three hours later? Count one hour to midnight, then two more to 02:00 the next day. A small AI model got this question right after 100 training steps. At that moment it could answer only 17 of the 192 questions we had set aside. We would have missed that by checking just the one answer.

> To see whether a model can carry a rule over to new examples, set some questions aside at the start. Follow the scores for the same two groups throughout training.

The plant and meter readings are illustrative. We measured the model scores in the chart and table in one local training run on generated pairs of clock values.

![Training accuracy reaches 100% by step 100. Of 192 held-out questions the model gets 17 right at step 100, 179 at 1,000, 107 at 6,000 and 162 at 12,000.](https://watt2work.com/editorial/grokking/learning-en.png)

One model and two fixed sets of questions. We scored both sets every 100 updates.

## Start with the engineer’s calculation

On the hour the meter records the energy used so far, in kWh. A daily file has 24 hour labels, from 00:00 through 23:00. Our night test spans two files. These four readings mark the boundaries of the three hourly intervals.

Four consecutive illustrative readings from the same meter. It did not reset during the interval.

| Meter reading (Istanbul time) | Cumulative energy |
| --- | --- |
| Monday 23:00 | 12,400 kWh |
| Tuesday 00:00 | 12,405 kWh |
| Tuesday 01:00 | 12,411 kWh |
| Tuesday 02:00 | 12,418 kWh |

Subtract the first reading from the last and the three hours account for 18 kWh. Stop one row early and 11 kWh goes into the report. Before calculating energy the engineer needs to decide which two records belong together.

## When does grokking happen?

A model sees its training examples repeatedly. At each training step it adjusts its numerical settings to reduce the error in its answers. Solving an example it has never trained on is called generalization. Alethea Power and colleagues saw a particular sequence in small arithmetic tasks. In some runs the model first became nearly perfect at questions it had seen. Training continued on the same data. Much later, performance on unfamiliar questions rose sharply. They called this delayed generalization grokking. [Alethea Power et al. · Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets (2022)](https://arxiv.org/abs/2201.02177).

The emergence article in this series compared models of different sizes on one maintenance question. Here the size stays fixed. We compare earlier and later versions of the very same model as it trains.

## How did we put the clock rule to a model?

We gave the model two inputs, the starting hour and the number of whole hours elapsed. It predicts the hour label on the closing reading. The engineer reads the kWh values and works out the difference. There are 24 possible starting hours and 24 durations from 1 to 24 hours, giving 576 different questions. We generated the answers with ordinary clock arithmetic. For example, 23 + 3 = 26. The clock wraps around at 24, giving 02:00.

We reserved the midnight question first. A fixed random draw put 384 of the other pairs into training. That left 192 evaluation questions, including the midnight question. Only the 384 training examples changed the model’s settings. We fixed the small network’s structure, the two sets and the budget of 12,000 updates before training. Every 100 updates we counted correct hour labels in each set.

## What changed while the training score stood still?

Six moments in one training run. Each score is the number of correct answers out of all the questions in that group.

| Training step | Training questions | Held-out questions |
| --- | --- | --- |
| 0 | 16/384 | 5/192 |
| 100 | 384/384 | 17/192 |
| 500 | 384/384 | 144/192 |
| 1,000 | 384/384 | 179/192 |
| 6,000 | 384/384 | 107/192 |
| 12,000 | 384/384 | 162/192 |

At step 100 the model answered all 384 training questions correctly. It got 17 of the held-out questions right. By step 1,000 the training score was still 384/384, but the held-out score had reached 179/192. The model had seen no additional training examples. Reading the two columns together shows the delay that makes grokking interesting.

The rest of the run matters too. At step 6,000 the held-out score fell to 107 correct answers. It finished at 162. Our midnight question came out right at all three of those checkpoints. Watching that one answer would have hidden what was happening at other hours.

This run measured how many answers were right. Identifying the calculation inside a model takes a different experiment. Neel Nanda and colleagues looked inside small Transformers trained to add on a cycle like a clock, then tested the parts of the mechanism they found. [Neel Nanda et al. · Progress measures for grokking via mechanistic interpretability (2023)](https://arxiv.org/abs/2301.05217).

- [Open all 121 observations (CSV)](https://watt2work.com/editorial/grokking/checkpoints.csv)
- [Python code to repeat the experiment](https://watt2work.com/editorial/grokking/meter_clock.py)

## What would we use on shift?

We would use calendar arithmetic to match these readings. The known clock rule directly answers all 192 held-out questions. A real report also needs the meter ID, date and time zone. If an hour is missing or the meter has reset, the engineer checks the source before using the energy difference.

The experiment suggests a way to assess a harder task, such as detecting unusual energy use across operating conditions. Reserve whole days or entire meters for testing. Splitting near-identical hours from one event across training and evaluation can inflate the score. Show the engineer which events the model caught on new days, which it missed, and how a simple baseline performed. Those are questions a shift team can use to design its own acceptance test.

## Sources

Power and colleagues introduced grokking in the experiments cited below. Nanda and colleagues studied how a rule takes shape inside a model. The clock experiment, code and raw scores are original to this article.

1. [Alethea Power et al. · Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets (2022)](https://arxiv.org/abs/2201.02177)
2. [Neel Nanda et al. · Progress measures for grokking via mechanistic interpretability (2023)](https://arxiv.org/abs/2301.05217)

## Related articles

- [What is emergence in AI? Scoring one maintenance answer twice](https://watt2work.com/blog/emergence-in-a-maintenance-assistant/)
- [How does a maintenance assistant find the right manual?](https://watt2work.com/blog/how-a-maintenance-assistant-finds-the-right-manual/)
- [Facility energy efficiency: from measurement to lasting savings](https://watt2work.com/blog/facility-energy-efficiency-measurement-to-savings/)
