Skip to content

Architecture

Algorithms Are the Missing Intelligence

G6Solver Research Team

Modern artificial intelligence is, for all practical purposes, defined by neural networks. The transformer architecture, introduced by Vaswani et al. in 2017, triggered a capabilities explosion that has reshaped virtually every domain it has touched.[1] Language models can write legal briefs, summarise medical literature, translate between dozens of languages, and generate functional code in programming languages they were barely shown during training. Vision models classify images with superhuman accuracy. Reinforcement learning agents have mastered Go, chess, StarCraft, and protein structure prediction. The empirical record is extraordinary, and it is entirely attributable to the capacity of neural networks to learn from data and generalise from patterns.

The mechanism behind this success is both elegant and powerful. A neural network is a differentiable function with millions or billions of adjustable parameters. During training, gradient descent iteratively adjusts these parameters to minimise a loss function over a dataset. The result is a function that maps inputs to outputs in a way that captures statistical regularities in the training distribution — regularities that, remarkably, often transfer to inputs the network has never seen. This is generalisation, and it is the core capability that makes deep learning useful.

The universality is what sets neural networks apart. A single architectural paradigm — attention layers, residual connections, layer normalisation — can learn to perform tasks as diverse as sentiment analysis, machine translation, code generation, mathematical reasoning, and visual scene understanding. No other approach in the history of computing has demonstrated this breadth. Classical AI required hand-engineered features and domain-specific rules for every new task. Neural networks learn their own representations, and those representations are often better than anything a human engineer would have designed.

The scale-driven progress is equally remarkable. Kaplan et al. demonstrated smooth, predictable scaling laws: as models grow in parameter count and training data, performance improves according to power-law curves that show no sign of saturating.[2] This has given the field a rare engineering clarity — spend more compute, get more capability. The resulting models are not just incrementally better; they exhibit emergent capabilities that were absent in smaller models, suggesting that scale unlocks qualitatively new forms of intelligence.

So the optimistic reading of the situation is straightforward: neural networks learn from data, generalise from patterns, and have proven spectacularly successful across an unprecedented range of tasks. If the trajectory continues, there may be no problem that cannot be solved by making networks large enough and training them on enough data.

The Difference Between Learning Parameters and Learning Procedures

But there is a fundamental distinction buried in the success story, and it matters more than the scaling curves suggest. Neural networks learn parameters. They do not learn procedures. A network trained to sort numbers learns a set of weights that approximately maps unsorted sequences to sorted sequences across its training distribution. A sorting algorithm — merge sort, quicksort, heapsort — is a procedure: a finite set of deterministic steps that correctly sorts any input of any length, with provable time and space complexity guarantees. These are fundamentally different kinds of knowledge.[3]

The distinction is not academic. Consider a neural network trained to multiply two numbers. On inputs within its training range, it will produce approximately correct results. But "approximately correct" is meaningless for arithmetic. 7 times 143 is either 1,001 or it is wrong; there is no useful notion of "close enough." A multiplication algorithm, by contrast, produces exactly correct results for any inputs, every time, with no exceptions. For problems where correct algorithms exist, neural approximation is not a different approach to the same goal — it is a strictly inferior approach.[4]

This limitation becomes visible at the edges of the training distribution. Neural networks trained to perform algorithmic tasks — sorting, searching, graph traversal, arithmetic — reliably fail on inputs that differ structurally from their training data. A model trained to sort sequences of length 10 to 100 may fail catastrophically on sequences of length 1,000. A model trained to add numbers with up to 8 digits may produce nonsense when given 12-digit numbers. These are not edge cases in the traditional sense; they are entirely ordinary inputs for an algorithm. The algorithm does not care about the length of the input. The neural network does, because it learned a statistical approximation, not the procedure itself.

