Skip to main content

Module codebook

Module codebook 

Source
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§

BalancedTernaryWord
64-bit balanced ternary encoding unit
BasisVector
Basis vector in the codebook
Codebook
The Codebook - acts as the private key for reconstruction
CodebookStatistics
Statistics tracked by the codebook
CodebookTrainingConfig
Configuration for codebook training
ProjectionConfig
Configuration for codebook projection operations
ProjectionResult
Result of projecting data onto the codebook
SemanticOutlier
Semantic outlier detected during analysis

Enums§

WordMetadata
Metadata flags stored in the upper 3 bits