Feature Engineering Is the Bottleneck: An Explainability Study of ML-Based Security-Relevant Method Detection

Abstract Static Application Security Testing tools trace untrusted data flows using curated lists of Security-Relevant Methods (SRMs), namely sources, sinks and sanitizers. Machine learning approaches for SRM detection (ML4SRM) report strong cross-validation results yet perform far worse on unseen code, and prior work has not asked why. To assess this disparity we develop WEAVE, a tool combining automated model selection, repeated cross-validation and explainable Artificial intelligence (XAI) using SHapley Additive exPlanations (SHAP) for WEKA/MEKA pipelines. Using WEAVE and SRM-Dataset, our consolidated collection of 10{,}180 Java SRMs, we conduct an explanation study of three ML4SRM approaches, namely, Dev-Assist, SSCM, and SWAN. Global and local explanations show that the models rely on identifier tokens and parameter signatures, barely on the method body, so they learn dependencies among surface features specific to the training data. On unseen code the models read those same features differently, with 43 of 59 feature group and model combinations shifting significantly, by up to 62 percentage points, and 14 pointing the opposite way for most methods. Nothing inside the models changes. An attribution is a per-instance quantity averaged over the methods explained, not a weight stored in the model, so one fixed decision function can be read two ways. AutoML, included as a control, raises F1 yet broadens feature use in only four of the seven models, while aggregate metrics hide the instability, with micro-F1 at 0.99 where minority-class F1 is 0.15. Feature engineering, not model selection, is therefore the bottleneck for SRM detection. Progress depends on features that survive renaming, obfuscation stress tests, and per-class metrics alongside aggregate scores.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-12
DOI
https://doi.org/10.21203/rs.3.rs-10897881/v1
Primary Topic
Software Testing and Debugging Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Feature Engineering Is the Bottleneck: An Explainability Study of ML-Based Security-Relevant Method Detection

Ranjith Krishnamurthy, Oshando Johnson, Eric Bodden, Goran Piskachev et al.
Research Square
Software Testing and Debugging Techniques
preprint

Feature Engineering Is the Bottleneck: An Explainability Study of ML-Based Security-Relevant Method Detection

Ranjith Krishnamurthy, Oshando Johnson, Eric Bodden, Goran Piskachev, Rohith Kumar Shanmuganathan
preprint en

Abstract

Abstract Static Application Security Testing tools trace untrusted data flows using curated lists of Security-Relevant Methods (SRMs), namely sources, sinks and sanitizers. Machine learning approaches for SRM detection (ML4SRM) report strong cross-validation results yet perform far worse on unseen code, and prior work has not asked why. To assess this disparity we develop WEAVE, a tool combining automated model selection, repeated cross-validation and explainable Artificial intelligence (XAI) using SHapley Additive exPlanations (SHAP) for WEKA/MEKA pipelines. Using WEAVE and SRM-Dataset, our consolidated collection of 10{,}180 Java SRMs, we conduct an explanation study of three ML4SRM approaches, namely, Dev-Assist, SSCM, and SWAN. Global and local explanations show that the models rely on identifier tokens and parameter signatures, barely on the method body, so they learn dependencies among surface features specific to the training data. On unseen code the models read those same features differently, with 43 of 59 feature group and model combinations shifting significantly, by up to 62 percentage points, and 14 pointing the opposite way for most methods. Nothing inside the models changes. An attribution is a per-instance quantity averaged over the methods explained, not a weight stored in the model, so one fixed decision function can be read two ways. AutoML, included as a control, raises F1 yet broadens feature use in only four of the seven models, while aggregate metrics hide the instability, with micro-F1 at 0.99 where minority-class F1 is 0.15. Feature engineering, not model selection, is therefore the bottleneck for SRM detection. Progress depends on features that survive renaming, obfuscation stress tests, and per-class metrics alongside aggregate scores.

Research Square
Carl von Ossietzky Universität Oldenburg (DE), Amazon (United States) (US), Paderborn University (DE), Fraunhofer Institute for Mechatronic Systems Design (DE)
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon