acceptodds
Under review as a conference paper at ICLR 2027

Detecting Malicious Agent Skills with Learned Behavioral Rules

Abstract

While agent skills extend the capabilities of large language model (LLM) agents, they may carry malicious instructions that cause agents to perform harmful actions. Existing detectors do not learn interpretable detection criteria from data, which limits their coverage and interpretability. We propose Skill Behavioral Rules (SBRs), a class of interpretable behavioral rules learned from skill graphs for malicious skill detection. We construct a behavior graph from each skill document, augment the graph with machine learning (ML) predicates that score the maliciousness of textual descriptions, and mine rules in Horn form that combine structural patterns with these predicates. For detection, we learn rule weights with a sparse logistic regression model and make each prediction traceable to the matched rules and their supporting evidence. On 1329 MalSkillBench test skills, SBRs outperform nine baseline configurations with an F1 score of 87.17% and a 5.88% false positive rate. The learned rules also generalize to ASM, a dataset from a different source, which indicates that the mined patterns capture transferable behavioral characteristics. Our code and data are available at https://anonymous.4open.science/r/SBR-52F1/.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
LLM agents security, malicious skill detection, rule learning

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_ozCxOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper proposes Skill Behavioral Rules (SBRs) for malicious skill detection. An LLM extracts a skill graph from SKILL.md and referenced script filenames; a multiple-instance learning (MIL) model scores textual descriptions to instantiate ML predicates; Horn rules are mined from the augmented graphs; and sparse logistic regression learns rule weights. Predictions can be traced to matched rules and evidence in the extracted graph. After excluding 1,300 prompt-injection malicious skills from MalSkillBench, SBR achieves 87.17% F1 and a 5.88% false positive rate (FPR) on 1,329 test skills. It achieves 71.36% F1 on the cross-source Agent Skill Malware (ASM) dataset. The paper also reports ablations and a case study.

Critical strengths
  1. Captures concrete behavior combinations. SBR incorporates entities, operation relations, and maliciousness scores of local descriptions into rules. This allows decisions to consider operations, their objects, and their textual context together, such as a credential read paired with a send to an external endpoint.
  2. Broad experimental evaluation. The paper evaluates a skill-family-disjoint MalSkillBench split and the cross-source ASM dataset, compares nine baseline configurations, and includes ablations. SBR achieves 87.17% F1 with a 5.88% FPR on MalSkillBench and 71.36% F1 on ASM.
Critical weaknesses
  1. Script contents are outside the input. SBR reads SKILL.md and the filenames of referenced scripts, whereas code-injection and mixed attacks may place decisive malicious behavior in script bodies. Without results stratified by attack vector and evidence visibility, its performance on this subset remains unclear.
  2. No equally supervised classifier comparison. SBR trains on MalSkillBench labels, while LLM Guard, the trained-classifier baseline in Table 1, uses its official configuration. A malicious-skill classifier trained with the same data and label budget is needed to assess the gain from learned behavioral rules over direct classification.
Questions for authors
  1. For code-injection and mixed-attack samples whose key malicious evidence lies in script bodies, what visible signals does SBR rely on? Could you report sample counts and recall by attack vector and by whether that evidence appears in the model input, to clarify the method's scope?
  2. Could you train a malicious-skill text classifier under the same train/test split, label budget, and input content (SKILL.md and referenced script filenames), and compare it with SBR? This would help quantify the gain from the graph-and-rule design.
  3. Appendix A.7 reports an overall structural-relation recall of 0.269 on 20 ASM documents, but does not report extraction performance for relations associated with malicious behavior. Could you report the extraction recall of key malicious relations visible in the input and analyze whether their omission contributes to false negatives on ASM?
6 comments
AuthorsOpenReview ↗

We report detection results by malicious content location and attack vector, a fine-tuned DeBERTa comparison, and an analysis of key relation extraction and downstream detection on ASM.

Thank you for your careful evaluation and constructive comments. Our responses are as follows.

W1 & Q1. Document evidence and detection results by malicious content location and attack vector

Thank you for suggesting this breakdown of detection performance. As you suggested, we have added analyses by malicious content location and attack vector. We found that, even when malicious behavior is implemented in scripts, SBR can extract features indicative of malicious behavior from the skill document for detection.

Specifically, we grouped the 529 malicious skills in the test set by the location of malicious content.

Location of malicious contentMalicious skillsDetectedRecall
Skill document only18514880.00%
Skill document and scripts13712087.59%
Scripts only20717785.51%

Recall is at least 80% in all three groups and exceeds 85% in both groups with malicious content in scripts. These results show that SBR can detect most samples in these groups using document input. We have added the results and analysis by malicious content location in Table 14 of Appendix A.10.

In addition to malicious content location, we grouped the generated malicious samples in the test set by the attack vectors defined in MalSkillBench. The code injection and mixed attack groups contain 272 and 123 samples, respectively, with SBR achieving recalls of 81.62% and 97.56%. These results further support SBR's detection capability across these attack vectors.

To further illustrate how SBR detects a sample whose malicious content resides only in scripts, we have added the perplexity-search__CI_B7 case in Figure 7 of Appendix A.12. The ransom-note operation is implemented in the script, while the document describes running sonar_guard.py during initialization to download remote executables. The operation description has a risk score of 0.992, satisfying the machine learning (ML) predicate in rule 30. This semantic condition and the script execution relation jointly support the rule match. SBR predicts the sample as malicious after aggregating the contributions of all matched rules.

To further illustrate how SBR distinguishes such behavior from normal installation, we have added the benign lightpanda-browser case in Figure 8 of Appendix A.12. It also contains a script execution relation. The installation description has a local risk score of 0.055. The final maliciousness probability is 0.364, yielding a benign prediction. The two cases share the same type of script execution relation. Their different semantic scores illustrate how SBR combines ML predicates and behavioral relations to distinguish these invocations.

W2 & Q2. Comparison with a text classifier under the same training supervision

Thank you for suggesting a comparison under matched supervision. Following your suggestion, we have added a comparison with DeBERTa fine-tuned on the same training data and skill labels as SBR. We found that SBR still achieves better overall detection performance than fine-tuned DeBERTa under the configurations evaluated here.

We initialized DeBERTa from the checkpoint which is used by LLM Guard. We then fine-tuned it on the same MalSkillBench training split and skill labels as SBR. We evaluated both methods on the same 1,329 test skills. Both methods use information from SKILL.md and the script filenames referenced in it. We retained LLM Guard's input settings after fine-tuning.

All values below are percentages.

MethodAcc.PrecisionRecallF1FPR
LLM Guard56.8845.0938.1941.3530.75
Fine-tuned DeBERTa77.8898.7644.9961.820.38
SBR90.1490.4584.1287.175.88

SBR achieves an F1 score of 87.17% and an accuracy of 90.14%. These are 25.35 and 12.26 percentage points higher than those of fine-tuned DeBERTa, respectively. The results show that SBR retains an overall performance advantage under these detector configurations with matched training data and label supervision. We have added this experiment and analysis in Table 13 of Appendix A.9.

Q3. Extraction of key malicious relations and its effect on false negatives on ASM

We appreciate your suggestion to focus on key malicious relations. Following your suggestion, we have evaluated the extraction of key malicious relations and examined whether missing relations contribute to false negatives on ASM. We found that SBR can still detect malicious skills using the retained behavioral evidence when key relations are missing.

For the 10 malicious samples in the original 20-document ASM set, we marked 24 key malicious relations in their reference graphs. MiniMax-M2.5 correctly extracted 4 of these relations, giving an extraction recall of 16.7%.

To further examine how extraction results relate to false negatives, we kept the SBR detector fixed and evaluated it using graphs extracted by MiniMax-M2.5 and the reference graphs. Both graph sources led to the detection of 5 of the 10 malicious skills, with 3 detected skills shared between them. On this ASM subset, SBR achieved the same overall detection rate with the extracted and reference graphs. We have added the key relation extraction results and the comparison of SBR's detection results in Appendix A.7.

To further explain how a malicious skill can still be detected when key relations are missing, we have added the ASMFULL_150 video downloader case in Figure 10 of Appendix A.12. The document presents downloading and running the openclaw-agent utility as a prerequisite for the task. The graph extracted by MiniMax-M2.5 omits the utility's execution relation while retaining the GitHub download and log-reading relations. The download description's risk score of 0.999 satisfies the corresponding ML predicate. This semantic evidence and the retained behavioral relations jointly support matches of rules 263 and 367. The execution relation in the reference graph participates in a match of rule 133. Despite differences in the matched rules, SBR predicts the skill as malicious with either graph after aggregating all matched rule contributions. This case illustrates how SBR can preserve a correct detection by combining the retained behavioral relations with ML predicates, even when a key relation is missing.

