Why Generalization Fails Until You Change the Question

Mark Erdmann

Hatched by Mark Erdmann

May 09, 2026

10 min read

84%

0

The strange fact that should change how you think about AI

A model can be brilliant at a task and still fail at the version you actually care about. It can learn multiplication, arithmetic, or web extraction, and yet collapse when the numbers get bigger, the site gets messier, or the input format shifts by a little. That is not always because the model is weak. Often it is because the problem was never specific enough to force the right kind of solution.

This is the hidden pattern connecting modern language models and modern data pipelines: performance improves not just when we optimize harder, but when we reduce ambiguity. The critical question is not only, “Can the model solve the task?” It is, “What kinds of solutions does the task allow?” If the task admits many solutions, most of them are traps. If the task is made more legible, the model is far more likely to generalize.

That reframes a lot of the current AI conversation. We are not merely training bigger models or building better scrapers. We are increasingly in the business of designing environments that make the right behavior easier to learn than the wrong behavior.


Underspecification: when success is too easy to fake

Imagine teaching a child multiplication using only a few examples: 2 times 3, 4 times 5, 7 times 8. A clever student might infer the pattern. Another might memorize the examples. If the test contains the same numbers, both look successful. If the test changes, only one actually learned the rule.

That is the core problem of underspecification. The training signal says only that some outputs are correct, not that the reasoning behind them must be general. In a neural network, there are often many internal representations that fit the training data. Some encode a rule. Others encode a patchwork of shortcuts. Gradient descent is excellent at lowering loss, but loss alone does not tell it which solution will scale.

This matters more than people think because generalization is not the default outcome of fitting data. Generalization is a kind of discipline imposed on a search process. Without that discipline, a model may become a sophisticated imitator. It can appear competent inside the training envelope while remaining fragile the moment the structure shifts.

That is why some systems fail at 4 digit multiplication while succeeding at 20 digits under a different training setup. The difference is not merely more training. The difference is that the setup changed what counts as a valid internal strategy.

A model does not generalize because it saw enough examples. It generalizes when the training setup makes shortcut solutions hard to sustain.

This is an uncomfortable idea because it implies that a lot of machine learning progress is really environment design. We are not just asking the model to learn better. We are asking ourselves to specify the task better.


The real object of training is not accuracy, it is constraint

A useful way to think about this is to separate three things that are often blurred together:

  1. The objective: what the system is rewarded for.
  2. The representation: how the model internally organizes the task.
  3. The constraint set: which solutions are realistically available.

Most people focus on the objective. But the objective is only the headline. The constraint set is where the outcome is decided.

Suppose you ask a model to answer arithmetic questions. If the examples are narrow and repetitive, a lookup style solution can work. If the examples are broad and the model must produce a valid chain of reasoning, then the space of plausible solutions shrinks. You have not magically made the model smarter. You have made it harder to be wrong in a shallow way.

This is why adding a valid chain of thought can matter so much. It is not just because the model writes down intermediate steps. It is because the requirement to produce a coherent intermediate structure narrows the solution space. The model is pushed away from opaque memorization and toward structured computation. The format itself becomes an inductive bias.

The same principle applies to architecture and regularization. Some architectures are better at preserving symmetry, locality, or compositionality. Some regularizers favor smoother, simpler representations. These are not cosmetic choices. They are the rails that direct learning toward one kind of intelligence rather than another.

In other words, generalization is often less about finding the best answer and more about excluding the wrong kinds of answers.


Why crawling and cleaning data is secretly a generalization problem

At first glance, website crawling seems like an entirely different topic. It sounds like infrastructure, not theory: fetch pages, parse HTML, convert content into markdown or structured data, feed it to a model.

But the connection is deeper. A raw website is like an underspecified learning problem. It contains navigation menus, sidebars, popups, footers, duplicate content, malformed HTML, and all kinds of noise that are technically part of the page but not part of the meaning. If you hand that chaos directly to a model, you are asking it to infer the signal under weak constraints.

That is why tools that convert entire websites into LLM ready markdown or structured data are so valuable. They do not merely save engineering time. They change the geometry of the task. Instead of forcing the model to learn which parts of the page matter, the pipeline does some of that constraint work up front.

Think of it like teaching a student from a textbook versus from a pile of torn pages, ads, and sticky notes. The content may be the same, but the learning problem is not. A cleaner representation reduces the number of accidental interpretations. It makes the right extraction path more likely and the wrong path less attractive.

This is the same logic as in arithmetic. In both cases, the challenge is not only extraction or computation. It is specification. A website crawl that preserves structure in a form suited to downstream reasoning is performing a role analogous to a better training scheme. It reduces ambiguity before the model has a chance to memorize noise.

