Abstract

Contemporary large models adapt a single pretrained transformer backbone [1, 2] to each task by fine-tuning or retrieval, at substantial compute and data cost. The HOF-cognition hypothesis organizes reasoning differently: a library of small, single-purpose atomic functions, indexed in a high-dimensional vector space for approximate-nearest-neighbor recall [3], composed at runtime into higher-order functions under context-driven selective activation. Attention [1] supplies the mechanism for context-conditioned focus; functional-programming composition [4, 5, 6] supplies the compositional discipline; and psychophysics — the just-noticeable-difference (JND), Weber–Fechner scaling, Signal Detection Theory [7] with its sensitivity/criterion separation (d, β), and Stevens' power law — supplies the measurement foundation that governs which intermediate results the system acts on, retries, or discards. Bayesian cognition [8] frames the composition as inference under uncertainty. The architecture generalizes across tasks by recomposing reusable primitives and firing only the context-relevant subset per request, rather than by scaling a monolithic model. The efficiency claim is conditional and sharp: it holds exactly when the selection controller predicts the task-relevant primitives at low overhead, and that condition is measurable against a fine-tuned or retrieval-augmented baseline on a shared task.

1. Introduction

Adapting a general model to a task today follows a small number of well-worn routes. Transformer pretraining [1] and its scaled descendants [2] made a single reusable backbone practical; task specialization is then achieved by fine-tuning, which trades generalization for catastrophic forgetting [9, 10], or by retrieval augmentation, which grounds output in retrieved context at inference time. All of these carry per-request compute and memory cost, and none eliminates hallucination.

HOF-cognition proposes a different decomposition. Instead of one large parameterized function specialized by weight updates, maintain many small, composable functions and select only the context-relevant subset per request. Three ingredients realize this:

  1. Functional Atomic Decomposition (FAD). Cognitive operations are expressed as small, single-purpose atomic functions — pattern match, threshold test, probabilistic weigh — that serve as the building blocks for composed higher-order functions. This is the compositional style with a long pedigree in functional programming [4, 5, 6].
  2. High-dimensional vector indexing. Atomic functions and their contexts are embedded and retrieved by approximate-nearest-neighbor search [3], so relevant primitives are recalled and recomposed without scanning the whole library.
  3. Context-driven selective activation via attention. Attention [1] conditions which primitives are composed on the current context — the intuition behind mixture-of-experts routing, applied one level down, at the granularity of function selection.

The decomposition is the thesis; the remainder of the article states the design, the psychophysical measurement layer that decides what the system acts on, and the mechanism of generalization it delivers.

2. Related Work

Transformers and attention. The transformer [1] and GPT-scale models [2] established the pretrain-then-adapt paradigm and the attention mechanism this architecture repurposes for context-conditioned function selection.

Fine-tuning and its cost. Task fine-tuning specializes a backbone but degrades prior capability — catastrophic interference was characterized in connectionist networks well before transformers [9] and is only mitigated, not solved, by regularization such as Elastic Weight Consolidation [10]. Parameter-efficient methods (adapters [11], LoRA [12], and budget-adaptive AdaLoRA [13]) reduce adaptation cost but do not provide context-conditioned composition of primitives.

Approximate nearest-neighbor recall. Billion-scale similarity search on GPUs [3] is the benchmarked technique underlying the vector-indexing step and the reference baseline for its recall and latency.

Decision under uncertainty. Signal Detection Theory [7] structures the accept/reject decision for intermediate results — sensitivity (d) versus criterion (β) — and Bayesian models of cognition [8] frame reasoning as inference over priors and evidence.

Functional composition. The higher-order-function vocabulary — compose, map, fold — is functional programming [4, 5, 6], the algebra this architecture composes primitives in.

3. The Architecture

A controller embeds the current request context, recalls the relevant atomic functions by ANN search [3], composes them into a higher-order function under attention-conditioned selection [1], and gates each intermediate result through an SDT accept/retry decision [7]. The controller monitors the acceptance and retry statistics of its own composition and adjusts which primitives it selects — a metacognitive control loop that reads its own detection record and tunes the next selection against it.

