The Problem: Discriminant Blowup
Every data pipeline has a silent failure mode. Small errors at layer 3 become medium errors at layer 15. Medium errors become catastrophic errors by layer 30. By the time the output reaches the consumer, the signal-to-noise ratio is worse than random.
Mathematicians call this "discriminant blowup" — the phenomenon where perturbations in input parameters cause exponentially growing dispersion in output values. In the context of data pipelines, it means that a missing field in a source record can cause a completely wrong distress classification three steps later.
LLMs make this worse. When you ask an LLM to "enrich" a property record by looking up comparable sales, it doesn't have ground truth — it has a probability distribution. Sometimes it guesses right. Sometimes it fabricates a sale that never happened. The fabricated sale becomes "ground truth" for downstream pipeline stages, and the error compounds.
The Golod-Shafarevich Connection
Evgeny Golod and Igor Shafarevich proved a theorem in 1964 about infinite-dimensional algebras: under certain conditions on the number of generators relative to the number of relations, a group presentation defines an infinite group. The informal version: if you don't have enough constraints on your generators, the space of possible outputs blows up.
Our 63-layer DAG has the same structure. Each layer is a generator — a transformation that maps an input vector to an output vector. The "relations" are the type constraints that limit which outputs are valid. If we don't have enough type constraints relative to the number of layers, the output space blows up — small input variations produce wildly different outputs, and the pipeline becomes unreliable.
The Golod-Shafarevich bypass is our name for the solution: enforce rigid type constraints at every layer boundary, so that the number of "relations" (valid types) always exceeds the "generator growth rate" (dimensionality expansion across layers). When this condition holds, the output space is bounded — small input perturbations produce small output perturbations, and the pipeline is stable.
How We Implement It
In practice, this means every single output from every single layer is validated against a Pydantic model before it passes to the next layer. Not "most outputs." Not "outputs that look suspicious." Every output, every time.
A real example from our pipeline:
from pydantic import BaseModel, Field, field_validator
from typing import Optional
class DistressSignal(BaseModel):
property_id: str = Field(..., pattern=r'^KS-[A-Z]{2}-\d{10}$')
distress_score: float = Field(..., ge=0.0, le=1.0)
tax_delinquency_months: Optional[int] = Field(None, ge=0, le=120)
mortgage_status: str = Field(..., pattern=r'^(current|30d|60d|90d|foreclosure|reo|unknown)$')
last_verified: int = Field(..., description="Unix epoch seconds")
footprint: str = Field(..., pattern=r'^[0-9a-f]{64}$')
@field_validator('distress_score')
def validate_consistency(cls, v, info):
# Internal consistency check
if info.data.get('tax_delinquency_months', 0) == 0 and v > 0.8:
raise ValueError('High distress with zero tax delinquency')
return v
If any field fails validation, the entire record is discarded. Not patched. Not defaulted. Discarded. This is the Golod-Shafarevich condition: constraints are non-negotiable, and failure to meet them triggers immediate rejection, not silent degradation.
Why Discarding Is Better Than "Best Effort"
Most data vendors take the opposite approach: fill missing fields with defaults, coerce types silently, and emit everything. The result is a dataset where 30% of records are partially synthetic — imputed, defaulted, or coerced — and the consumer can't tell which 30%.
We'd rather deliver 700 verified records than 1,000 records where 300 are synthetic. Quality over quantity isn't a slogan — it's a mathematical requirement for downstream model performance. An AI model trained on 700 ground-truth records outperforms one trained on 1,000 mixed records every time.
The Result: Pipeline Stability
With Pydantic projection lattices at every layer boundary, our pipeline maintains:
- Type fidelity: No field is ever the wrong type
- Range fidelity: No value is ever outside its legal range
- Consistency fidelity: No record contains logically contradictory fields
- Provenance fidelity: Every record carries a cryptographic footprint of its pipeline state
The Broader Lesson
The Golod-Shafarevich bypass isn't just for our pipeline. Any system that processes data through multiple transformation layers — machine learning pipelines, ETL workflows, LLM enrichment chains — needs type enforcement at every boundary. The moment you allow unvalidated data to pass from one stage to the next, you've opened the door to discriminant blowup.
This is why structured data is the future of AI agent consumption. Agents can't detect hallucination in unstructured text. But they can verify a SHA-256 footprint and validate against a JSON Schema. Give them data they can mathematically trust, and they'll perform. Give them data with hidden error layers, and they'll fail — not because the model is bad, but because the data is wrong.
---
Kairos Signal: Data products with mathematical integrity guarantees. Pydantic-validated at every layer boundary. Cryptographic footprinting. Explore data products →



