Schema mit zwei verschachtelten Schleifen: Die innere Schleife wiederholt schnell Trainingsschritte an einem Modell, die umgebende äußere Schleife setzt Bedingungen wie Modellgröße und Lernrate, misst das Ergebnis und startet damit den nächsten Durchlauf.

Outer Loop

The outer loop is the outer, slow loop in a two-tier learning procedure: it changes the framework conditions of learning, while an inner, fast loop practices the actual task. In software development, the term analogously refers to the slow work steps after coding, such as testing and delivery.

Many procedures in Artificial Intelligence repeat a process very often. Such repetitions are called loops. When two loops are nested within each other, one distinguishes between the inner and the outer. The outer one is called the Outer Loop, the inner one the Inner Loop. The inner loop practices the actual task, very quickly and very often. The outer loop observes the result and changes the conditions under which practice takes place. A comparison: A student solves exercises, that is the inner loop. The teacher then checks which kind of exercises actually make sense, and rearranges the study plan. That is the outer loop.

Why the outer loop determines success

In the inner loop, usually only little can be improved. It follows a fixed rule and repeats it thousands of times. All the truly important decisions are made in the outer loop. There, for example, it is determined how strongly a model learns per step, how large it is, or with which data it works. Such settings are called hyperparameters, because they stand above the actual learning.

This also explains why the outer loop is so expensive. Each individual run contains a complete training. Whoever tries twenty variants trains twenty models. With large language models, one run costs millions. That is why research teams first test new ideas on small models and only afterward transfer the insight to the large one.

A common misconception is to confuse the Outer Loop with a mere repetition of training. What matters is the difference in the task. The Inner Loop improves a solution. The Outer Loop improves the method by which solutions are found.

What happens in one run of the outer loop

A run always has three parts. First, the outer loop sets the conditions, for example a model size or a learning rate. Then the inner loop runs through completely and delivers a trained model. Finally, this model is measured against data it did not see during training. The result is a single number, for example the accuracy rate.

With this number, the next run begins. In the past, conditions were simply tried out at random. Today, search procedures are used that estimate from the results so far which setting is worth trying next. Evolutionary methods are also common: they keep the best variants and alter them slightly, similar to the breeding of plants.

It becomes particularly interesting when the outer loop does not merely set numbers but designs the learning procedure itself. This is called meta-learning, that is, learning about learning. A system then searches on its own for good training rules or network structures. The effort is enormous, yet some building blocks widely used in large models today were found this way.

From the training cluster to developers' everyday life

In reports about AI labs, the Outer Loop usually comes up when it concerns computing costs. Sentences like “we shortened the outer loop” mean: fewer test runs were needed to find a good configuration. For investors this is relevant because a large part of the spending on graphics chips arises here.

The term is also heard in connection with AI agents. An agent is a program that plans several steps on its own. Its Inner Loop is the individual response of the language model. The Outer Loop checks whether the goal has been achieved, and otherwise starts a new attempt with additional information.

In software development, the term has a second, related meaning. There, the Inner Loop is the writing and immediate trying-out of code, that is, seconds to minutes. The Outer Loop encompasses automated tests, approvals, and delivery to users, often hours. Whoever reduces the waiting time of this outer loop makes a team faster than any new programming language.

Related Products

Latest News

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.