Skip to content

Author

Yizhang Hu

4 papers indexed here

We haven’t gathered this author’s papers yet. Follow them and we’ll fetch their work.

Not the right person? Other researchers publish under this name.

#small language model Open access Aug 2026

Executable Memory and World Coupling: Code as Cognitive Interface in a Self-Modifying Simulation

Large language model (LLM) agents have recently explored executable memory—compiling agent memory into code snippets that an external LLM interprets at inference time. We argue that this paradigm remains tied to a single architectural choice: the executor is an external model, the memory is a personal profile, and the code never participates in the agent's own memory economy. We present a cognitive simulation engine in which executable code is stored as unit-level memory entries and executed by a deterministic rule engine inside the simulation itself. A memory entry carrying an EXPR: prefix is a small program—an arithmetic expression over engine parameters and state variables—interpreted each generation; its result feeds directly into the unit's behavioral circuits. Code memory participates in the engine's memory economy: entries decay, are reinforced by hits, are evicted by capacity limits, and pass the same verification gates as any mechanism. Units acquire executable fragments by foraging, coupling energy gain with behavioral information transfer. Experiments show that (i) code memory measurably alters survival dynamics (extinction-count growth reduced by roughly 97% at threat 1.0); (ii) the survival benefit of code is stratified by strategy—decay reinforcement confers +15 generations at threat 1.5, healing reinforcement +10, while aggressive threat clearance confers no gain (clearing danger memories also clears the fear that drives defensive behavior); (iii) beyond a critical threat intensity (3.0) no code strategy confers benefit—a measured capability boundary; (iv) external trigger coupling: a unit's code can read an external trigger state (cognition) and, when the external signal is present, deterministically clear its own threat memories while writing an externally observable trace—with the external signal absent, the same code is inert, demonstrating that perception is a necessary component of the response; (v) cognitive code is acquired, not inherited: newly born units without the code fragment cannot perceive the external state, making cognition an evolvable individual trait; and (vi) when defensive and adversarial code coexist, an arms race emerges from primitive operations alone. We also report an unexpected semantics of negative-valued code, its diagnosis, and its redesign as a candidate inhibitory mechanism. The architecture points toward self-modifying systems in which memory, behavior, perception, and robustness converge on a single executable substrate.

Yizhang Hu · 0 citations
#small language model Open access Aug 2026

Executable Memory and World Coupling: Code as Cognitive Interface in a Self-Modifying Simulation

Large language model (LLM) agents have recently explored executable memory—compiling agent memory into code snippets that an external LLM interprets at inference time. We argue that this paradigm remains tied to a single architectural choice: the executor is an external model, the memory is a personal profile, and the code never participates in the agent's own memory economy. We present a cognitive simulation engine in which executable code is stored as unit-level memory entries and executed by a deterministic rule engine inside the simulation itself. A memory entry carrying an EXPR: prefix is a small program—an arithmetic expression over engine parameters and state variables—interpreted each generation; its result feeds directly into the unit's behavioral circuits. Code memory participates in the engine's memory economy: entries decay, are reinforced by hits, are evicted by capacity limits, and pass the same verification gates as any mechanism. Units acquire executable fragments by foraging, coupling energy gain with behavioral information transfer. Experiments show that (i) code memory measurably alters survival dynamics (extinction-count growth reduced by roughly 97% at threat 1.0); (ii) the survival benefit of code is stratified by strategy—decay reinforcement confers +15 generations at threat 1.5, healing reinforcement +10, while aggressive threat clearance confers no gain (clearing danger memories also clears the fear that drives defensive behavior); (iii) beyond a critical threat intensity (3.0) no code strategy confers benefit—a measured capability boundary; (iv) external trigger coupling: a unit's code can read an external trigger state (cognition) and, when the external signal is present, deterministically clear its own threat memories while writing an externally observable trace—with the external signal absent, the same code is inert, demonstrating that perception is a necessary component of the response; (v) cognitive code is acquired, not inherited: newly born units without the code fragment cannot perceive the external state, making cognition an evolvable individual trait; and (vi) when defensive and adversarial code coexist, an arms race emerges from primitive operations alone. We also report an unexpected semantics of negative-valued code, its diagnosis, and its redesign as a candidate inhibitory mechanism. The architecture points toward self-modifying systems in which memory, behavior, perception, and robustness converge on a single executable substrate.

Yizhang Hu · 0 citations
#small language model Open access Aug 2026

Executable Memory and World Coupling: Code as Cognitive Interface in a Self-Modifying Simulation

