droidspan-eval
A Preliminary Study On the Sustainability of Android Malware Detection — Cai (2018) (arXiv:1807.08221, 2018)
What this evaluates
Evaluates the sustainability and robustness of a dynamic behavioral profiling approach (DroidSpan) for Android malware detection over time and against code obfuscation, compared to a static baseline (MamaDroid).
Datasets
- all-data — total ?; splits: train (-1), test (-1)
- oldBen+oldMal — total ?; splits: train (-1)
- MalObf — total 220; splits: test (220)
Metrics
Precision — range: [0, 1]
- P = TP / (TP + FP), computed with respect to the positive class L = MALICIOUS.
Recall — range: [0, 1]
- R = TP / (TP + FN), computed with respect to the positive class L = MALICIOUS.
F1-measure (primary) — range: [0, 1]
- F1 = 2 * (P * R) / (P + R). The paper notes that F1 scores in cross-validation are averaged across folds, not recomputed from averaged P and R.
Input / output format
Input: Runtime dynamic traces of Android apps, specifically the Sensitive Access Distribution (SAD) profile capturing patterns of sensitive data and operation accesses.
Output: Binary classification label: BENIGN or MALICIOUS.
Scoring recipe
def compute_metrics(predictions, gold_labels):
tp = sum(1 for p, g in zip(predictions, gold_labels) if p == 'MALICIOUS' and g == 'MALICIOUS')
fp = sum(1 for p, g in zip(predictions, gold_labels) if p == 'MALICIOUS' and g != 'MALICIOUS')
fn = sum(1 for p, g in zip(predictions, gold_labels) if p != 'MALICIOUS' and g == 'MALICIOUS')
precision = tp / (tp + fp) if (tp + fp) > 0 else 0.0
recall = tp / (tp + fn) if (tp + fn) > 0 else 0.0
f1 = 2 * (precision * recall) / (precision + recall) if (precision + recall) > 0 else 0.0
return precision, recall, f1
Common pitfalls
- F1 scores in cross-validation are averaged across folds, not recomputed from averaged precision and recall.
- MamaDroid's static analysis (FlowDroid) fails on obfuscated apps, making direct comparison on the MalObf dataset impossible.
- Evaluation splits are strictly time-based (training on older malware, testing on newer) to measure sustainability, not random splits.
Evidence (verbatim from paper)
In our evaluation, we gauged the performance of DroidSpan versus the baseline in terms of three metrics: precision, recall, and F1-measure (accuracy), as defined below. ... Precision (P) = TP/(TP + FP), Recall (R) = TP/(TP + FN), and F1 = 2 * (P*R)/(P+R). For evaluating malware detection, these metrics are computed concerning L = MALICIOUS only.
Citation
@misc{cai2018preliminary,
title={A Preliminary Study On the Sustainability of Android Malware Detection},
author={Cai (2018)},
year={2018},
note={arXiv:1807.08221}
}
1---2name: droidspan-eval3description: Evaluates the sustainability and robustness of a dynamic behavioral profiling approach (DroidSpan) for Android malware detection over time and against code obfuscation, compared to a static baseline (MamaDroid). Use when the user wants to benchmark on all-data, oldBen+oldMal, MalObf, or asks about evaluating this task. Reports F1-measure.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/droidspan-eval6 skill_kind: dataset_eval7 source_arxiv: 1807.082218 bibtex_key: cai2018preliminary9 confidence: high10---1112# droidspan-eval1314> A Preliminary Study On the Sustainability of Android Malware Detection — Cai (2018) (arXiv:1807.08221, 2018)1516## What this evaluates1718Evaluates the sustainability and robustness of a dynamic behavioral profiling approach (DroidSpan) for Android malware detection over time and against code obfuscation, compared to a static baseline (MamaDroid).1920## Datasets2122- **all-data** — total ?; splits: train (-1), test (-1)23- **oldBen+oldMal** — total ?; splits: train (-1)24- **MalObf** — total 220; splits: test (220)2526## Metrics2728- `Precision` — range: [0, 1]29 - P = TP / (TP + FP), computed with respect to the positive class L = MALICIOUS.30- `Recall` — range: [0, 1]31 - R = TP / (TP + FN), computed with respect to the positive class L = MALICIOUS.32- `F1-measure` **(primary)** — range: [0, 1]33 - F1 = 2 * (P * R) / (P + R). The paper notes that F1 scores in cross-validation are averaged across folds, not recomputed from averaged P and R.3435## Input / output format3637**Input**: Runtime dynamic traces of Android apps, specifically the Sensitive Access Distribution (SAD) profile capturing patterns of sensitive data and operation accesses.3839**Output**: Binary classification label: BENIGN or MALICIOUS.4041## Scoring recipe4243```python44def compute_metrics(predictions, gold_labels):45 tp = sum(1 for p, g in zip(predictions, gold_labels) if p == 'MALICIOUS' and g == 'MALICIOUS')46 fp = sum(1 for p, g in zip(predictions, gold_labels) if p == 'MALICIOUS' and g != 'MALICIOUS')47 fn = sum(1 for p, g in zip(predictions, gold_labels) if p != 'MALICIOUS' and g == 'MALICIOUS')48 precision = tp / (tp + fp) if (tp + fp) > 0 else 0.049 recall = tp / (tp + fn) if (tp + fn) > 0 else 0.050 f1 = 2 * (precision * recall) / (precision + recall) if (precision + recall) > 0 else 0.051 return precision, recall, f152```5354## Common pitfalls5556- F1 scores in cross-validation are averaged across folds, not recomputed from averaged precision and recall.57- MamaDroid's static analysis (FlowDroid) fails on obfuscated apps, making direct comparison on the MalObf dataset impossible.58- Evaluation splits are strictly time-based (training on older malware, testing on newer) to measure sustainability, not random splits.5960## Evidence (verbatim from paper)6162> In our evaluation, we gauged the performance of DroidSpan versus the baseline in terms of three metrics: precision, recall, and F1-measure (accuracy), as defined below. ... Precision (P) = TP/(TP + FP), Recall (R) = TP/(TP + FN), and F1 = 2 * (P*R)/(P+R). For evaluating malware detection, these metrics are computed concerning L = MALICIOUS only.6364## Citation6566```bibtex67@misc{cai2018preliminary,68 title={A Preliminary Study On the Sustainability of Android Malware Detection},69 author={Cai (2018)},70 year={2018},71 note={arXiv:1807.08221}72}73```7475- arXiv: 1807.08221