The problem extends beyond mathematics. Consider planning. A logistics company needs to route 500 delivery vehicles across a city to minimise total distance and time. Well-studied algorithms exist for this problem — variants of the travelling salesman problem with known approximation guarantees. A neural network might learn to produce reasonable routes for the city it was trained on, but its solutions come with no guarantees: no worst-case bounds, no optimality proofs, no assurance that it will not occasionally produce a route that sends a truck in circles. An operations research algorithm may not find the globally optimal solution in polynomial time (the problem is NP-hard), but it can guarantee that its solution is within a provable bound of optimal. Neural approximation cannot make this guarantee because it does not operate on the structure of the problem; it operates on the statistical properties of the training data.[5]

Silver et al. argued provocatively that "reward is enough" — that sufficiently powerful reinforcement learning agents, given the right reward signals, can learn any behaviour including algorithmic reasoning.[6] This is a strong theoretical claim, and it may even be true in the limit. But "in the limit" is doing enormous work in that sentence. In practice, training a neural network to reliably execute Dijkstra's algorithm from reward signals alone requires vastly more data, compute, and training ingenuity than simply implementing Dijkstra's algorithm. And even if the training succeeds, the result is a statistical approximation of Dijkstra's algorithm, not the algorithm itself — an approximation that may fail on inputs the training distribution did not adequately cover.

Chollet captured this distinction precisely in his analysis of intelligence measurement. He argued that generalisation ability — the capacity to handle novel situations efficiently — is the core of intelligence, and that current benchmarks conflate memorisation with generalisation.[7] A system that has memorised the solution to every multiplication problem up to 8 digits is not "intelligent" at arithmetic in any meaningful sense. A system that has learned the procedure for multiplication — and can therefore apply it to inputs of any size it has never seen — has learned something genuinely general. Current neural networks do the former; algorithms do the latter.

Problem Input Any domain Neural Approximation Statistical • Probabilistic Distribution-dependent Approximate Output No guarantees • May fail OOD Algorithmic Execution Deterministic • Provable Input-independent correctness Verified Output Correct • Bounded • Reproducible ~correct provably correct

Fig. 1 — For problems with known algorithmic solutions, neural approximation is strictly inferior to direct execution

Learning to Think Algorithmically

The resolution of this tension is not to choose between neural networks and algorithms. It is to build systems that compose them. The frontier of artificial intelligence is not bigger neural networks or more sophisticated algorithms in isolation; it is systems that can select, compose, and synthesise algorithms at runtime, using neural capabilities for the tasks where they excel and explicit procedures for the tasks where algorithms are superior.

This vision has deep roots. Koza's work on genetic programming in the 1990s demonstrated that algorithms themselves can be treated as objects of search — that you can evolve programs rather than merely tuning parameters.[8] Gulwani et al. extended this idea into the domain of program synthesis, showing that specifications can be used to automatically generate provably correct programs from examples, formal constraints, or natural language descriptions.[3] The key insight from both traditions is the same: algorithms are not static artefacts that must be hand-coded by human programmers. They can be constructed, selected, and composed by automated systems.

The practical architecture of such a system has three layers. The first is language understanding, where neural networks do what they do best: parse ambiguous natural language inputs, extract intent, identify relevant context, and map the messy reality of human communication onto structured representations. This is precisely the kind of task where statistical generalisation excels, because natural language is inherently ambiguous and context-dependent. There is no algorithm for understanding a vaguely worded request from a frustrated user at 2 AM; pattern matching from vast experience is exactly the right tool.

The second layer is algorithm synthesis and selection. Given a structured representation of what needs to be done, the system selects or constructs the appropriate algorithmic approach. If the task is sorting, it selects a sorting algorithm — not a neural network trained to sort. If the task is optimisation, it selects the appropriate optimisation method given the problem structure — linear programming for linear objectives with linear constraints, branch-and-bound for integer programming, gradient descent for smooth differentiable objectives. If no known algorithm exists, the system can attempt to synthesise one from specifications, using techniques from the program synthesis literature.[9]

