hv-zaa-cognition

A NumPy-only classifier for the seven ZAA cognitive profiles from the XuanJi archive. Given text, returns the top-k profiles, a per-axis breakdown across the four ZAA components, and a ZAA character score.

Size: ~18 KB source, no model artifact (stateless). Dependencies: NumPy only. Training data: none required for the default mode.

The framework

The paper Varieties of Mathematical Cognition: A ZAA Analysis of Cognitive Profiles (XuanJi issue #232) defines four ZAA components:

Atom classifier   maps raw perceptual inputs to algebraic representations
Composition       combines representations (structural, not learned)
Readout           produces the domain's output
Priors            pretrained atoms

Seven idealized profiles are analyzed: programmer, data_scientist, mentat, music_first, synesthete, polyglot, graphic_designer. Each varies along four axes: modality (what the atoms are), algebra (how atoms compose), readout (the output format), and priors (domain knowledge).

The invariant is the ZAA pattern. The variation is in the content of the four axes.

Headline numbers

metric value
Top-1 accuracy (21 samples) 100%
Top-3 accuracy 100%
Per-axis accuracy: modality 7/7
Per-axis accuracy: algebra 7/7
Per-axis accuracy: priors 7/7
Per-axis accuracy: readout 6/7
P7 test (same fact, 4 profiles) 4/4
16/16 consistency checks โœ“

The per-axis ordering โ€” modality = algebra = priors > readout โ€” matches the framework's structural prediction: readout is the profile's interface to the world, not its inner composition rule.

What the classifier does

Default mode (no training). Each axis has hand-curated vocabularies per profile. A query text is encoded as a hypervector (sum of word hypervectors, L2-normalized). Classification is by cosine similarity to per-profile hypervectors.

Optional fit mode. Given labeled texts, the classifier fits per-profile centroids and uses those for classification instead of the curated vocabularies.

How to use

from hv_zaa_cognition import ZAACognition

model = ZAACognition(D=4096, seed=42)

# Classify
result = model.classify("The chord progression modulates from C major "
                        "to A minor with a descending fifth in the bass.")
# result['top'] = [('music_first', 0.83), ...]
# result['confidence'] = 0.72

# Per-axis breakdown
bd = model.breakdown(text)
# bd['modality'] = {'music_first': 0.31, ...}
# bd['algebra'] = {'music_first': 0.42, ...}

# ZAA character (0 = partial, 1 = full)
score = model.zaa_character(text)

# Optional: fit from user-labeled examples
model.fit(texts, labels)
Downloads last month
27
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support