When Models Learn the Function but Still Fail the Job
Hatched by Mark Erdmann
Jun 01, 2026
9 min read
6 views
87%
The strange gap between knowing and doing
What if a model can learn a function so well that it can derive its inverse, yet still stumble when asked to solve a realistic programming task? That tension is the real story here. It reveals that intelligence in language models is not a single capability, but a stack of distinct abilities that do not always travel together: pattern extraction, abstraction, composition, planning, and execution.
For a while, many coding benchmarks made progress look cleaner than it really was. Short tasks, narrow prompts, simplified environments, and pattern friendly exercises allowed models to look closer to human level than they often are in the wild. But once the task expands into a realistic setting, with dependencies, edge cases, and multiple interacting constraints, the picture changes fast. A model that can autocomplete code fluently may still fail when asked to build something that actually works.
At the same time, another line of evidence points in the opposite direction: models are not just parroting surface patterns. Under the right training regime, they can internalize latent structure from examples, even when that structure was never explicitly named. In other words, they can sometimes learn not merely the mapping, but the hidden rule behind the mapping. This is not shallow mimicry. It is a kind of compressed understanding.
So the question is not whether models can learn. They clearly can. The deeper question is: what kind of learning turns into useful competence, and what kind stays trapped inside the weights?
Benchmarks measure the wrong part of the mountain
The easiest mistake is to treat benchmark scores as a direct reading of intelligence. They are not. They are more like altitude readings taken from one slope of a mountain while ignoring the cliffs on the other side. A model can do extremely well on short coding tasks because those tasks reward local pattern completion, familiar library calls, and template recall. But software engineering is not mostly about local pattern completion.
Real programming is a coordination problem. You must hold a goal in mind, decompose it into parts, preserve invariants, manage state, anticipate failures, and keep the whole system coherent while it evolves. The hard part is not writing a line of code that looks right. The hard part is making many lines of code remain right together.
That is why a high score on a toy benchmark can be deeply misleading. It may show that a model has learned the grammar of code, not the physics of software. A fluent sentence is not the same thing as a working system. In the same way, a correct-looking function is not the same thing as a correct architecture.
This is where the contrast becomes illuminating. If one evaluation says, “The model can imitate the surface of coding,” and another says, “The model can infer hidden structure from examples,” then we are being shown two very different dimensions of competence. One is surface fluency. The other is latent abstraction. The first helps you predict the next token. The second helps you manipulate a concept.
A model can know the shape of a tool without knowing how to use it in a workshop.
That distinction matters because the workshop is where real value is created.
Out of context learning is not the opposite of in context learning
A fascinating implication of out of context learning is that it reframes what fine tuning actually does. Fine tuning is often described as teaching a model a domain. But the more interesting possibility is that fine tuning teaches a model to discover an abstract operator from examples, then store that operator in its internal state.
Consider a child learning the concept of multiplication. You can show many pairs of inputs and outputs, never mention the word multiplication, and the child may still infer the rule. The child can then apply it to new numbers, invert it in some cases, and combine it with other operations. That is more than memorization. It is the extraction of a hidden process.
The same thing appears to happen in models under some conditions. If you train on pairs like x and f(x), the model may not just memorize examples. It may build an internal representation of the function as a manipulable object. That is why it can sometimes generate code for the function, reason about its inverse, or compose it with another transformation.
This is a major clue about how models think, but it also creates a dangerous illusion. We might assume that because the model has internalized the function, it will also handle any surrounding task that requires that function. Not necessarily. Understanding an operator in the abstract is one thing. Deploying it correctly inside a larger system is another.
Think of it this way: a musician can know a scale perfectly and still fail to play a song. The scale is abstract knowledge. The song requires timing, structure, adaptation, and coordination with other notes. Likewise, a model may internalize a function, but still fail to place that function inside a robust program, a coherent proof, or a production system.
That is the paradox at the center of this whole topic: models are better at internalizing structure than many people expected, but structure alone does not equal competence.
The real divide is not memorization versus reasoning
For years, the debate has often been framed as memorization versus reasoning. But that is too crude. The more useful distinction is unstructured pattern recall versus structured generalization.
Pattern recall reproduces familiar shapes. Structured generalization extracts a rule that can be reused, inverted, combined, or applied in a new context. A model can have both, one, or neither, depending on the task and training setup. This is why the same system may look brilliant in one setting and clumsy in another.
Here is a useful mental model: imagine three layers.
- Token layer: the model predicts what looks likely next.
- Operator layer: the model represents hidden rules, transformations, and latent functions.
- System layer: the model coordinates those operators across a longer workflow with goals, dependencies, and failure handling.
Many benchmarks mostly probe the token layer. The out of context learning result suggests a strong operator layer. But practical programming demands the system layer. That is why a model can seem surprisingly smart in isolation and still be frustrating in application.
This also explains why “can it write code?” is the wrong question. The better question is: can it preserve intent across transformations?
Because software work is full of transformations. You translate requirements into interfaces, interfaces into implementations, implementations into tests, tests into behavior, and behavior back into debugging. If the model loses track of the underlying intent at any step, the chain breaks. A system that knows the right transformation but cannot sustain it over time will keep producing brittle answers.
The difference between a clever model and a useful model is often the difference between recognizing a pattern and maintaining a contract.
Why realistic coding tasks expose the truth
Realistic coding benchmarks matter because they force the model to confront the full stack of competence. In a toy task, a model can succeed by recognizing syntax and common idioms. In a realistic task, the model must juggle names, scope, file boundaries, requirements, hidden assumptions, and the possibility that the first good idea is wrong.
A practical programming problem is like a crowded kitchen, not a clean recipe card. Ingredients arrive at different times, constraints conflict, and one mistake contaminates everything downstream. Humans are good at this not because they are perfect coders, but because they can keep goals stable while adjusting tactics. They can recognize when a local fix violates a global invariant.
This is where the internalized function story becomes more relevant than it first appears. If a model can discover an abstract rule from examples, then perhaps it can also build richer internal representations of code behavior, APIs, or design patterns. But unless those representations are connected to durable planning and verification, they remain fragile.
That fragility is easy to miss because model outputs are often polished. Fluent explanations and neat code blocks create an illusion of coordination. Yet software systems punish illusions. A single subtly wrong assumption can survive surface inspection and fail only when deployed.
So practical benchmarks are not just harder versions of the same task. They are a different category of test. They ask whether the model’s latent knowledge can survive contact with reality.
The synthesis: intelligence as compressive control
The deepest connection between these ideas is this: intelligence in models may be less about storing facts and more about compressing control policies.
A control policy is not just knowledge. It is knowledge plus action selection under constraints. That is what makes the function-learning result so interesting. The model is not merely storing input-output pairs. It is compressing the rule that governs them, then using that compression to act on novel prompts. But practical coding reveals the limit of that compression, because coding is not one function. It is many functions, composed over time, in a shifting environment.
This suggests a new way to think about progress. Instead of asking, “How big is the model?” or “How high is the benchmark score?”, ask:
- What latent structures can it infer?
- How well can it preserve those structures under composition?
- Can it coordinate them across a realistic workflow?
- Does it know when its own internal rule is insufficient?
That last question may be the most important. A model that knows a function but not its limits can be more dangerous than a model that knows less but is more cautious. In software, overconfident partial competence is a recipe for subtle bugs.
The convergence of these two research directions points toward a future in which model evaluation must become much more like systems engineering. We need tests that ask not only whether a model can infer a hidden operator, but whether it can use that operator responsibly inside a larger, failure prone process.
In that future, the best models will not simply be those that can answer isolated prompts. They will be the ones that can carry learned structure across context, compose it reliably, and retain contact with reality.
Key Takeaways
- Stop equating benchmark fluency with real competence. A model can excel on short coding tasks and still fail at realistic software work.
- Think in layers. Separate token level pattern completion, operator level abstraction, and system level coordination.
- Value latent structure, but test its composability. Learning a hidden function is impressive only if the model can invert, compose, and reuse it in new settings.
- Prefer evaluation tasks that punish brittle understanding. Realistic tasks reveal whether the model can preserve intent, manage dependencies, and recover from errors.
- Use the right question. Do not ask only whether the model knows something. Ask whether it can control that knowledge under pressure.
Conclusion: the next leap is not more knowledge, but better containment
The most surprising lesson here is that models may already possess more hidden structure than we give them credit for, yet still fall short where it matters most. That means the frontier is not simply about teaching them more facts or more functions. It is about helping them contain, preserve, and deploy what they already know inside larger tasks.
In that sense, the future of AI competence may look less like a library expanding and more like an engineering discipline maturing. The question will not be whether a model can learn the rule. The question will be whether it can keep the rule intact when the world gets messy.
And that reframes everything. The real measure of intelligence is not whether a model can discover a function in isolation. It is whether it can carry that discovery through the complexity of a real job without losing the thread.
Sources
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 🐣