Abstract

"HOF cognition" borrows the vocabulary of higher-order functions from functional programming and applies it to organizing AI behavior as context-selected composition. This essay places that framing in its lineage: functions as first-class, composable values [1], Backus's argument for function-level programming [2], and Hughes's case that higher-order functions and composition are what make programs modular [3]. It then states where HOF cognition sits: a 2024 position that this compositional structure — selecting functions by context and recomposing them per task — belongs at the orchestration layer of AI systems, above the transformer methods it composes.

1. Introduction

The vocabulary of "HOF cognition" — atomic functions, higher-order functions, composition — is the standard terminology of functional programming, decades old [2, 3, 1]. What HOF cognition proposes under that name is narrower and newer: the application of that vocabulary to runtime orchestration of AI behaviors. This essay separates the two — the borrowed foundation from the contribution built on it — so each is read for what it is.

2. Related Work: The Lineage

Foundations of functional composition. Functions as first-class entities that can be passed and returned — the definition of a higher-order function — is a foundational programming-language concept [1]. Backus's 1977 Turing Award lecture argued for programming by composing functions rather than mutating state [2], and Hughes articulated why higher-order functions and lazy composition are the source of modularity in functional programs [3]. This is the intellectual ancestry of HOF cognition; the historical narrative below (lambda calculus, LISP, Scheme, ML, Haskell, and the cognitive architectures SOAR and ACT-R) is context for it.

Cognitive-science parallels. That complex behavior can be organized modularly has long-standing parallels in cognitive modeling; Bayesian accounts of cognition formalize inference as composable probabilistic computation [4]. These parallels motivate the framing.

Modern AI baselines. The problems HOF cognition targets — adaptation without catastrophic forgetting [5, 6], efficient specialization [7, 8], and grounding [9, 10] — are addressed today by transformer-based methods [11, 12]. These are the methods HOF cognition composes above at the orchestration layer.

3. From Foundation to Proposal

The historical arc is uncontroversial: lambda calculus and LISP established functions as first-class values; Scheme, ML, and Haskell developed composition and higher-order functions as everyday programming tools; cognitive architectures such as SOAR and ACT-R pursued modular, adaptable models of cognition. This is established prior art, cited above where it bears on the compositional claim [2, 3, 1].

The step this lineage adds — the 2024 HOF cognition proposal — is to apply the compositional structure to runtime AI orchestration: select functions by context, compose them per task, monitor and recompose. The contribution is a mechanism: organizing AI by compositional recomposition of reusable functions at the orchestration layer, as a route to broader generalization.

Evidence & Scope

The foundation — first-class functions, function-level programming, higher-order composition [2, 3, 1] — is established prior art, invoked as ancestry. The claim HOF cognition adds is a mechanism: organizing AI by compositional recomposition of reusable functions at the orchestration layer, above the transformer methods [11, 12], parameter-efficient adaptation [7, 8], and RAG [9]. Composition as the route to broader generalization is the claim, and the one the essay makes.

References

  1. Christopher Strachey (2000). Fundamental Concepts in Programming Languages. Higher-Order and Symbolic Computation. [Reprint of 1967 lecture notes]
  2. John Backus (1978). Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs. Communications of the ACM. [1977 ACM Turing Award Lecture]
  3. John Hughes (1989). Why Functional Programming Matters. The Computer Journal.
  4. Thomas L. Griffiths et al. (2008). Bayesian Models of Cognition. The Cambridge Handbook of Computational Psychology.
  5. Michael McCloskey & Neal J. Cohen (1989). Catastrophic Interference in Connectionist Networks: The Sequential Learning Problem. Psychology of Learning and Motivation.
  6. James Kirkpatrick et al. (2017). Overcoming Catastrophic Forgetting in Neural Networks. Proceedings of the National Academy of Sciences (PNAS). arXiv:1612.00796. [Elastic Weight Consolidation (EWC)]
  7. Edward J. Hu et al. (2022). LoRA: Low-Rank Adaptation of Large Language Models. International Conference on Learning Representations (ICLR). arXiv:2106.09685.
  8. Qingru Zhang et al. (2023). AdaLoRA: Adaptive Budget Allocation for Parameter-Efficient Fine-Tuning. International Conference on Learning Representations (ICLR). arXiv:2303.10512.
  9. Patrick Lewis et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems (NeurIPS). arXiv:2005.11401. [RAG]
  10. Ziwei Ji et al. (2023). Survey of Hallucination in Natural Language Generation. ACM Computing Surveys. arXiv:2202.03629.
  11. Ashish Vaswani et al. (2017). Attention Is All You Need. Advances in Neural Information Processing Systems (NeurIPS). arXiv:1706.03762.
  12. Jeremy Howard & Sebastian Ruder (2018). Universal Language Model Fine-tuning for Text Classification. Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (ACL). arXiv:1801.06146. [ULMFiT]