Reviewer_ozCxOpenReview ↗

Response to Authors

Thank you for the additional analyses. The fine-tuned DeBERTa result addresses my baseline concern, and the breakdown by malicious-content location is helpful.

My remaining concern is the reported 85.51% recall on 207 “scripts only” samples. SBR does not read script bodies, and the case study's SKILL.md still mentions downloading remote executables. How many of these samples lack visible risk cues in SKILL.md and script filenames, and what is recall on that subset? A benign-looking document can invoke a malicious helper script without exposing its behavior to SBR.

This leaves the detector's coverage of concealed script attacks unclear, so I maintain my original rating of 2.

Reviewer_FLGMOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

Agent skills can carry instructions that make an agent act against its user. Existing detectors either match fixed patterns, return an uninterpretable score, or hand the whole document to an LLM. This paper proposes learning the detection criteria instead, as Horn rules over behaviour graphs extracted from skill documents. Rule bodies are extended with machine-learning predicates so that textual evidence, not just graph structure, can enter a rule, and a sparse logistic model combines rule matches into a prediction that traces back to the rules that produced it. The method is evaluated against nine baseline configurations on a malicious-skill benchmark and on a second dataset from an unrelated source.

Critical strengths

The interpretability here is structural rather than decorative, and that is what makes the paper worth attention. The detection score is literally an intercept plus the weights of the rules that matched, so a prediction decomposes exactly into named behavioural conditions and the concrete entities and operations that satisfied them. This is not a saliency map laid over a black box after the fact. For the deployment setting the paper has in mind, where an analyst must decide whether to trust a flag, that difference is the whole point, and the case study in the appendix shows it working on a real example.

The ablation on ML predicates is decisive and isolates the paper's actual technical move. Removing the predicates and refitting on the same graphs drops F1 by more than thirty-six points and nearly quadruples the false positive rate. That tells the reader precisely where the performance comes from: not from graph structure alone, which benign and malicious skills largely share, and not from text scoring alone, but from letting rules condition on both. Because the ablation holds the graphs and the split fixed, it supports the design argument rather than merely the pipeline, and it is the result I would cite from this paper.

Critical weaknesses

The headline claim is not a like-for-like comparison, and the paper's own second dataset shows why. On MalSkillBench, SBR is trained on the training split while all nine baselines are off-the-shelf, so the comparison measures a trained detector against untrained ones in-distribution. On ASM, where nobody has trained on the data, two of the LLM-based configurations beat SBR by a wide margin. The paper reports this honestly in the cross-dataset section, which I credit, but the abstract, introduction, and conclusion still say SBR outperforms nine baseline configurations without the qualification. The fix is straightforward and would make the paper more convincing rather than less. Either add a matched baseline — fine-tune the DeBERTa classifier, or few-shot an LLM detector, on the same MalSkillBench training split — so that at least one comparison is trained-against-trained; or reframe the contribution explicitly around the interpretability and cost trade-off, for which the paper already has the right evidence in its backend-size analysis showing LLM detectors need large models while graph extraction does not. The second option requires no new experiments and I think it is the stronger paper.

The second concern is that the detector is never tested against an adversary who has read it. The rules are interpretable by design and the paper plans to release them, so an attacker can see that a predicate fires at a score threshold and that a particular structural pattern is what gets matched. Rewording a skill description to push its maliciousness score below the lowest threshold, or restructuring the described operations to avoid a matched pattern while preserving the behaviour, are both cheap. For a security detector this is the question that determines deployed value, and it is currently unaddressed. A modest experiment would go a long way: take the malicious test skills, apply a paraphrase or a light obfuscation pass with an LLM while verifying the malicious behaviour is preserved, and report the recall drop for SBR alongside the same drop for two or three baselines. Even a result showing SBR degrades comparably to the alternatives would be informative, and showing it degrades less would be a strong argument for the approach.

Questions for authors

