How Aldous scores language

Aldous is Foreshock's semantic engine. It never reads or reasons about your text — it embeds language into vectors once, and everything after that is ordinary geometry on numbers. This page is the math for people who want it.

No reasoning, only distance

Aldous is a zero-shot semantic telemetry and guardrail engine built on DECE — Diagonal Emotional Covariance Estimation. An embedding model (Nomic Text 1.5 by default, 768 dimensions, Apache-2 licensed) converts a specimen to a vector exactly once. Every score that comes back afterward is a similarity or distance float between that vector and a reference concept — never a judgment about what the text means.

// Why this matters

No string matching, no LLM in the scoring path. A concept is defined by example phrases, not keywords, so paraphrases, typos, and novel wording still get caught — and nothing here can hallucinate.

A concept is a distribution, not a point

DECE defines a concept — "anger," "hedging," a Trust & Safety shunt — with a small population of diverse, representative phrases. Each phrase is embedded independently, which gives the compiler two things: the geometric centroid (the mean of the phrase vectors) and the per-dimension variance of that population (Bessel-corrected, so a terse concept with few examples doesn't collapse to an unstable spike).

Keeping only the diagonal of the covariance matrix means each dimension gets its own spread — a concept occupies an elliptical region of meaning, not a sphere. That's the "diagonal" in DECE.

A hard variance floor stops any one dimension from collapsing toward zero and dominating a comparison. The result is a standardized distance — a diagonal approximation of Mahalanobis distance — computed in constant time per concept, with no guessing and no keyword overlap involved anywhere.

Three complementary measures come back for every comparison:

  • Standardized (Mahalanobis-style) distance — how far the specimen sits from the concept's centroid, scaled by that concept's own variance.
  • Cosine similarity — direction alignment, independent of magnitude.
  • Dot product — raw alignment, useful when magnitude itself is informative.

The three sensor families

Not every concept behaves the same way, so Aldous ships three sensor shapes:

  • Graduated valence sensors. The bulk of the spectrum — 70+ inflection points across dimensions like anger, joy, fear, hedging, tension. Each is backed by three centroids (base / + / ++ intensity), so "Frustration," "Personal Grievance," and "Collective Outrage" are all the same underlying concept read at three strengths, not three unrelated labels.
  • Signed affection & intent indexes. When a concept has genuine antonyms across an intensity gradient, Aldous builds a signed index instead: outlook runs catastrophic ↔ excellent, action runs chilling-effect ↔ radicalized. These are reported as a magnitude and a sign, so "a call for calm" and "a call to action" don't collapse into the same number.
  • Pragmatic saturation scalars. Meta-concepts like sarcasm, gratitude, human sycophancy, and reactionary/coercive framing are compressed to a single dynamic-magnitude dimension, and they're additive, not a discount on the rest of the spectrum. A sarcastic complaint doesn't get scored as less angry for being sarcastic — it's scored as angry, and separately as sarcastic.

The Kneedle: where signal ends and noise begins

A specimen's raw spectrum is a long list of scores, sorted high to low. Most of that list is floor — dimensions the text doesn't meaningfully touch. The Kneedle finds the knee in that descending curve: the point past which additional dimensions stop being signal and start being noise.

kneedle([90, 80, 10, 5, 3, 2, 1]) // -> 2 : the first two scores are signal
kneedle([50, 50, 50])             // -> 0 : flat curve, nothing significant
kneedle([])                       // -> 0

A flat curve has no knee — Aldous reports that as "nothing significant" rather than forcing a cut. Signed indexes are Kneedle-immune by design: their whole value is the direction and magnitude of a specific axis, so they're never truncated away as noise. Pragmatic scalars work the other way — they carry no minimum-viable signal below roughly 20% saturation, so they're read as always-noise below that floor regardless of where the knee falls.

Where to go next

This is the model. Shunts & Latent Concept Erasure covers the Trust & Safety layer built on top of it — how a community defines what it watches for, and how Aldous can subtract a flagged concept out of a specimen to see what's left.