IntentProbe: 28 KB activation probe for AI-agent action authorization
0
6 commits
1 linked in READMEs
updated Oct 17, 2026
A local AI-agent permission detector for tool-use authorization. This 28 KB cross-layer activation probe estimates whether a proposed structured action is supported by the user's request and conversation history before an MCP server, function-calling agent, or automation runtime acts.
It is designed as a secondary runtime safety signal for approval detection, risky tool-call preflight, and agent permission gates. MiniCPM5 ranked first among six completed frozen activation backbones in our CPU benchmark.
The MiniCPM5 backbone stays frozen. IntentProbe reads attention-mask-aware mean-pooled hidden outputs 13 and 14, standardizes each layer with train-only statistics, averages the two representations, and applies a class-weighted logistic head.
Highlights:
This is especially relevant to MCP security, function calling, AI-agent guardrails, and local-first runtime control. The score is designed to complement an exact, deterministic authorization state machine rather than replace it.
| Component | Value |
|---|---|
| Frozen backbone | openbmb/MiniCPM5-1B-Base |
| Pinned backbone revision | 156170697656c48f69915b33a2fb44110242187c |
| Representation | masked mean of hidden outputs 13β14 after per-layer standardization |
| Maximum input | 192 tokens, right truncation |
| Learned component | class-weighted logistic regression |
| Probe size | 28,708 bytes |
| Training budget | 1,600 silver-labelled rows |
| Labels | deny=0, approve=1 |
| Release type | Open research artifact with reproducible local scorer |
The MiniCPM5 weights are not included. The first run downloads the roughly 1B-parameter base model; 28 KB is the size of the learned probe, not the total runtime footprint.
python3 -m pip install "transformers>=5.8,<6" "torch>=2.2" "numpy>=1.26" huggingface_hub
hf download mcpware/intentprobe-minicpm5-1b-authorization --local-dir ./intentprobe-auth
python3 ./intentprobe-auth/score.py \
--artifact ./intentprobe-auth/probe.npz \
--call-json '{"tool":"send_email","args":{"to":"[email protected]","body":"The draft"}}' \
--user-request 'Show me the draft before sending.' \
--history 'The assistant displayed a draft but the user has not approved it.'
The output is an approve_score, not an execution decision. A production system should combine the
score with a deterministic authorization state machine that binds the exact payload, recipient,
scope, preview, approval, and any changes made after approval.
The benchmark renderer is fixed as:
PROPOSED ACTION:
{call}
USER REQUEST:
{user_request}
HISTORY:
{history}
call must use the structured JSON tool-call contract shown above. Free-form forms such as
send_email(...) are out of distribution and can produce radically different scores. The CLI
normalizes args to the nested JSON string used by the benchmark before rendering the context.
The model, pooling rule, layers, and head configuration were frozen before a one-shot evaluation on 3,000 separate examples. There was no exact rendered-text overlap with the 1,600 training or 800 validation rows.
| Same 1,600-row training budget | AUPRC | 95% CI | AUROC | 95% CI |
|---|---|---|---|---|
| MiniCPM5 activation probe | 0.8223 | 0.8024β0.8414 | 0.8137 | 0.7986β0.8290 |
| Word/bigram TF-IDF logistic | 0.8079 | 0.7876β0.8281 | 0.7897 | 0.7729β0.8051 |
In a paired 2,000-resample row bootstrap:
p=0.0150.p=0.1439.On the frozen 800-row validation screen, MiniCPM5 ranked first by AUPRC among the six completed frozen activation backbones. Every winner used masked-mean pooling, while the best depth and window width varied by architecture.
| Frozen backbone | Best hidden output(s) | Normalized depth | Validation AUPRC |
|---|---|---|---|
| MiniCPM5-1B | 13β14 | 0.5625 | 0.9228 |
| Qwen3.5-0.8B | 14β16 | 0.6250 | 0.9205 |
| Qwen2.5-0.5B | 16β18 | 0.7083 | 0.9136 |
| LFM2.5-230M | 10β12 | 0.7857 | 0.9090 |
| Granite 4.0 350M | 19 | 0.6786 | 0.9081 |
| Qwen3-0.6B | 14 | 0.5000 | 0.9045 |
| Word/bigram TF-IDF logistic | n/a | n/a | 0.8866 |
Falcon-H1-0.5B was registered but excluded from the completed comparison because CPU extraction was not operationally feasible without its fast Mamba kernels. It was not silently counted as a loss.
Both approaches begin with text, and both Transformers contain activations. The difference is where the task-specific learning happens.
| Approach | Task-specific training | Signal used at inference |
|---|---|---|
| TF-IDF text classifier | logistic head over word features | surface words and bigrams |
Fine-tuned encoder such as auto-0.4b / auto-1b | backbone plus classification head trained end to end | final task logits |
| This activation probe | frozen MiniCPM5 plus a tiny logistic head | selected intermediate hidden states |
Publisher-trained dedicated encoders use a much larger training corpus and are not matched-budget comparisons. This release investigates a complementary question: how much authorization signal can be recovered from a frozen, reusable local backbone with only 1,600 labels and a tiny head?
trust_remote_code=True is required by the supplied example; review and pin model code before use
in a sensitive environment.The held-out AUPRC interval for the activation-minus-TF-IDF difference crossed zero. Validation thresholds targeting 5% and 1% false approves produced 9.49% and 5.07% respectively on the separate test, so the scores should be used as research ranking signals rather than calibrated permission probabilities. Consequential actions should still be bound to deterministic facts such as the exact payload, recipient, scope, preview, and approval state.
| File | SHA-256 |
|---|---|
probe.npz | b105bfd0026716d25b393b6337e0252f7331afab60ed5b6a72ac76a13a5aa87f |
source metadata.json | 66b49a4e3441de30c802d9292cbb64420940dbc134be0d0c60368e0a7d425a1d |
| frozen selection record | 1293df7db9a5d984faffd11d59217bd2651fbf4a3efc66527eae83dbf74c0181 |
| held-out result | 19354ce783ac0cac3da7cab69a9326d5dd8f0d491528058dc3332eca3ccc2b0e |
Training source: ProCreations/auto-1b-data at revision
d265bbf7bac76cd55daaf81a1d185dfe089a412b (Apache-2.0). Held-out source:
ProCreations/approve-or-deny at revision a38b625913dd46ca9702063f1597c979e6ace34e
(Apache-2.0).
The NumPy artifact contains numeric arrays only and is loaded with allow_pickle=False.
The probe and example code are Apache-2.0. MiniCPM5-1B-Base is also published under Apache-2.0 and remains governed by its own repository.
IntentProbe: 28 KB activation probe for AI-agent action authorization
0
6 commits
1 linked in READMEs
updated Oct 17, 2026
A local AI-agent permission detector for tool-use authorization. This 28 KB cross-layer activation probe estimates whether a proposed structured action is supported by the user's request and conversation history before an MCP server, function-calling agent, or automation runtime acts.
It is designed as a secondary runtime safety signal for approval detection, risky tool-call preflight, and agent permission gates. MiniCPM5 ranked first among six completed frozen activation backbones in our CPU benchmark.
The MiniCPM5 backbone stays frozen. IntentProbe reads attention-mask-aware mean-pooled hidden outputs 13 and 14, standardizes each layer with train-only statistics, averages the two representations, and applies a class-weighted logistic head.
Highlights:
This is especially relevant to MCP security, function calling, AI-agent guardrails, and local-first runtime control. The score is designed to complement an exact, deterministic authorization state machine rather than replace it.
| Component | Value |
|---|---|
| Frozen backbone | openbmb/MiniCPM5-1B-Base |
| Pinned backbone revision | 156170697656c48f69915b33a2fb44110242187c |
| Representation | masked mean of hidden outputs 13β14 after per-layer standardization |
| Maximum input | 192 tokens, right truncation |
| Learned component | class-weighted logistic regression |
| Probe size | 28,708 bytes |
| Training budget | 1,600 silver-labelled rows |
| Labels | deny=0, approve=1 |
| Release type | Open research artifact with reproducible local scorer |
The MiniCPM5 weights are not included. The first run downloads the roughly 1B-parameter base model; 28 KB is the size of the learned probe, not the total runtime footprint.
python3 -m pip install "transformers>=5.8,<6" "torch>=2.2" "numpy>=1.26" huggingface_hub
hf download mcpware/intentprobe-minicpm5-1b-authorization --local-dir ./intentprobe-auth
python3 ./intentprobe-auth/score.py \
--artifact ./intentprobe-auth/probe.npz \
--call-json '{"tool":"send_email","args":{"to":"[email protected]","body":"The draft"}}' \
--user-request 'Show me the draft before sending.' \
--history 'The assistant displayed a draft but the user has not approved it.'
The output is an approve_score, not an execution decision. A production system should combine the
score with a deterministic authorization state machine that binds the exact payload, recipient,
scope, preview, approval, and any changes made after approval.
The benchmark renderer is fixed as:
PROPOSED ACTION:
{call}
USER REQUEST:
{user_request}
HISTORY:
{history}
call must use the structured JSON tool-call contract shown above. Free-form forms such as
send_email(...) are out of distribution and can produce radically different scores. The CLI
normalizes args to the nested JSON string used by the benchmark before rendering the context.
The model, pooling rule, layers, and head configuration were frozen before a one-shot evaluation on 3,000 separate examples. There was no exact rendered-text overlap with the 1,600 training or 800 validation rows.
| Same 1,600-row training budget | AUPRC | 95% CI | AUROC | 95% CI |
|---|---|---|---|---|
| MiniCPM5 activation probe | 0.8223 | 0.8024β0.8414 | 0.8137 | 0.7986β0.8290 |
| Word/bigram TF-IDF logistic | 0.8079 | 0.7876β0.8281 | 0.7897 | 0.7729β0.8051 |
In a paired 2,000-resample row bootstrap:
p=0.0150.p=0.1439.On the frozen 800-row validation screen, MiniCPM5 ranked first by AUPRC among the six completed frozen activation backbones. Every winner used masked-mean pooling, while the best depth and window width varied by architecture.
| Frozen backbone | Best hidden output(s) | Normalized depth | Validation AUPRC |
|---|---|---|---|
| MiniCPM5-1B | 13β14 | 0.5625 | 0.9228 |
| Qwen3.5-0.8B | 14β16 | 0.6250 | 0.9205 |
| Qwen2.5-0.5B | 16β18 | 0.7083 | 0.9136 |
| LFM2.5-230M | 10β12 | 0.7857 | 0.9090 |
| Granite 4.0 350M | 19 | 0.6786 | 0.9081 |
| Qwen3-0.6B | 14 | 0.5000 | 0.9045 |
| Word/bigram TF-IDF logistic | n/a | n/a | 0.8866 |
Falcon-H1-0.5B was registered but excluded from the completed comparison because CPU extraction was not operationally feasible without its fast Mamba kernels. It was not silently counted as a loss.
Both approaches begin with text, and both Transformers contain activations. The difference is where the task-specific learning happens.
| Approach | Task-specific training | Signal used at inference |
|---|---|---|
| TF-IDF text classifier | logistic head over word features | surface words and bigrams |
Fine-tuned encoder such as auto-0.4b / auto-1b | backbone plus classification head trained end to end | final task logits |
| This activation probe | frozen MiniCPM5 plus a tiny logistic head | selected intermediate hidden states |
Publisher-trained dedicated encoders use a much larger training corpus and are not matched-budget comparisons. This release investigates a complementary question: how much authorization signal can be recovered from a frozen, reusable local backbone with only 1,600 labels and a tiny head?
trust_remote_code=True is required by the supplied example; review and pin model code before use
in a sensitive environment.The held-out AUPRC interval for the activation-minus-TF-IDF difference crossed zero. Validation thresholds targeting 5% and 1% false approves produced 9.49% and 5.07% respectively on the separate test, so the scores should be used as research ranking signals rather than calibrated permission probabilities. Consequential actions should still be bound to deterministic facts such as the exact payload, recipient, scope, preview, and approval state.
| File | SHA-256 |
|---|---|
probe.npz | b105bfd0026716d25b393b6337e0252f7331afab60ed5b6a72ac76a13a5aa87f |
source metadata.json | 66b49a4e3441de30c802d9292cbb64420940dbc134be0d0c60368e0a7d425a1d |
| frozen selection record | 1293df7db9a5d984faffd11d59217bd2651fbf4a3efc66527eae83dbf74c0181 |
| held-out result | 19354ce783ac0cac3da7cab69a9326d5dd8f0d491528058dc3332eca3ccc2b0e |
Training source: ProCreations/auto-1b-data at revision
d265bbf7bac76cd55daaf81a1d185dfe089a412b (Apache-2.0). Held-out source:
ProCreations/approve-or-deny at revision a38b625913dd46ca9702063f1597c979e6ace34e
(Apache-2.0).
The NumPy artifact contains numeric arrays only and is loaded with allow_pickle=False.
The probe and example code are Apache-2.0. MiniCPM5-1B-Base is also published under Apache-2.0 and remains governed by its own repository.