The questions that could move my assessment are about fairness of comparison and about the extraction stage. On the first, is there a configuration in which a baseline is trained on the same MalSkillBench training split as SBR, and if so what are its numbers? On the second, the skill graph is produced by a single LLM, and the appendix compares candidate extractors on grounding precision and artifact recall but not on end-to-end detection. How much does test F1 move if the graph extractor is swapped for a noticeably smaller or larger model? This matters because the paper argues that the LLM stage does not need a large model, and that argument is currently supported by an intermediate metric rather than by detection performance.

I would also appreciate clarification on scope. The 1300 prompt-injection skills are excluded from the dataset, which is a defensible choice given the stated threat model, but it narrows what the reported numbers cover. Could that exclusion be stated in the abstract rather than only in the setup?

2 comments
AuthorsOpenReview ↗

We present additional evaluations of fine-tuned DeBERTa, paraphrasing robustness, and extractor choice, alongside clarifications of performance claims and the prompt injection exclusion.

Thank you for your careful reading of our paper and constructive feedback. Our responses are as follows.

W1 & Q1. Training conditions for baseline comparison and scope of performance claims

We appreciate your suggestion to align the training supervision. Following your suggestion, we have added a comparison with DeBERTa fine-tuned on the same training data and skill labels as SBR. We found that SBR still achieves better overall detection performance than fine-tuned DeBERTa under the configurations evaluated here.

We initialized DeBERTa from the checkpoint which is used by LLM Guard. We then fine-tuned it on the same MalSkillBench training split and skill labels as SBR. We evaluated both methods on the same 1,329 test skills. We retained LLM Guard's input settings after fine-tuning.

All values below are percentages.

MethodAcc.PrecisionRecallF1FPR
LLM Guard56.8845.0938.1941.3530.75
Fine-tuned DeBERTa77.8898.7644.9961.820.38
SBR90.1490.4584.1287.175.88

SBR achieves an F1 score of 87.17% and an accuracy of 90.14%. These are 25.35 and 12.26 percentage points higher than those of fine-tuned DeBERTa, respectively. The results show that SBR retains an overall performance advantage under these detector configurations with matched training data and label supervision. We have added this experiment and analysis in Table 13 of Appendix A.9.

We agree with your suggestion on the performance claims and have revised the abstract and conclusion to specify that the claim of outperforming nine baseline configurations applies to the main MalSkillBench evaluation.

W2. Robustness to paraphrasing when the attacker knows the rules

Thank you for suggesting this robustness evaluation. Following your suggestion, we have added a paraphrasing experiment in which the attacker knows SBR's rules. We found that SBR shows some robustness to document paraphrasing under these conditions.

In this experiment, we provided Qwen3.5-9B with all 471 rules, their weights, predicate thresholds, matching semantics, and the decision threshold. We instructed it to use synonyms, indirect expressions, and sentence restructuring and to preserve the original operations, targets, data flows, and execution order. We have added Figure 4 to Appendix A.11 of the revised manuscript to present the prompt templates used in this experiment.

We randomly sampled skill documents from the MalSkillBench test set for paraphrasing. Our final evaluation includes 150 original–paraphrased document pairs, with 89 malicious skills and 61 benign skills. We evaluated the original and paraphrased documents using the same settings as in our main experiments. The two baselines were evaluated on the same document pairs. For SBR, we counted documents with incomplete graph extraction as producing no alert.

All values below are percentages. The arrows indicate changes from the original documents to the paraphrased documents.

MethodAcc.PrecisionRecallF1FPR
SBR94.67 → 91.3396.55 → 97.5094.38 → 87.6495.45 → 92.314.92 → 3.28
SkillScan-Security56.00 → 53.3360.55 → 59.0574.16 → 69.6666.67 → 63.9270.49 → 70.49
Panguard Skill Auditor (static)52.67 → 50.6790.91 → 89.4722.47 → 19.1036.04 → 31.483.28 → 3.28

After paraphrasing, SBR achieves an F1 score of 92.31% and an accuracy of 91.33%. Both are higher than those of the two baselines. These results indicate that SBR maintains good overall detection performance under the evaluated paraphrasing conditions. The recall decreases are 6.74, 4.49, and 3.37 percentage points for SBR, SkillScan-Security, and Panguard, respectively. We have added these results and analysis in Table 15 of Appendix A.11.