The third layer is verified execution. The selected or synthesised algorithm is executed, and its output is verified against formal constraints before being returned. This closes the loop: neural networks handle the ambiguous, context-dependent front end; algorithms handle the precise, deterministic computation; and verification ensures that the output meets the required specification. Each component does what it is best at. None is asked to do what it cannot reliably do.

Language Understanding Neural networks • Ambiguity Context • Intent extraction Algorithm Synthesis Select • Compose • Generate Provable procedures Runtime construction Verified Execution Formal checks • Guarantees Bounded • Reproducible Structured representation flows left to right

Fig. 2 — A hybrid architecture where neural networks handle ambiguity, algorithmic synthesis handles computation, and verification ensures correctness

Why This Matters Now

The timing of this synthesis is not accidental. Two developments have converged to make it both possible and necessary. The first is the maturation of program synthesis as a practical engineering discipline. Early work in this field was largely theoretical — beautiful formalisms that could synthesise toy programs but nothing of practical complexity. Recent advances, particularly in neural-guided program synthesis, have changed this picture dramatically. Systems like AlphaCode and its successors can generate correct, efficient code for competitive programming problems that would challenge experienced human developers.[10] The counterexample-guided inductive synthesis (CEGIS) paradigm provides a principled framework for iteratively refining synthesised programs until they provably meet their specifications.[9]

The second development is the growing recognition that pure scaling of neural networks, while producing impressive capabilities, also produces impressive failure modes. As models grow larger and are deployed in higher-stakes settings, the consequences of their failures become more severe. A language model that occasionally produces incorrect arithmetic is a minor nuisance in a chatbot. It is a serious liability in a financial system. A model that occasionally generates plausible but wrong legal citations is an annoyance for a research assistant. It is a disciplinary matter for a lawyer who submits them to a court.[11]

The machine learning community has begun to recognise this limitation. Bengio et al. have argued for a "System 2" approach to deep learning — systems that can perform deliberate, sequential, rule-based reasoning in addition to the fast, intuitive pattern matching that current neural networks excel at.[12] This is precisely the argument for algorithmic integration. System 2 reasoning is algorithmic reasoning: deliberate, step-by-step, verifiable, and correct by construction. The question is not whether AI systems need this capability. The question is how to provide it.

The answer is not to train neural networks to be better at executing algorithms. That is like training a poet to be better at arithmetic — possible in principle, but a misuse of talent. The answer is to build systems that know when they are facing an algorithmic problem and can invoke the appropriate algorithm directly, reserving neural computation for the tasks where statistical generalisation is genuinely the right approach: understanding ambiguous inputs, generating creative content, navigating situations where no algorithm exists and judgment is required.

The Composition Problem

The hardest part of this vision is not the individual components. We have powerful language models. We have vast libraries of well-studied algorithms. We have maturing program synthesis techniques. The hard part is composition: building systems that can fluidly move between neural and algorithmic modes of processing, selecting the right approach for each sub-problem in a complex task.

Consider a real-world example. A user asks an AI system to "find the cheapest way to ship these 200 packages to 50 cities by next Tuesday, given our current fleet capacity and these delivery time windows." This single request requires language understanding (neural), constraint extraction (hybrid), vehicle routing optimisation (algorithmic — specifically, a variant of the capacitated vehicle routing problem with time windows), schedule feasibility checking (algorithmic — constraint satisfaction), and a natural language explanation of the result (neural). No single approach can handle the entire chain. The system needs to decompose the problem, route each sub-problem to the appropriate processing mode, and compose the results into a coherent response.

This composition capability is what current AI systems fundamentally lack. They are either neural all the way down — handling every sub-problem with pattern matching, including the sub-problems where pattern matching is the wrong tool — or algorithmic all the way down, which makes them brittle and incapable of handling the ambiguous, messy, context-dependent aspects of real-world problems. The synthesis is a system that understands the difference and acts accordingly.

