AIXC / docsProject documentation

Reference

Residual Coding Modes

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

AIXC separates prediction correctness from residual representation. The simplest residual is the literal unit, but a predictor distribution contains more information than a binary hit/miss flag. If the correct unit appears near the top of the ranked prediction list, the archive can store a rank or compact top-k code rather than a full literal.

ri=rank⁡p(⋅∣u<i)(ui)r_i = \operatorname{rank}_{p(\cdot\mid u_{<i})}(u_i)
Rank residual. A rank residual records where the true unit appeared in the deterministic predictor ordering.
ui∈TopK⁡(p(⋅∣u<i))⇒C(ri)≤⌈log⁡2k⌉u_i \in \operatorname{TopK}(p(\cdot\mid u_{<i})) \Rightarrow C(r_i) \le \lceil\log_2 k\rceil
Top-k admissibility. When the true unit appears in the top-k set, its residual can be bounded by the rank code width.

The format can still fall back to literal residuals. This fallback is essential because the archive must be exact even when the predictor is wrong in an unhelpful way. The residual mode therefore defines a total decode rule, not merely an optimization hint.

predict next unit
  |
  +-- exact top prediction -> decision hit, no residual
  |
  +-- true unit in top-k -> decision miss, rank residual
  |
  +-- otherwise -> decision miss, literal residual
Residual decision tree. Residual modes progressively exploit more predictor information while preserving a literal escape hatch.