To illustrate which behavioral evidence supports detection after paraphrasing, we have added a case study of a separate document pair in Figure 11 of Appendix A.12. In the klingai-video-extension skill, three execution notes were rewritten as a paragraph. The script node's ML score decreases from 0.9969 to 0.3244, so the rule that requires this score to exceed 0.9 no longer matches. The script invocation and configuration file read relations remain in both graphs. The associated operation descriptions still satisfy the ML predicates, so rules 388 and 392 match both versions. After all matched rule contributions are aggregated, the paraphrased version has a detection score of 0.76164, above the decision threshold of 0.50130. Even after some local evidence weakens, the retained behavioral relations and their textual descriptions jointly support detection.

Q2. Effect of the graph extractor on end-to-end detection performance

We appreciate your suggestion to examine the extractor's effect on detection. To address your suggestion, we compared SBR's end-to-end detection performance with two different graph extractors. We found that changing the graph extractor has a limited effect on SBR's end-to-end detection performance in this comparison.

We replaced MiniMax-M2.5 with Qwen3.5-9B and reconstructed graphs for all 1,329 test skills with the same input documents, extraction prompt, and graph schema. Both configurations used the same trained SBR detector and decision threshold. We compared end-to-end detection from skill documents to final predictions.

All values below are percentages.

Graph extractorAcc.PrecisionRecallF1FPR
MiniMax-M2.590.1490.4584.1287.175.88
Qwen3.5-9B87.4384.6783.5584.1110.00

Changing the extractor reduces F1 from 87.17% to 84.11%, a difference of 3.06 percentage points. Accuracy decreases from 90.14% to 87.43%, a difference of 2.71 percentage points. These end-to-end results show that the two graph extractors yield similar overall detection performance with the same detector.

We have added this experiment and analysis in Table 9 of Appendix A.7.

Q3. Clarifying the exclusion of PI from the main evaluation in the abstract

Thank you for pointing this out. We have explicitly stated in the abstract that the main MalSkillBench evaluation excludes the prompt injection (PI) subset.

Section 4.1 and Appendix A.1 explain this data selection. Section 3.1 further clarifies that our task is to detect skills that induce agents to perform concrete malicious operations.

Reviewer_HhhfOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes Skill Behavioral Rules (SBRs), an interpretable approach for detecting malicious AI-agent skills. The method uses an LLM to extract behavior graphs from skill documents, representing entities and operations as nodes and edges. It then introduces ML predicates, trained through multiple-instance learning, to capture potentially malicious information in textual descriptions. Horn-style rules are mined from these augmented graphs, and sparse logistic regression learns how to combine the matched rules for classification. The authors evaluate SBR on MalSkillBench, using a skill-family-disjoint train/test split, and report an F1 score of 87.17% with a 5.88% false positive rate, outperforming nine evaluated baseline configurations. Ablations examine the contribution of textual ML predicates and weighted rule aggregation. The authors also evaluate generalization to the independent ASM dataset, where SBR achieves 71.36% F1. The paper additionally provides case studies illustrating how predictions can be traced to matched behavioral rules and their supporting graph evidence.

Critical strengths
  1. I find the problem of detecting malicious agent skills important, particularly as third-party skills become more widely used by LLM agents. The proposed combination of behavior graphs and learned rules seems like a reasonable way to move beyond predefined signatures while retaining some interpretability. I particularly appreciate that predictions can be decomposed into matched rules, learned weights, and supporting graph evidence, rather than being presented only as classification scores. The case studies provide useful examples of how this works in practice.

  2. The results on MalSkillBench are promising, with SBR outperforming all nine evaluated baseline configurations in F1. I appreciate the use of a skill-family-disjoint split and cross-fitting for the ML predicates, which help reduce potential leakage between training and evaluation. The ablations and independent ASM evaluation are also useful. Although SBR does not outperform the strongest LLM-based scanners on ASM, the fact that its learned rules retain reasonable detection performance on a different data source is encouraging.

