# LispM LLM: Scale-Invariant Open-Vocabulary Command Routing and Poison-Resistant Continual Learning for Symbolic Agent Harnesses

- **Report Number**: RINGS-TR-2026-06
- **Publication Status**: Open-Access Institutional Technical Report / Preprint (RINGS-TR Series; non-proceedings)
- **Institution**: Research Institute for Network Geometry & Security (RINGS)
- **Author**: Ryan J. Kung (ORCID: https://orcid.org/0009-0000-3026-1111)
- **Published / Updated**: 2026-11-28 / 2026-11-28
- **Web Full-Text Reader**: https://rings.edu.rs/papers/lispm-llm/
- **Embedded PDF Reader**: https://rings.edu.rs/papers/lispm-llm/?view=pdf
- **Direct PDF**: https://rings.edu.rs/papers/lispm-llm.pdf (442 KB, 9 pages, SHA-256: `375b7e78750a4aedf1479b6b657a4e6a6783c3a08ceaa9042bc88ee3d189bd9d`)
- **Reproducible Code & Artifacts**: https://huggingface.co/ElderRyan/lispm-llm
- **LaTeX Source**: https://huggingface.co/ElderRyan/lispm-llm/blob/main/paper/lispm-llm.tex

## Abstract

Interactive symbolic environments such as GNU Emacs and Lisp Machine (LispM) agent harnesses expose hundreds of deterministic editor and application commands, yet routing natural-language instructions to those commands faces a sharp safety–flexibility dilemma. Frontier autoregressive language models synthesize arbitrary Lisp code at hundreds of milliseconds per call while introducing prompt-injection and eval-execution hazards; conversely, tiny closed-set intent classifiers guarantee sub-millisecond bounded dispatch without eval, but freeze their output layer to a fixed action vocabulary and remain static when users phrase commands idiosyncratically or load new packages. We present LispM LLM, a local Rust + LibTorch command-routing architecture that resolves both limitations within 264,322 parameters ( 1.0ms per request on two CPU threads, zero GPU required). First, we formalize an Open-Vocabulary Dual-Tower Bi-Encoder over a zero-eval typed ActionCatalog, proving that naive cosine bi-encoders suffer from reject-prototype domination on unseen open actions, and introducing a Scale-Invariant Semantic–Lexical Bilinear Decomposition in R^2d that simultaneously admits unseen actions zero-shot, rejects unmatched out-of-domain nouns, and blocks inverted/destructive verbs on matched nouns via a single cached matrix multiplication. Second, we introduce a Dual-Speed Poison-Resistant Continual Learning loop that forbids raw self-training: verified external supervision from behavioral user corrections and higher-tier teacher agents updates a sub-millisecond hippocampal episodic store (episodic.json) through a monotonic join-semilattice quarantine ledger (Consistent Obs Conflicted), enforces automatic PII literal scrubbing and held-out benchmark leakage blocking, and consolidates durable weights during editor idle periods behind non-regression gates and an online circuit breaker. Across frozen regression suites (2,542 supported and 243 unsupported cases), an independent 277-case blind evaluation, and 30 real isolated Emacs 31.1 state-execution tasks, the open bi-encoder achieves 30/30 (100%) real-task completion, 66/71 (93.0%) blind two-action composition accuracy, reduces supported wording errors from 6 to 2, and routes newly harvested lispm-kit and Emacs commands zero-shot under major-mode masking.

## Section Outline

## 1 Introduction
## 2 Typed Open-Action Basis and Zero-Eval Safety Boundary
## 3 Scale-Invariant Dual-Tower Bi-Encoder Architecture
### 3.1 Shared Word + Subword Transformer Backbone
### 3.2 Why Naive Bi-Encoders Fail on Zero-Shot Open Actions
### 3.3 Scale-Invariant Semantic–Lexical Bilinear Decomposition
### 3.4 Contrastive Pseudo-Word Training and Calibration
## 4 Dual-Speed Poison-Resistant Continual Learning
### 4.1 External-Oracle Supervision Only
### 4.2 Join-Semilattice Quarantine Algebra and Privacy Scrubbing
### 4.3 Dual-Speed Recall, Idle Consolidation, and Circuit Breaker
## 5 Native Systems Architecture
## 6 Empirical Evaluation
### 6.1 Frozen 48-Action Regression, Blind Generalization, and Real Emacs Execution
### 6.2 Zero-Shot Open-Action Routing, Mode Masking, and Scale-Invariance Ablation
## 7 Limitations and Conclusion
## References

## Citation (BibTeX)

```bibtex
@techreport{kung2026lispmllm,
  author      = {Ryan J. Kung},
  title       = {LispM LLM: Scale-Invariant Open-Vocabulary Command Routing and Poison-Resistant Continual Learning for Symbolic Agent Harnesses},
  institution = {Research Institute for Network Geometry & Security (RINGS)},
  year        = {2026},
  number      = {RINGS-TR-2026-06},
  note        = {Open-access institutional technical report, 9 pages},
  url         = {https://rings.edu.rs/papers/lispm-llm/}
}
```