【Version note — v3】This version removes all literature citations; the Related Work section now states explicitly that the work is bottom-up and experiment-driven, and that we prefer an explicit statement of independence over a performative reference list. Earlier versions (v1, v2) contain incomplete reference lists and should be treated as working drafts; the current version supersedes them. Large language model (LLM) agents have recently explored executable memory—compiling agent memory into code snippets that an external LLM interprets at inference time. We argue that this paradigm remains tied to a single architectural choice: the executor is an external model, the memory is a personal profile, and the code never participates in the agent's own memory economy. We present a cognitive simulation engine in which executable code is stored as unit-level memory entries and executed by a deterministic rule engine inside the simulation itself. A memory entry carrying an EXPR: prefix is a small program—an arithmetic expression over engine parameters and state variables—interpreted each generation; its result feeds directly into the unit's behavioral circuits. Code memory participates in the engine's memory economy: entries decay, are reinforced by hits, are evicted by capacity limits, and pass the same verification gates as any mechanism. Units acquire executable fragments by foraging, coupling energy gain with behavioral information transfer. Experiments show that (i) code memory measurably alters survival dynamics (extinction-count growth reduced by roughly 97% at threat 1.0); (ii) the survival benefit of code is stratified by strategy—decay reinforcement confers +15 generations at threat 1.5, healing reinforcement +10, while aggressive threat clearance confers no gain (clearing danger memories also clears the fear that drives defensive behavior); (iii) beyond a critical threat intensity (3.0) no code strategy confers benefit—a measured capability boundary; (iv) external trigger coupling: a unit's code can read an external trigger state (cognition) and, when the external signal is present, deterministically clear its own threat memories while writing an externally observable trace—with the external signal absent, the same code is inert, demonstrating that perception is a necessary component of the response; (v) cognitive code is acquired, not inherited: newly born units without the code fragment cannot perceive the external state, making cognition an evolvable individual trait; and (vi) when defensive and adversarial code coexist, an arms race emerges from primitive operations alone. We also report an unexpected semantics of negative-valued code, its diagnosis, and its redesign as a candidate inhibitory mechanism. The architecture points toward self-modifying systems in which memory, behavior, perception, and robustness converge on a single executable substrate.

Yizhang Hu · 0 citations
#large language models Open access Aug 2026

Executable Memory and World Coupling: Code as Cognitive Interface in a Self-Modifying Simulation

【Version note — v3】This version removes all literature citations; the Related Work section now states explicitly that the work is bottom-up and experiment-driven, and that we prefer an explicit statement of independence over a performative reference list. Earlier versions (v1, v2) contain incomplete reference lists and should be treated as working drafts; the current version supersedes them. Large language model (LLM) agents have recently explored executable memory—compiling agent memory into code snippets that an external LLM interprets at inference time. We argue that this paradigm remains tied to a single architectural choice: the executor is an external model, the memory is a personal profile, and the code never participates in the agent's own memory economy. We present a cognitive simulation engine in which executable code is stored as unit-level memory entries and executed by a deterministic rule engine inside the simulation itself. A memory entry carrying an EXPR: prefix is a small program—an arithmetic expression over engine parameters and state variables—interpreted each generation; its result feeds directly into the unit's behavioral circuits. Code memory participates in the engine's memory economy: entries decay, are reinforced by hits, are evicted by capacity limits, and pass the same verification gates as any mechanism. Units acquire executable fragments by foraging, coupling energy gain with behavioral information transfer. Experiments show that (i) code memory measurably alters survival dynamics (extinction-count growth reduced by roughly 97% at threat 1.0); (ii) the survival benefit of code is stratified by strategy—decay reinforcement confers +15 generations at threat 1.5, healing reinforcement +10, while aggressive threat clearance confers no gain (clearing danger memories also clears the fear that drives defensive behavior); (iii) beyond a critical threat intensity (3.0) no code strategy confers benefit—a measured capability boundary; (iv) external trigger coupling: a unit's code can read an external trigger state (cognition) and, when the external signal is present, deterministically clear its own threat memories while writing an externally observable trace—with the external signal absent, the same code is inert, demonstrating that perception is a necessary component of the response; (v) cognitive code is acquired, not inherited: newly born units without the code fragment cannot perceive the external state, making cognition an evolvable individual trait; and (vi) when defensive and adversarial code coexist, an arms race emerges from primitive operations alone. We also report an unexpected semantics of negative-valued code, its diagnosis, and its redesign as a candidate inhibitory mechanism. The architecture points toward self-modifying systems in which memory, behavior, perception, and robustness converge on a single executable substrate.

Yizhang Hu · 0 citations