Critical weaknesses
  1. The evaluation does not fully establish the detector's coverage of malicious behavior contained in executable scripts: My understanding is that SBR constructs behavior graphs using SKILL.md and referenced script filenames, but Appendix A.3 explicitly states that script bodies are not included in graph extraction. This seems like a potentially important limitation, since MalSkillBench includes code-injection and mixed attacks where the malicious behavior may reside in executable scripts rather than the skill document itself. I can see how SBR might still identify suspicious instructions surrounding a referenced script, but can you clarify how it handles cases where the script's actual behavior is not apparent from the document or filename. Given that the benchmark contains different code-injection strategies, I believe a breakdown by attack placement would help clarify what the detector is actually learning to identify.

  2. The ablations do not convincingly isolate the contribution of behavioral rule mining over the learned textual model: The improvement from adding ML predicates is substantial, which suggests that textual information plays a central role in detection. However, I am not entirely convinced that the current ablations establish how much additional predictive value comes from the behavioral rules themselves. In particular, Appendix A.8 compares SBR against a text-only variant that classifies a skill as malicious when more than half of its descriptions exceed a fixed score threshold. As I understand it, this differs considerably from the log-mean-exp bag-level prediction used to train the MIL model. Since the MIL model is already trained using skill-level labels, it seems like a natural standalone classifier to evaluate directly. It would be interesting to compare SBR against the MIL model's actual bag-level predictions with a properly selected threshold, or even a straightforward supervised TF-IDF classifier on the same train/test split.

Please refer to Questions for other concerns

Questions for authors
  1. Could the authors provide a performance breakdown between synthetic and wild malicious skills, or discuss how the family-disjoint evaluation relates to generalization across data sources? The ASM results are useful, but I wonder how consistently the learned rules transfer to different attack distributions.

  2. Can you clarify why pure prompt-injection examples are excluded from MalSkillBench, particularly since some prompt-injection attacks also direct agents to perform harmful actions? I would like to better understand the intended scope and limitations of SBR.

4 comments
AuthorsOpenReview ↗

We provide additional ablation results and detection results by malicious content location and sample source, and clarify the task definition and prompt injection evaluation scope.

Thank you for your constructive comments. Our responses are as follows.

W1. Detection of attacks with malicious content in scripts or both documents and scripts

Thank you for raising this concern. We have added an evaluation grouped by the location of malicious content. We found that, even when malicious behavior is implemented in scripts, SBR can extract features indicative of malicious behavior from the skill document for detection.

Specifically, we grouped the malicious skills in the test set by the location of malicious content.

Location of malicious contentMalicious skillsDetectedRecall
Skill document only18514880.00%
Skill document and scripts13712087.59%
Scripts only20717785.51%

Recall is at least 80% in all three groups and exceeds 85% in both groups with malicious content in scripts. These results show that SBR can detect most samples in these groups using document input. We have added this evaluation in Appendix A.10, with the results in Table 14.

To further illustrate how SBR detects a sample whose malicious content resides only in scripts, we have added the perplexity-search__CI_B7 case in Figure 7 of Appendix A.12. The ransom-note operation is implemented in the script, while the document describes running sonar_guard.py during initialization to download remote executables. The operation description has a risk score of 0.992, satisfying the machine learning (ML) predicate in rule 30. The rule combines this semantic condition with the execution relation for the referenced script to produce a match that supports the malicious verdict. SBR predicts the sample as malicious after aggregating the contributions of the matched rules. This case illustrates how document features support detection through the combination of ML predicates and behavioral relations.

For comparison with normal installation, we have added the benign lightpanda-browser case in Figure 8 of Appendix A.12. It also contains a script execution relation. The local risk score of the installation description is 0.055. Its final maliciousness probability is 0.364, below the detection threshold. The two cases share the same type of script execution relation. Their different semantic scores illustrate how SBR combines semantics and behavioral relations to distinguish these invocations.

W2. Isolating the contribution of behavioral rule mining through ablation

Thank you for suggesting this comparison. Following your suggestion, we evaluated the direct multiple instance learning (MIL) baseline using the log-mean-exp aggregation employed during training. We found that SBR still achieves higher recall and F1 on both datasets, which suggests that behavioral rules provide additional predictive value beyond the textual judgments supplied by ML predicates.

The baseline uses the same trained MIL model that instantiates SBR's ML predicates. It scores local text segments from the document and applies log-mean-exp aggregation. The decision threshold is 0.45219, selected from out-of-fold predictions on the training set.

