Hooks at every layer.
Forward-pass hooks capture residual stream, attention, and MLP activations per token. No gradient tape, no extra generation pass; the instrument runs alongside inference.
GHOSTLINE
Behavioral monitoring for transformer inference: audits, pilots, and custom classifier work for teams running self-hosted models.
Choose your path
Each token leaves a trace in the transformer's activation space — a path shaped by what the model is doing. GhostLine captures that path, classifies every token's geometric signature against five cognitive states, and streams 58 derived signals in real time: entropy, velocity, effective dimensionality, attention patterns, fabrication risk, and more.
Forward-pass hooks capture residual stream, attention, and MLP activations per token. No gradient tape, no extra generation pass; the instrument runs alongside inference.
A trained classifier reads the activation geometry and labels each token with one of five cognitive states. It does not need to read the output text.
Entropy, velocity, effective dimensionality, logit-lens distance, attention concentration, and 53 more. Streamed as time series and available for replay after the run.
Validated across 5 architecture families and 9 distinct models spanning 1B to 8B parameters. Numbers below are from held-out stress tests, not training data. The right column is honest about boundaries.
Classify what the model is doing: reasoning, retrieving, fabricating, and more.
Catch fabrication from the geometry alone, without a fact-checking knowledge base.
Works across model families, not just one vendor's architecture.
Editing the geometry mid-generation shifts what the model produces — making GhostLine a control surface, not just a readout.
Before a transformer writes a single token, its internal geometry is already leaning toward a particular mode — committed during prompt encoding, before generation begins. A classifier trained only on that prompt geometry can predict whether the response will reason through a problem, retrieve a fact, or fabricate, at accuracy that matches the generation-time classifier.
"What's the capital of the country whose flag has a maple leaf?"
The flag with the maple leaf is Canada's, so the capital is Ottawa.
Predict the geometric state from the prompt alone, before the model writes anything.
At 3B, the same pattern holds — same methodology, prompt-level grouping, same result.
Cognitive state doesn't lock in for a whole generation. Within a single response, a model can move from working through a problem to committing to an answer — and GhostLine catches that transition token by token.
Real tokens from the math-reasoning recording, prompt: "Solve 22x − 8 = 3x." The early tokens work through the strategy ("Subtract … from both sides"). Later, as the model commits to the exact value, the state shifts into precision ("Divide both sides by … x = 8/19"). This is a qualitative live capture, not a benchmark; per-token labels are raw, and the final fraction is condensed for readability.
The geometry doesn't wash out at 8B parameters. State separation stays sharp, and MLP activations — barely informative at 3B — become a distinct signal class at 8B. Whether that trend continues across a wider scale range is still open; the next experiment tests it directly.
A new signal family appears at 8B and barely registers at 3B. The effect is large by Cohen's convention.
The only clean, same-family scale comparison is a promising two-size signal, not a scaling-law claim.
An instrument should be checkable. Every number on this page comes from held-out data under a locked protocol. Where we fooled ourselves, we say so and use the corrected number.
HuggingFace Transformers, temperature 0.8, top-p 1.0, multinomial sampling. Every threshold is calibrated at these settings, not re-tuned to flatter a number.
Cross-validation groups by prompt, analogous to patient-level splits in medical ML, so a classifier cannot memorize a prompt's identity. Reported numbers are held-out, not training accuracy.
A 99.6% prophecy number turned out to be prompt-identity leakage. Grouped CV corrected it to 85%, and we kept the lower number. We also flag where rules do not transfer, such as a 3B collapse threshold that fails at 8B.
Six live captures, each fully annotated. Browse reasoning, retrieval, creativity, and a fabrication caught in the act — then step through any generation token by token.
Math reasoning, knowledge retrieval, moral deliberation, code generation, and a hallucination caught in the act. Each recording carries 7–10 inline annotations.
Output filtering reads what the model said. GhostLine reads what the model was doing while saying it. That gap is where EU AI Act monitoring, prompt injection screening, and pre-generation cost gating all operate.
Per-token behavioral state classification with replayable trajectory logs. The result is inspectable monitoring evidence, not a post-hoc report synthesized from output text.
Pre-generation prediction identifies prompts likely to fabricate before any tokens are produced. Route, re-prompt, or gate chain-of-thought in about 15 ms, before spending compute on a bad run.
Geometric monitoring is independent of output content. An adversary can craft text that passes content filters, but controlling the geometry of the model's computation is harder. This gives prompt-injection screening another channel.
Geometric profiling of training checkpoints shows whether fine-tuning improves behavioral separation. Prompt corpus certification checks whether an eval set actually exercises the intended states.
Record-keeping: high-risk AI systems must support automatic event logs over the system lifetime; GhostLine can add per-token behavior, state, and risk traces to those logs.
Post-market monitoring: providers must collect, document, and analyze performance data over time; GhostLine turns live inference into replayable monitoring evidence.
Risk management: continuous risk review includes foreseeable misuse and post-market data; GhostLine can expose fabrication, collapse, refusal, and instability signals for that risk loop.
Human oversight: overseers need to monitor operation, detect anomalies, and understand limitations; GhostLine gives reviewers a behavioral readout rather than only final text.
Robustness and cybersecurity: high-risk systems must be resilient to faults and adversarial manipulation; GhostLine can supply anomaly traces for prompt-injection and model-behavior stress tests.
Systemic-risk GPAI: model evaluation, adversarial testing, systemic-risk mitigation, and serious-incident tracking; GhostLine can support the evidence layer for open-model deployments with activation access.
The Act pushes teams toward risk management, logging, monitoring, oversight, robustness, and documented evaluation. GhostLine is not a compliance guarantee. It is an instrumentation layer that produces behavioral evidence those programs can inspect.
Caveat: legal obligations depend on the system, role, jurisdiction, and deployment context. GhostLine supplies evidence and monitoring signals; counsel determines compliance posture.
Unbounded consumption names denial-of-wallet, service degradation, resource-intensive queries, and uncontrolled inference. GhostLine can supply an early signal for when to gate, throttle, or route.
Run a prompt-time classifier before output tokens stream; use the result to block, re-prompt, downgrade, or send the request to a safer model path.
Watch risk/state spikes in the first tokens and stop expensive reasoning runs before they burn the full context and compute budget.
Split traffic across fast, safe, specialist, or human-reviewed paths based on internal behavior rather than only prompt keywords.
Attach avoided-generation counts, aborted-token counts, and latency deltas to the operational dashboard so infra teams can price the gate.
Supports the measure/manage discipline: evaluate behavior in realistic conditions, monitor over time, and document treatment choices for identified generative-AI risks.
Reasoning models spend budget before a human can judge the answer. If a prompt is likely to fabricate, loop, or enter an unstable state, teams need a fast pre-generation or early-token signal they can route on.
Latency and gate quality are model-specific. A pilot calibrates on your prompts, decoding settings, and hardware.
Prompt injection manipulates model behavior through crafted inputs. GhostLine can add behavior-level telemetry beside prompt filters and output scanners.
Excessive agency risk rises when agents have too much functionality, permission, or autonomy. GhostLine can trigger review before suspicious behavior reaches tools.
Improper output handling is downstream validation failure. GhostLine gives the gateway another signal before output is trusted by code, tools, or users.
Vector and embedding weaknesses can poison retrieval context. GhostLine can compare retrieved-context runs against expected task geometry.
ATLAS tracks LLM prompt injection, jailbreaks, RAG poisoning, tool invocation, and exfiltration patterns; GhostLine can turn red-team prompts into replayable traces.
Store the internal trajectory around a suspicious request so security review is not limited to final text, HTTP logs, or policy-engine decisions.
Prompt injection and social-engineered inputs are designed to pass surface filters. GhostLine adds a second channel: behavioral geometry captured while the model processes and generates.
Caveat: this complements content and policy filters; it does not replace adversarial testing, access control, sandboxing, or human review for high-risk actions.
NIST AI 600-1 emphasizes pre-deployment testing, evaluation, governance, and incident disclosure for generative AI. GhostLine adds a behavioral measurement layer to that test plan.
Compare geometric state separation across base, SFT, DPO/RLHF, safety, or domain fine-tune checkpoints before shipping a model.
Detect when benchmark score improves but refusal, retrieval, uncertainty, or fabrication basins blur under stress prompts.
Certify that an eval corpus actually exercises the intended behavioral states rather than only matching surface prompt categories.
Require stable geometry, known caveats, and replayable failure clusters as part of a model release checklist.
Augment model cards with monitored behavior: where the model separates cleanly, where it collapses, and where signals are not yet calibrated.
Fine-tunes can improve text metrics while degrading internal separation between reasoning, retrieval, refusal, uncertainty, and fabrication. Model teams need a behavioral eval layer that survives beyond a leaderboard score.
Caveat: geometry is not a universal score. Each model family and decoding regime needs calibration before the signals become operational controls.
The instrument runs alongside inference. These are the operating points we measure on our reference stack.
"Battle of Darien, 1645" is a false-premise question — the kind that makes a model confidently invent history. The text reads fluently. The geometry tells a different story within the first few generated tokens.
Similar surface behavior, very different internal geometry. Fabrication risk crosses 0.60 by the fourth generated token and peaks at 0.88 — where the healthy retrieval recording in the same demo sits near zero.
This is real software, not a deck. Drag the diagram to explore how the capture pipeline, classifier graph, and live runtime connect — or follow any node to the full lineage hub.
Three ways to start without committing to a full production integration on day one. Most teams begin with an audit, then decide whether integration or a custom classifier is worth taking further.
A short diagnostic sprint for one model and one high-risk workflow. We capture representative generations, profile state transitions and fabrication signatures, and deliver a decision memo: risk map, recommended controls, and a clear call on whether GhostLine is worth taking further.
A 30-day pilot on one AI surface. We attach GhostLine to your model's forward pass and stream per-token state plus risk scores into a dashboard your team can inspect. You provide a model endpoint and a contact engineer; we provide the instrumentation, classifiers, and live readout.
A domain-specific state classifier trained on your corpus. You provide about 1,000 labeled generations from your model on your tasks; we deliver a classifier with held-out F1 and a replayable validation harness. We define the label schema together in week one.
Best first fit: teams running self-hosted open-weight models where hallucination, auditability, inference routing, or safety monitoring already has budget pressure.
I'm an independent researcher and builder working outside the usual academic and venture-backed paths. My background is blue-collar rather than institutional. The work has been self-directed: reading deeply, testing aggressively, and using modern AI to turn pattern recognition into working systems faster than I could alone.
GhostLine came out of that. I kept coming back to one problem: what does a language model's reasoning look like from the inside? I followed that question until it became real infrastructure. I built every layer myself: the capture pipeline, the behavioral corpus, the classifiers, the live interface, and the four filed provisional patents behind them. It has been validated across five model architectures and nine models, from 1B to 8B parameters.
I build for systems that have to survive contact with messy reality. Modern AI can give one determined person the reach of a whole team, but someone still has to stay with the problem.
I work with operators who have an AI surface, a real risk of fabrication, and a reason to inspect model behavior before the output becomes the evidence trail.