Marcus has argued repeatedly that pure neural approaches will plateau, and that hybrid neurosymbolic architectures are necessary for robust, generalisable intelligence.[13] Whether or not one agrees with the strongest version of this claim, the engineering argument is straightforward: for any problem where a correct algorithm exists, using a neural approximation of that algorithm instead of the algorithm itself is an unforced error. It introduces unnecessary failure modes, eliminates formal guarantees, and wastes computational resources on learning something that is already known. The intelligent system is the one that recognises which tool to use when — neural for ambiguity, algorithmic for precision — and composes them seamlessly at runtime.

The algorithms are not missing from the world. They are missing from the AI. Restoring them — not as hand-coded routines bolted onto the side of a neural network, but as first-class objects that can be selected, composed, and synthesised by the system itself — is the architectural challenge that will define the next phase of artificial intelligence.

References & Further Reading

  1. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., ... & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30. — The paper that introduced the transformer architecture, enabling the modern era of large language models.
  2. Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., ... & Amodei, D. (2020). Scaling laws for neural language models. arXiv preprint arXiv:2001.08361. — Establishes power-law relationships between model size, dataset size, compute, and performance.
  3. Gulwani, S., Polozov, O., & Singh, R. (2017). Program synthesis. Foundations and Trends in Programming Languages, 4(1–2), 1–119. — Comprehensive survey of program synthesis techniques, from deductive to inductive to neural-guided approaches.
  4. Dziri, N., Lu, X., Sclar, M., Li, X. L., Jiang, L., Lin, B. Y., ... & Choi, Y. (2024). Faith and fate: Limits of transformers on compositionality. Advances in Neural Information Processing Systems, 36. — Demonstrates fundamental limitations of transformers on compositional reasoning tasks including multi-digit arithmetic.
  5. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to Algorithms (4th ed.). MIT Press. — The standard reference on algorithm design and analysis, covering correctness proofs and complexity bounds.
  6. Silver, D., Singh, S., Precup, D., & Sutton, R. S. (2021). Reward is enough. Artificial Intelligence, 299, 103535. — Argues that reward maximisation is sufficient to produce all aspects of intelligence, including algorithmic reasoning.
  7. Chollet, F. (2019). On the measure of intelligence. arXiv preprint arXiv:1911.01547. — Proposes a formal framework for measuring intelligence based on skill-acquisition efficiency and generalisation, distinguishing memorisation from genuine understanding.
  8. Koza, J. R. (1992). Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press. — Foundational work demonstrating that programs themselves can be evolved through selection and variation.
  9. Alur, R., Bodík, R., Juniwal, G. S., Martin, M. M. K., Raghothaman, M., Seshia, S. A., ... & Solar-Lezama, A. (2013). Syntax-guided synthesis. Proceedings of FMCAD 2013. — Establishes the SyGuS framework for program synthesis with formal specifications and counterexample-guided refinement.
  10. Li, Y., Choi, D., Chung, J., Kushman, N., Schrittwieser, J., Leblond, R., ... & Vinyals, O. (2022). Competition-level code generation with AlphaCode. Science, 378(6624), 1092–1097. — Demonstrates that AI systems can generate correct code at the level of competitive programmers.
  11. Magesh, V., Kvelling, J., Sivasubramanian, V., Franklin, M., & Basu, S. (2024). Hallucination-free? Assessing the reliability of leading AI legal research tools. arXiv preprint arXiv:2401.01301. — Documents the rate of hallucinated legal citations in production AI systems used by legal professionals.
  12. Bengio, Y. (2019). From System 1 deep learning to System 2 deep learning. NeurIPS 2019 keynote. — Argues for extending deep learning toward deliberate, compositional, and causal reasoning capabilities.
  13. Marcus, G. (2020). The next decade in AI: Four steps towards robust artificial intelligence. arXiv preprint arXiv:2002.06177. — Makes the case for hybrid neurosymbolic architectures that combine neural pattern matching with structured symbolic reasoning.