DatasetMethodPrecisionRecallF1False positive rate
MalSkillBenchMIL98.86%65.41%78.73%0.50%
MalSkillBenchSBR90.45%84.12%87.17%5.88%
ASMMIL93.94%25.00%39.49%0.90%
ASMSBR85.39%61.29%71.36%5.83%

Compared with this direct MIL configuration, SBR improves recall and F1 on MalSkillBench by 18.71 and 8.44 percentage points, respectively. SBR also achieves higher recall and F1 on ASM. We have added this comparison in Appendix A.8, with the results in Table 11. The original majority-voting experiment is reported separately in Table 12 of Appendix A.8.

Q1. Detection performance on generated samples and samples from real sources

Thank you for asking about performance on real-world samples. To answer this question, we have added an analysis by sample source. We found that SBR's detection capability extends beyond generated samples, with high recall on the Wild subset collected from real sources.

Specifically, we grouped the samples in the current test split by source.

Sample sourceMalicious skillsDetectedRecall
Gen39534286.58%
Wild12810380.47%

Recall on the Wild subset is 6.11 percentage points lower than on the Generated subset. SBR detects more than 80% of the malicious skills in the Wild subset. We have added these results and the corresponding analysis in Section 4.2.

On the independent ASM dataset, SBR achieves a recall of 61.29% and an F1 score of 71.36%. These results provide further evidence of detection across data sources and are reported in Table 3 of Section 4.3.

Q2. Evaluation scope and detection of prompt injection attacks

Thank you for this observation. We agree that prompt injection (PI) provides valid attack samples and can induce agents to perform malicious operations. We define our task by concrete malicious operations, such as data exfiltration, credential theft, and code execution, while PI denotes an attack vector spanning different behavior categories. We therefore distinguish the scope of the main evaluation, which excludes PI, from the task definition.

To assess the excluded PI subset under this definition, we grouped its evaluable samples by the malicious behavior taxonomy of MalSkillBench. Behaviors B1-B9 correspond to the concrete malicious operations covered by our task, while B10-B15 target agent reasoning through attacks such as role hijacking and instruction override. SBR achieves recalls of 81.3% and 18.2% for these two groups, respectively, with an overall recall of 37.8%. These results show that SBR remains effective on the PI subgroup corresponding to our task definition.

We have refined the task definition in Section 3.1 and distinguished attack vectors from malicious behavior categories in Appendix A.1. We also see SBR as a potential complement to text-based detectors targeting B10-B15, with the two approaches focusing on different behavior categories. The abstract and Section 4.1 also explicitly state that the main evaluation excludes PI.

I appreciate the additional experiments, especially the direct MIL comparison and the breakdown by malicious content location. One detail in the revised manuscript caught my attention: Section 4.2 notes that 105 of the 128 wild test skills have SKILL.md documents identical to training documents, while recall on the remaining 23 is 52.17%. Could the authors clarify how this overlap arises despite the family-disjoint split, and whether the main comparison against MIL and the fine-tuned classifier remains consistent when these overlapping examples are excluded?

Thank you for your follow-up question.

In MalSkillBench, each generated malicious skill inherits the name of its template skill, followed by __ and a suffix that encodes its attack vector and malicious behavior, such as ui-ux-pro-max__MIXED_B1. We define the skill family as the part of the name before __ and keep each family in a single partition. This keeps all malicious skills generated from one template skill in the same partition. By comparing the original files, we found that MalSkillBench also contains skills with different names but identical SKILL.md files. Most of them are wild malicious skills collected from public registries, where the publisher chooses the skill name. For these skills, the name does not record which document a skill was copied from, so copies of the same document under different names are assigned to different families. Some of these skills therefore appear in both the training and test sets.

We therefore recomputed the comparison with MIL and fine-tuned DeBERTa after excluding all 139 test skills whose SKILL.md files exactly match a training document. These include the 105 wild malicious skills and 34 benign skills. For each method, we recomputed the metrics from its existing predictions on the remaining 1,190 test skills. The model configurations and decision thresholds are unchanged from the results reported in the manuscript.

MethodOriginal test set F1F1 after excluding exact matches
SBR87.17%86.13%
MIL78.73%79.94%
Fine-tuned DeBERTa61.82%48.04%

SBR retains higher F1 than MIL and fine-tuned DeBERTa after the exclusion. Its F1 decreases by 1.04 percentage points, from 87.17% to 86.13%.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.