Every mechanism the architecture names is a real, published technique: attention [1], ANN recall [3], functional composition [4, 5, 6], and SDT decisions [7]. The composition is the contribution — organizing these into a library of primitives selected per context rather than a monolith specialized per task. The efficiency argument rests on one variable: whether the selection controller predicts the task-relevant primitives at low overhead. That variable is the substantive problem, and the architecture makes it a first-class, measurable component rather than an assumption folded into an index.

4. The Psychophysical Foundation

Psychophysics is the measurement discipline that makes the architecture's decisions quantitative. It contributes four applied tools, each governing a concrete point in the pipeline:

These are measurement tools applied to real decisions in the pipeline — the JND sets the selection threshold, Weber–Fechner sets the attention budget, SDT sets the accept/retry gate, and the power law sets the weighting. Bayesian cognition [8] sits over them, framing the whole composition as inference over priors and evidence. The psychophysical layer is where the architecture meets a number.

5. General Reasoning

The architecture generalizes across tasks by a specific mechanism: it recomposes reusable atomic functions and fires only the context-relevant ones per input, rather than scaling a monolithic model. Generalization is compositional coverage — a fixed library of primitives spans a large space of tasks through recombination — measured by the fraction of new tasks the existing primitives compose to solve without adding parameters.

This is the route the hypothesis takes toward general, and ultimately superhuman, reasoning efficiency: a system that recalls and composes the right primitives at low overhead reasons across domains at lower cost than a monolith that must be scaled or re-specialized for each. The threshold question — whether such a system reaches and exceeds human-general performance — is an empirical one, settled by measurement against a fine-tuned, retrieval-augmented, or mixture-of-experts baseline on a shared task and dataset. The architecture is built to be measured on exactly that comparison.

Evidence & Scope

HOF-cognition is an architecture with a sharp, testable core. Every mechanism it composes — attention [1], ANN recall [3], functional composition [4, 5, 6], SDT decisions [7], Bayesian framing [8] — is real and independently benchmarked, and the psychophysical decision layer (JND, Weber–Fechner, SDT, Stevens' power law) grounds each pipeline decision in a measurable quantity. The efficiency claim reduces to one variable — whether the selection controller predicts the task-relevant primitives at low overhead and high accuracy — and that variable is the head-to-head that settles the outcome: HOF-cognition against a fine-tuned, retrieval-augmented, or mixture-of-experts baseline on a shared task, comparing accuracy and per-request cost, bounded by available compute. The selection controller is the variable that decides the result; the architecture makes it the thing that gets measured.

References

  1. Ashish Vaswani et al. (2017). Attention Is All You Need. Advances in Neural Information Processing Systems (NeurIPS). arXiv:1706.03762.
  2. Tom B. Brown et al. (2020). Language Models are Few-Shot Learners. Advances in Neural Information Processing Systems (NeurIPS). arXiv:2005.14165. [GPT-3]
  3. Jeff Johnson et al. (2019). Billion-Scale Similarity Search with GPUs. IEEE Transactions on Big Data. arXiv:1702.08734. [FAISS.]
  4. 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]
  5. John Hughes (1989). Why Functional Programming Matters. The Computer Journal.
  6. Christopher Strachey (2000). Fundamental Concepts in Programming Languages. Higher-Order and Symbolic Computation. [Reprint of 1967 lecture notes]
  7. David M. Green & John A. Swets (1966). Signal Detection Theory and Psychophysics. Wiley.
  8. Thomas L. Griffiths et al. (2008). Bayesian Models of Cognition. The Cambridge Handbook of Computational Psychology.
  9. Michael McCloskey & Neal J. Cohen (1989). Catastrophic Interference in Connectionist Networks: The Sequential Learning Problem. Psychology of Learning and Motivation.
  10. 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)]
  11. Neil Houlsby et al. (2019). Parameter-Efficient Transfer Learning for NLP. Proceedings of the 36th International Conference on Machine Learning (ICML). arXiv:1902.00751.
  12. Edward J. Hu et al. (2022). LoRA: Low-Rank Adaptation of Large Language Models. International Conference on Learning Representations (ICLR). arXiv:2106.09685.
  13. Qingru Zhang et al. (2023). AdaLoRA: Adaptive Budget Allocation for Parameter-Efficient Fine-Tuning. International Conference on Learning Representations (ICLR). arXiv:2303.10512.