mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-29 07:34:31 +00:00
65 lines
2.9 KiB
TeX
65 lines
2.9 KiB
TeX
% Kai: encoder, evidence adapters, decoder. Every box is in the code.
|
|
\begin{figure}[t]
|
|
\centering
|
|
\begin{tikzpicture}[
|
|
font=\footnotesize,
|
|
box/.style={draw, rounded corners=2pt, align=center, inner sep=3pt,
|
|
minimum height=1.6em, fill=white},
|
|
src/.style={fill=gray!8, minimum width=5.6em},
|
|
enc/.style={minimum width=6.8em},
|
|
arr/.style={-{Stealth[length=4pt]}, thin},
|
|
node distance=0.45em and 0.9em]
|
|
|
|
% evidence and its encoders
|
|
\node[box, src] (txt) {text, JSON};
|
|
\node[box, src, below=of txt] (sen) {sensor + metadata};
|
|
\node[box, src, below=of sen] (aud) {audio};
|
|
\node[box, src, below=of aud] (img) {image, video};
|
|
\node[box, enc, right=of txt] (etxt) {text encoder};
|
|
\node[box, enc, right=of sen] (esen) {sensor encoder};
|
|
\node[box, enc, right=of aud] (eaud) {Whisper + sensor};
|
|
\node[box, enc, right=of img] (eimg) {SigLIP, frozen};
|
|
\foreach \a/\b in {txt/etxt, sen/esen, aud/eaud, img/eimg} \draw[arr] (\a) -- (\b);
|
|
\node[box, fill=blue!6, minimum height=8.2em, text width=5.4em,
|
|
right=1.2em of $(esen.east)!0.5!(eaud.east)$] (H)
|
|
{evidence latents\\[3pt]\scriptsize encoded once\\\scriptsize per session};
|
|
\foreach \e in {etxt, esen, eaud, eimg} \draw[arr] (\e.east) -- (H.west |- \e);
|
|
|
|
% options
|
|
\node[box, src, below=1.4em of img] (opt) {options $c_1..c_K$};
|
|
\node[box, enc, right=of opt] (eopt) {option encoder};
|
|
\node[box, right=1.2em of eopt, text width=5.4em] (ret)
|
|
{retrieval\\\scriptsize top $k$ of $K$, mass $\rho$ kept};
|
|
\draw[arr] (opt) -- (eopt);
|
|
\draw[arr] (eopt) -- (ret);
|
|
|
|
% head
|
|
\node[box, fill=green!7, right=1.2em of H, text width=7.4em] (xa)
|
|
{cross-attention $\times 2$\\\scriptsize options attend\\\scriptsize to evidence};
|
|
\draw[arr] (H) -- (xa);
|
|
\draw[arr] (ret.east) -| (xa.south);
|
|
\node[box, right=0.9em of xa, text width=8.6em, align=left] (law)
|
|
{\op{choice}: softmax\\\op{noul}: $\sigma(s_{\top} - s_{\bot})$\\\op{score}: cumulative link};
|
|
\draw[arr] (xa) -- (law);
|
|
|
|
% refinement
|
|
\node[box, below=2.6em of law, text width=8.6em] (wave)
|
|
{waves by depth\\\scriptsize freeze at $\tau$\\\scriptsize parents as facts};
|
|
\node[box, below=0.9em of wave, text width=8.6em] (proj)
|
|
{projection onto rules\\\scriptsize exact $\arg\max_{z \models R}$};
|
|
\node[box, left=0.9em of proj, text width=7.4em] (sel)
|
|
{masked slots\\\scriptsize pairwise pass\\\scriptsize selector};
|
|
\draw[arr] (law) -- (wave);
|
|
\draw[arr] (wave) -- (proj);
|
|
\draw[arr] (sel) -- (proj);
|
|
\end{tikzpicture}
|
|
\caption{Kai: a text encoder, evidence adapters and a typed-variable decoder.
|
|
Evidence is encoded once per session; options are encoded alone, narrowed by
|
|
retrieval above $k$, and scored against the evidence by two cross-attention
|
|
blocks under the question type's law; a program's dependent questions are
|
|
decoded as masked slots, refined in waves by depth, and projected onto its
|
|
rules. Every box is in the code; the adapters train in stage B and the slot
|
|
decoder in stage C.}
|
|
\label{fig:kai}
|
|
\end{figure}
|