cs.AIApr 12, 2026

Working Paper: Towards Schema-based Learning from a Category-Theoretic Perspective

Authors: Pablo de los Riscos, Fernando J. Corbacho, Michael A. Arbib

Organizations: Cognodata I+D & Universidad Autonoma de Madrid · University of California San Diego

Abstract

We introduce a hierarchical categorical framework for Schema-Based Learning (SBL) structured across four interconnected levels. At the schema level, a free multicategory SchsynSch_{syn} encodes fundamental schemas and transformations. An implementation functor I\mathcal{I} maps syntactic schemas to representational languages, inducing via the Grothendieck construction the total category SchimplSch_{impl}. Implemented schemas are mapped by a functor ModelModel into the Kleisli category KL(G)\mathbf{KL(G)} of the Giry monad, yielding probabilistic models, while an instances presheaf assigns evaluated instance spaces. A semantic category SchsemSch_{sem}, defined as a full subcategory of KL(G)\mathbf{KL(G)}, provides semantic grounding through an interpretation functor from SchimplSch_{impl}. At the agent level, SchimplSch_{impl} is equipped with a duoidal structure OSch\mathcal{O}_{Sch} supporting schema-based workflows. A left duoidal action on the category MindMind enables workflow execution over mental objects, whose components include mental spaces, predictive models, and a cognitive kernel composed of memory and cognitive modules. Each module is specified by schema-typed interfaces, duoidal workflows, a success condition, and a logical signature. Memory is formalized categorically via memory subsystems, a presheaf DataMData_M, a monoidal operation category OpsMOps_M, and read/write natural transformations. Together with the BodyBody category, Mind defines the embodied SBL agent. At higher levels, SBL is represented as an object of the agent architecture category ArchCatArchCat, enabling comparison with heterogeneous paradigms, while the WorldWorld category models multi-agent and agent-environment interactions. Altogether, the framework forms a weak hierarchical nn-categorical structure linking schema semantics, cognition, embodiment, architectural abstraction, and world-level interaction.

Figures & tables

Explore similar work

Sep 30, 2026

Schema: Discovering Unknown Environments via Agentic Program Induction

Learning to complete tasks in unfamiliar environments with unknown rules remains a key challenge for LLM agents. Current LLM agents often record their discoveries in prose, which may not provide a compact, explicit account of how the environment works. Inspired by how scientists organize observations into testable, predictive theories, we introduce Schema, an agent harness that organizes learning and action through interactive program induction. The LLM agent decides what to investigate and how to act, expressing its evolving understanding of the environment as executable programs. The harness consists of a persistent program workspace and a small set of interfaces for checking these programs against the interaction history, planning within them, and executing plans under step-by-step verification. Schema raises ARC-AGI-3 RHAE from 58.7% to 99.2% with the same base model, solves 100% of the public DiG-bench games, and reaches the median performance of the top-50 human players on MazeBench. Extensive analysis shows the effectiveness of Schema in unknown mechanism discovery, and ablations confirm the contribution of each component.
Mar 30, 2026

Working Paper: Towards a Category-theoretic Comparative Framework for Artificial General Intelligence

AGI has become the Holly Grail of AI with the promise of level intelligence and the major Tech companies around the world are investing unprecedented amounts of resources in its pursuit. Yet, there does not exist a single formal definition and only some empirical AGI benchmarking frameworks currently exist. The main purpose of this paper is to develop a general, algebraic and category theoretic framework for describing, comparing and analysing different possible AGI architectures. Thus, this Category theoretic formalization would also allow to compare different possible candidate AGI architectures, such as, RL, Universal AI, Active Inference, CRL, Schema based Learning, etc. It will allow to unambiguously expose their commonalities and differences, and what is even more important, expose areas for future research. From the applied Category theoretic point of view, we take as inspiration Machines in a Category to provide a modern view of AGI Architectures in a Category. More specifically, this first position paper provides, on one hand, a first exercise on RL, Causal RL and SBL Architectures in a Category, and on the other hand, it is a first step on a broader research program that seeks to provide a unified formal foundation for AGI systems, integrating architectural structure, informational organization, agent realization, agent and environment interaction, behavioural development over time, and the empirical evaluation of properties. This framework is also intended to support the definition of architectural properties, both syntactic and informational, as well as semantic properties of agents and their assessment in environments with explicitly characterized features. We claim that Category Theory and AGI will have a very symbiotic relation.
May 12, 2026

Harness Engineering as Categorical Architecture

The agent harness, the system layer comprising prompts, tools, memory, and orchestration logic that surrounds the model, has emerged as the central engineering abstraction for LLMbased agents. Yet harness design remains ad hoc, with no formal theory governing composition, preservation of properties under compilation, or systematic comparison across frameworks. We show that the categorical Architecture triple (G, Know, Phi) from the ArchAgents framework provides exactly this formalization. The four pillars of agent externalization (Memory, Skills, Protocols, Harness Engineering) map onto the triple's components: Memory as coalgebraic state, Skills as operad-composed objects, Protocols as syntactic wiring G, and the full Harness as the Architecture itself. Structural guarantees-integrity gates, quality-based escalation, supported convergence checks-are Know-level certificates whose preservation is structural replay: our compiler checks identity and verifier replay, not output-layer correctness or model behavior. We validate this correspondence with a reference implementation featuring compiler functors targeting Swarms, DeerFlow, Ralph, Scion, and LangGraph: the four configuration compilers preserve three named certificate types by identity or replay, and LangGraph preserves the same certificates through its shared per-stage execution path. The LangGraph compiler creates one node per stage using the same per-stage method as the native runtime, providing LangGraph-native observability without reimplementing harness logic. An end-to-end escalation experiment with real LLM agents confirms that the quality-based escalation control path is model-parametric in this two-model, one-task experiment. The result positions categorical architecture as the formal theory behind harness engineering.