Quant anomaly detector: score output pathologies without inventing bit-width certainty #59

Open
opened 2026-09-07 03:14:17 +00:00 by nsaspy · 0 comments
Owner

Goal

Detect behavior consistent with degraded/unstable serving precision while keeping the result explicitly heuristic.

Depends on #57 for ground-truth routing/quant metadata where available. Feed observations into the existing provenance/outcome plane (#15) as evidence only; an anomaly is not automatically a task failure.

Research-backed signals

Low-bit quantization can disproportionately increase execution/method errors in reasoning tasks, and extreme low-bit inference can produce repetitive loops, inflated reasoning traces and budget exhaustion. Provider variance also shows up strongly in tool-call correctness and structured output conformance.

Implement bounded deterministic detectors for:

  • invalid tool-call JSON;
  • tool name not present in requested tool set;
  • tool arguments that fail the supplied JSON schema;
  • malformed structured output / response-format violations;
  • repeated token/ngram or reasoning-loop pathology;
  • runaway reasoning/output length relative to model/task baseline;
  • invalid Unicode/control-character/encoding corruption;
  • repeated self-correction / explicit execution-error signals;
  • provider/API errors, retries and abnormal fallback churn;
  • optional canary drift against a known high-precision endpoint for statistically comparable prompts.

Scoring

Produce typed anomaly observations with detector ID/version, score/severity, exact evidence and thresholds. Do not output labels such as int4_detected from completion text alone. If #57 has endpoint metadata, report observed_quantization=...; otherwise say quantization=unknown and keep behavioral anomaly score separate.

Acceptance

  • deterministic fixtures for every detector;
  • malformed tool calls are reconstructed by tool-call index across SSE chunks before validation;
  • repetition detector ignores protocol/SSE framing repetition;
  • thresholds are configurable through llm-log init/config;
  • detector can run in observe-only mode with no request blocking;
  • alerts contain provider/model/event id and grounded quantization when available;
  • personal prompt/completion contents are not embedded in desktop notifications.
## Goal Detect behavior consistent with degraded/unstable serving precision while keeping the result explicitly heuristic. Depends on #57 for ground-truth routing/quant metadata where available. Feed observations into the existing provenance/outcome plane (#15) as evidence only; an anomaly is not automatically a task failure. ## Research-backed signals Low-bit quantization can disproportionately increase execution/method errors in reasoning tasks, and extreme low-bit inference can produce repetitive loops, inflated reasoning traces and budget exhaustion. Provider variance also shows up strongly in tool-call correctness and structured output conformance. Implement bounded deterministic detectors for: - invalid tool-call JSON; - tool name not present in requested tool set; - tool arguments that fail the supplied JSON schema; - malformed structured output / response-format violations; - repeated token/ngram or reasoning-loop pathology; - runaway reasoning/output length relative to model/task baseline; - invalid Unicode/control-character/encoding corruption; - repeated self-correction / explicit execution-error signals; - provider/API errors, retries and abnormal fallback churn; - optional canary drift against a known high-precision endpoint for statistically comparable prompts. ## Scoring Produce typed anomaly observations with detector ID/version, score/severity, exact evidence and thresholds. Do not output labels such as `int4_detected` from completion text alone. If #57 has endpoint metadata, report `observed_quantization=...`; otherwise say `quantization=unknown` and keep behavioral anomaly score separate. ## Acceptance - deterministic fixtures for every detector; - malformed tool calls are reconstructed by tool-call index across SSE chunks before validation; - repetition detector ignores protocol/SSE framing repetition; - thresholds are configurable through llm-log init/config; - detector can run in observe-only mode with no request blocking; - alerts contain provider/model/event id and grounded quantization when available; - personal prompt/completion contents are not embedded in desktop notifications.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/llm-log#59
No description provided.