Software composition analysis (SCA) tools are scanners that list the open-source libraries an application ships and flag any library version with a known vulnerability. They flood developers with alerts, and most of those alerts point at vulnerable code the application never actually reaches. Two recent tools can sort real alerts from false ones. One asks a large language model to read the code (SAVANT); the other evolves exploit tests (VESTA). Both are accurate, but they are expensive per alert, and both need a known exploit or proof-of-vulnerability test to start from. Materials science faced the same shape of problem. Exact quantum simulation of a crystal is too costly to run on every candidate, so the field learned to predict properties from the chemical formula alone, using per-element descriptors computed once and reused everywhere, and to send only promising candidates to the expensive simulation.
We propose the software version of that screen. Each library version gets a precomputed "reach profile" summarizing, across many client projects, how its vulnerable APIs tend to get called, and through which other libraries. An application is then described like a chemical formula: which libraries it contains and what fraction of its outgoing calls go into each. A small model maps this composition to the probability that a given alert is genuinely reachable. The model is cheap and needs no exploit. It decides which alerts are worth passing to SAVANT- or VESTA-style verification. The claim is about the cascade: a composition screen in front of an expensive verifier should keep almost all of the verifier's recall while sending it a small fraction of the alerts. It should also give usable scores in cases the verifier cannot handle, such as vulnerabilities that have no proof-of-vulnerability test.
Core Claim
Whether a vulnerable library API is reachable from an application is, to a useful degree, predictable from two things. The first is the application's dependency composition, meaning its libraries weighted by how heavily the application uses them. The second is library-level reach profiles amortized across an ecosystem. No whole-program call graph has to be built for the target application. The hard and interesting case is the transitive one, where the vulnerable call is made not by the application but by an intermediate library. ATVHunter reports that 78% of detected vulnerabilities in Android apps come from such dependencies of dependencies. That is exactly where a text search of the application's own code finds nothing and where call graphs grow largest.
Relation to Prior Work
The closest work verifies alerts one at a time. SAVANT splits Java code into syntax-tree segments, stores their embeddings, and runs an LLM reflection loop seeded with vulnerable API signatures and proof-of-vulnerability tests. VESTA migrates library exploit payloads into project tests with a genetic search. Both answer "is this exploitable?" with high precision. Both pay per alert and both depend on existing exploit material. We do not replace them; we decide which alerts they should spend effort on.
AutoPruner supplies part of our method. It fuses 22 graph metrics with CodeBERT embeddings to remove spurious call-graph edges. We use it to clean the static reachability labels we train on. It works edge by edge, whereas we want a per-alert score that never builds the target's graph.
DTResolver motivates the work and constrains it. It shows that manifest-only tools reach 53% accuracy against real installations, versus over 90% for faithful resolution simulation. Our compositions must therefore come from resolved dependency trees, not declared ones. Its authors explicitly leave code-level reachability open.
The materials papers supply the representation ideas. LEAF gives each element a fixed 37-dimensional profile of how often it sits in each kind of local coordination geometry across a crystal database. Summing these profiles, weighted by the formula, beats prior composition descriptors at structure-type prediction (86% vs. about 81%). Our reach profiles play the same role for libraries.
DopNet shows that averaging over a formula washes out components below about 1% concentration that nonetheless dominate a property. It fixes this by giving such dopants a separate channel. The software analogue is a few-call intermediate library carrying the vulnerable path inside a large host. We test whether that separate channel matters rather than assuming it.
The seven-facet max-affine model shows that a formation-energy landscape over 92 elements is captured by a maximum over seven linear functions of composition fractions. It motivates an interpretable variant of our scorer, with one linear "facet" per family of exploitation route, so that the predicted risk is set by the worst route.
One caution from materials carries over directly. Composition-only models cannot tell apart polymorphs, which are distinct crystal structures that share a formula. Here, two applications with identical dependency mixes may differ in reachability purely because of their own control flow. We measure how often this happens instead of hiding it.
Research Program
We work in Java and Maven, because that is where the gold-labeled benchmarks in our sources live. The program has four parts.
Reach-profile corpus. We mine a corpus of open-source Maven client projects and resolve their dependency trees by simulating the build. For every library version linked to a CVE, and for each of its vulnerable APIs, we build static call graphs from client entry points to those APIs and prune them with AutoPruner. From the reachable paths we record a fixed-length profile of three kinds of statistics. The first is the distribution of path lengths. The second is which intermediate libraries the paths pass through. The third is the fraction of paths that are entered from public client APIs versus test, reflection, or initialization code. We also compute a "carrier" profile for every non-vulnerable library: how often it calls into each vulnerable API family. This plays the role of LEAF's per-element geometry statistics. It is computed once per library version and reused for every downstream application.
Application composition. For a target application and alert, we take its resolved tree from Maven metadata. We also count call-site fractions into each direct dependency by scanning bytecode for invoke instructions, which is cheap and does not require a call graph. We split the composition into two parts. The "host" is the bulk of dependencies. The "dopants" are the libraries whose carrier profiles touch the vulnerable API family, however small their share of the composition.
Scorer. We compare three scorers. The first is gradient-boosted trees on the pooled vector. The second is a DopNet-style model with a separate dopant channel. The third is a max-affine scorer, $r(x) = \max_{f=1..K} (w_f^\top x + b_f)$, where $x$ is the concatenated composition-weighted profile vector, $w_f, b_f$ are the weights and offset of facet $f$, and $K$ is small (we sweep 3 to 10). We choose the interpretable variant only if it loses little accuracy.
Cascade. We set a screening threshold to reach a target recall on validation data. Alerts below the threshold are deprioritized; the rest go to the verifier.
Baselines
The naive reference is presence-only SCA. It flags every alert, so its recall is 1 by definition and its precision equals the base rate of truly reachable alerts on each benchmark. We compute that base rate from benchmark labels. We found no reported presence-only precision on Lacuna for the SAVANT or VESTA benchmarks.
The second baseline is a textual-reference check. It flags an alert if the application's own bytecode, or any resolved dependency's bytecode, contains a call to the vulnerable method signature. It needs no learning and is the cheapest serious competitor. It is run on the same resolved trees as our method. On direct-use alerts it may be very hard to beat.
The third baseline is a learned code classifier: CodeBERT fine-tuned on the application's call-site snippets around the dependency, following the semantic half of AutoPruner. It is trained on the same labels with the same tuning budget as our scorer. This tests whether reading code locally beats composition.
The fourth baseline is a dependency-depth heuristic. It scores an alert by the inverse of its depth in the tree and the number of distinct paths to it. This isolates whether the reach profiles carry information beyond tree shape.
The strongest existing method is SAVANT. On its benchmark of 55 Java applications and 25 CVEs it reports 83.8% precision, 73.8% recall, and 78.5% F1. On the 60 project–vulnerability pairs of VESTA, VESTA reports a 71.7% exploit-reproduction rate (43 of 60), with zero false positives, against 18.3% for Transfer. We do not expect the screen alone to match SAVANT's precision.
Beating SAVANT means the cascade (screen plus SAVANT) retains at least 95% of SAVANT's recall while issuing at most 40% of its LLM calls, measured on SAVANT's own benchmark with the same model and segment settings. If SAVANT cannot be rerun, we compare token counts estimated from its reported 2,000–2,500-token segment size and state this as a limitation. The equivalent criterion for VESTA is retaining at least 40 of its 43 successes while running its search on at most half the pairs.
The ablations target the key ingredients. The first removes the reach profiles and uses library identity only. The second removes the dopant channel, keeping plain fraction-weighted pooling. The third removes call-site fractions, using an unweighted dependency set.
Why not just…?
Why not just grep for the vulnerable API? For alerts where the application itself calls the vulnerable method, this may match or beat us, and we will report it separately on that slice. Its blind spot is structural. When the call comes from an intermediate library, the reference sits inside that library, and whether it is reachable depends on how the application uses the carrier. The transitive slice is where the decisive comparison happens. If reach profiles do not beat grep-over-resolved-trees there, the idea fails.
Why not just run SAVANT on everything? Where cost is no object and proof-of-vulnerability tests exist, one should. SAVANT itself reports the dependency on such tests and on closed LLMs. The screen's value is the measured reduction in verifier calls at fixed recall. We also hold out the tests for a subset of CVEs to check whether the screen still ranks alerts usefully where SAVANT's seeds are missing.
Why not just fine-tune a code model and skip the materials analogy? This is a real threat, and the CodeBERT baseline exists to settle it. AutoPruner's ablation found semantic features (F 0.66) only modestly ahead of handcrafted structure (0.62), with fusion at 0.68. That suggests local code reading is not decisive on its own. Still, if the fine-tuned classifier matches us at similar cost, the composition representation is not earning its place, and we will say so.
Why not just pool with attention instead of a DopNet-style split? It may work equally well. The dopant-channel ablation is compared against attention pooling, and we adopt whichever is simpler at equal accuracy.
Proposed Experiments and Decisive Checks
We train on static labels from the mined corpus. We validate those labels against dynamic call traces on the 141 programs of the NJR-1 benchmark used by AutoPruner, which tells us how much label noise to expect. Gold evaluation uses the SAVANT and VESTA benchmarks, held out entirely, with splits by CVE so that no vulnerability seen in training appears at test time.
Metrics are precision–recall curves, recall at fixed screening budgets, and verifier calls saved by the cascade. Results are reported separately for direct and transitive alerts.
There are three decisive checks. The first is whether reach profiles beat both the depth heuristic and grep on transitive alerts. The second is whether the cascade meets the stated recall-and-cost criterion against SAVANT. The third measures the polymorphism rate: the fraction of test alerts where applications with near-identical compositions disagree in gold label. This rate sets the ceiling on any composition-only screen, and a high value would tell us to add a light per-application control-flow feature rather than claim the screen is sufficient.
References
- SAVANT: Vulnerability Detection in Application Dependencies through Semantic-Guided Reachability Analysis
- Exploiting Library Vulnerability via Migration Based Automating Test Generation
- ATVHUNTER: Reliable Version Detection of Third-Party Libraries for Vulnerability Identification in Android Applications
- AutoPruner: Transformer-Based Call Graph Pruning
- Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM Ecosystem
- Digital features of chemical elements extracted from local geometries in crystal structures
- Predicting thermoelectric properties from chemical formula with explicitly identifying dopant effects
- A seven-facet polyhedron captures the composition-only formation-energy landscape of inorganic solids