AIXC / docsProject documentation

Reference

Reference Codec

Look up syntax, contracts, layouts, algorithms, and exact behavior.

The v0 loop is intentionally direct. The encoder writes the seed, asks the predictor for each next unit, writes a hit bit when the argmax matches, and writes a miss bit plus the actual unit otherwise. The decoder reads the same seed, runs the same predictor, and reconstructs the stream by choosing either the predictor output or the stored literal.

di=1[argmax⁡u p(u∣u<i)=ui]d_i = \mathbb{1}\left[\operatorname*{argmax}_u\,p(u \mid u_{<i}) = u_i\right]
Reference decision. Each coded position stores whether the deterministic top prediction matched the actual unit.

A crucial implementation detail is that both encoder and decoder feed the actual decoded unit back into the predictor state. They do not let an incorrect prediction become the next context item, so one miss cannot cascade into a permanently divergent decode.

u^i=di argmax⁡up(u∣u^<i)+(1−di) ri\hat{u}_i = d_i\,\operatorname*{argmax}_u p(u \mid \hat{u}_{<i}) + (1-d_i)\,r_i
Decoder reconstruction. A hit uses the predictor output; a miss consumes the next residual literal.