Files
papers/kai/sections/01-introduction.tex
zeekay aff739a295
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
ci / papers (push) Failing after 27s
Hanzo CI/CD / test-amd64 (push) Successful in 1m12s
Build LaTeX Papers / build-pdfs (push) Failing after 32s
Hanzo CI/CD / cicd (push) Successful in 1m43s
CI/CD / cicd (push) Successful in 3m0s
Kai: stage a6 on the frozen harness, what it wins and loses and why, the score-head probe and its fix, the sibling rows for a5 and a6, and what a6 leaves open.
Claude-Session: https://claude.ai/code/session_018Gt5TvrE2rxXuZikWSauv3
2026-09-27 20:30:01 -07:00

78 lines
4.5 KiB
TeX

\section{Introduction}
\label{sec:intro}
Agents ask the same small questions thousands of times per session: which
context the next turn sees, which tool fits, whether a command may
run~\cite{jevnote}. A generative model answers in prose with no probability to
threshold; a fixed rule sees only what its author foresaw. A \emph{typed
decision} sits between: the caller states a question, lists the admissible
answers and passes the evidence, and the model returns a distribution over
exactly those answers, which can be type-checked, thresholded, logged and
replayed.
Three planes: the \emph{generative} writes (Zen), the \emph{decision} answers
typed questions over evidence (Kai), and the \emph{policy} is deterministic,
written by people, and final. A decision is a program, not a prompt
(Figure~\ref{fig:program}): Zen reasons inside it, Kai judges, code and solvers
compute, policy and people hold authority, and each run leaves a package.
\input{figures/program}
Two decision models exist to compare against, and both are baselines, never
Kai revisions. Laya~\cite{laya} is a family of open encoder checkpoints that
pack the question, every option and the state into one sequence; TypeSafe's
Jev~\cite{typesafejev} is a hosted model behind OpenRouter's Decisions
API~\cite{openrouterdecisions}. Status tags: \meas{} run by us, with the kept
artifact named; \reported{} published by others; \shipped{} on the main branch
of \texttt{hanzoai/decision} at the revision on the title page; \proposed{}
designed, not built.
\paragraph{Contributions.}
\begin{enumerate}[leftmargin=1.5em]
\item \textbf{One model}: an evidence record for any modality with its
sensor metadata, adapters into one encoder's width, and evidence, questions
and options each encoded once per session; one checkpoint line trained in
stages
(Section~\ref{sec:model}).
\item \textbf{Factorized choice}: options encoded alone and scored against
shared evidence by two cross-attention blocks, a law per type, and
retrieval that keeps the mass it cuts, so option count, order and question
count are not bounded by one sequence (Section~\ref{sec:factor}).
\item \textbf{Typed-variable diffusion}: a program's questions as masked
slots decoded jointly over the program graph, refined in waves bounded by
its depth and projected exactly onto its rules (Section~\ref{sec:diffusion}).
\item \textbf{A training system} in pure Rust: local SGD with an outer
Nesterov step across Metal, CUDA and ROCm machines, bf16 deltas with error
feedback, bit-identical resume, token-budgeted batches under a memory
floor, license classes and a contamination barrier
(Section~\ref{sec:training}).
\item \textbf{What went wrong}: stage A's encoder stopped relating two texts;
the measurements, the ablations that locate the cause, and the fix; how
much of the typed-decisions test set Laya's checkpoint had seen in near
form, and that it did not help it; and a score head that lost thirty
points to a softmax over level texts on the same encoder and data
(Section~\ref{sec:findings}).
\item \textbf{Policy precedence} as a lattice join, with a proof that
enforcing a model only adds friction, and \textbf{programs and packages}
that replay, diff, refresh and say what flips a decision, with SysML~v2
import and an engineering knowledge graph
(Sections~\ref{sec:authority} and~\ref{sec:programs}).
\item \textbf{Benchmarks} of accuracy on a frozen harness, of capabilities
the baselines lack by construction, and of speed, each table written by
the command that measures it (Section~\ref{sec:evaluation}).
\end{enumerate}
\paragraph{What is claimed.}
The baselines' structural limits are measured: Laya rejects every question of
1{,}000 or more options and Jev every question over 255; answering five
dependent questions independently, Laya breaks one of the program's rules in
64\% of states and Jev in 25\%; reordering 16 options changes Laya's top
answer on 25.5\% of questions \meas{} (\texttt{hanzoai/benchmarks}
\texttt{4e57fb2}). The final checkpoint's numbers enter only through the
tables of Section~\ref{sec:evaluation}; no sentence states them, and the first stage-A run's numbers appear
only where Section~\ref{sec:findings} explains what went wrong. Kai trains on the
train splits of the harness's sources behind a barrier against its test
states, so a lead on a suite whose baseline never saw its source is
in-distribution for Kai, and Section~\ref{sec:limits} says what that does not
show.