Data cleaning is not just hygiene. It is a form of inductive bias.

That is a radical but useful way to think about modern AI pipelines. Scraping, parsing, chunking, labeling, and formatting are not boring preprocessing steps. They are decisions about what the model should be allowed to believe the task is.


The hidden parallel between arithmetic and web data

What connects a multiplication model and a website crawler is not mathematics versus web automation. It is the battle between structure and shortcut.

In arithmetic, the shortcut is memorizing patterns or shallow heuristics. In web extraction, the shortcut is overfitting to page templates, ignoring semantic structure, or treating noise as meaning. In both cases, a system may perform well on familiar inputs while failing catastrophically on variants.

Here is the deeper pattern:

  • If the task is underspecified, the model will optimize for the easiest stable route to the training objective.
  • If the easy route is a shortcut, the model will look good in evaluation and fail in the wild.
  • If we add constraints, better representations, or more structured objectives, we shrink the space of bad solutions.

This explains a lot of disappointment in AI deployment. Teams often assume that a model failed because it needed more parameter count, more tokens, or more compute. Sometimes that is true. But very often the deeper failure is that the problem was framed in a way that admitted too many accidental solutions.

A practical example: suppose you want a model to extract product specifications from thousands of ecommerce pages. If you simply ask it to read the pages and output JSON, it may learn brittle habits, like relying on nearby headings or the presence of certain labels. If instead you use a pipeline that standardizes the page into markdown, preserves heading hierarchy, and strips irrelevant chrome, you have already made the learning problem less slippery. You are not just feeding the model data. You are feeding it structure.

That distinction matters because structure transfers. A model that learns from structured inputs is more likely to extract stable patterns from new sites, new templates, and new layouts. It is less dependent on incidental surface forms. In the same way, a model trained to show its reasoning is more likely to apply the underlying rule to larger numbers it has never seen.


A mental model: the funnel of possibility

The best mental model here is a funnel of possibility.

At the top of the funnel, many solutions are available. Some are deep, some are shallow, some are deceptive. Training begins in this wide space. If we do nothing, gradient descent will settle on whatever works and is easiest to reach. That may or may not be the behavior we want.

The job of good training design is to narrow the funnel.

You can narrow it in several ways:

  • Architecture: choose structures that favor compositional or spatial reasoning.
  • Regularization: penalize brittle or overly complex fits.
  • Intermediate objectives: require steps, rationales, or validations.
  • Data formatting: remove noise and expose structure.
  • Curriculum: order examples so the model discovers the intended rule gradually.

The point is not that one of these alone solves everything. The point is that all of them act as filters on the space of possible solutions. The narrower and better aligned the funnel, the more likely the model is to emerge with behavior that survives contact with reality.

This is also why some complex training schemes outperform naïve ones even when the underlying model is the same. They are not making the model fundamentally different. They are making the desired solution the most accessible one.

The lesson for builders is clear: if your model is clever but brittle, do not only ask how to scale it. Ask what parts of the problem remain underspecified.


Key Takeaways

  1. Generalization is constrained, not automatic. A model does not generalize simply because it fit the training data. It generalizes when the setup makes shortcut solutions unattractive.

  2. Training objectives are only part of the story. Architecture, regularization, curriculum, and output format all shape which solutions are likely to emerge.

  3. Data preparation is a form of model design. Cleaning and structuring web data is not just operational work. It reduces ambiguity and makes downstream reasoning more reliable.

  4. Prefer tasks that reveal the rule, not just the answer. If possible, require intermediate reasoning, validation, or structured outputs that expose the underlying computation.

  5. When a model fails, look for underspecification first. Before assuming you need a bigger model, ask whether the task itself is too permissive or too noisy.


The deeper conclusion: intelligence is often a property of the frame

We tend to imagine intelligence as a thing a system either has or lacks. But in practice, a great deal of intelligence is supplied by the frame around the system. The frame includes the training objective, the representation of data, the format of the output, and the constraints that shape possible behavior.

That is why the most important innovation is often not a smarter model, but a better question. Or more precisely, a better formulation of the question. A multiplication task that rewards the right reasoning is different from one that rewards the right answer on a narrow slice of inputs. A website pipeline that surfaces structure is different from one that dumps raw HTML into the model. In both cases, the frame decides whether the system learns a rule or a trick.

So the next time an AI seems to fail, do not only ask whether it needs more training. Ask whether the problem itself is still too vague. Ask whether the data is too noisy. Ask whether the output format encourages memorization. Ask whether the system is being invited to generalize, or merely to guess.

Because in many cases, the boundary between failure and generalization is not the model. It is the architecture of the task we built around it.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