Expand description
Codebook - Differential Encoding Base Model
The codebook serves as a learned/constructed basis set for differential encoding. Data is projected onto this basis, and only the residuals (what can’t be expressed by the codebook) plus semantic markers are stored in the engram.
§Architecture
Codebook = { basis_vectors: [B₀, B₁, ..., Bₙ], semantic_markers: [...] }
Encoding: data → coefficients × basis + residual + semantic_outliers
Decoding: coefficients × basis + residual + semantic_outliers → data§Note on Reconstruction
The codebook is required for data reconstruction:
- Without the codebook, reconstruction is not possible
- Different codebooks produce different representations
Note: This is not a security feature. The codebook is not encryption. Security features will be implemented separately in the future.
Structs§
- Balanced
Ternary Word - 64-bit balanced ternary encoding unit
- Basis
Vector - Basis vector in the codebook
- Codebook
- The Codebook - acts as the private key for reconstruction
- Codebook
Statistics - Statistics tracked by the codebook
- Codebook
Training Config - Configuration for codebook training
- Projection
Config - Configuration for codebook projection operations
- Projection
Result - Result of projecting data onto the codebook
- Semantic
Outlier - Semantic outlier detected during analysis
Enums§
- Word
Metadata - Metadata flags stored in the upper 3 bits