asgroi commited on
Commit
726bc58
·
verified ·
1 Parent(s): 5d58dac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +261 -3
README.md CHANGED
@@ -1,3 +1,261 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ pretty_name: EMBER Cleaned
6
+ task_categories:
7
+ - tabular-classification
8
+ tags:
9
+ - cybersecurity
10
+ - malware
11
+ - static-analysis
12
+ - pe-files
13
+ - malware-detection
14
+ - benchmark
15
+ - tabular
16
+ - ai-ready
17
+ - clustering
18
+ size_categories:
19
+ - 1M<n<10M
20
+ ---
21
+
22
+ # EMBER Cleaned
23
+
24
+ EMBER Cleaned is a cleaned and AI-ready version of the original **EMBER (Endgame Malware Benchmark for Research)** dataset, a widely used benchmark for static malware detection on Windows Portable Executable (PE) files.
25
+
26
+ The original EMBER dataset was introduced by Endgame / Elastic as an open benchmark for machine-learning-based malware detection using only **static PE-derived features**, without executing binaries. This cleaned release preserves that purpose while making the dataset easier to load, more reproducible, and more directly usable for downstream experimentation.
27
+
28
+ Compared with the original source asset, this release standardizes metadata, removes duplicate samples, drops constant features, and exports unlabeled samples into a dedicated split for semi-supervised workflows. Each sample is represented as a fixed-length numerical vector derived from PE structure and content, including header information, section statistics, imports, and histogram-based features.
29
+
30
+ ## Original dataset
31
+
32
+ This dataset is a cleaned derivative of the original EMBER benchmark:
33
+
34
+ - **Original name:** EMBER (Endgame Malware Benchmark for Research)
35
+ - **Original provider:** Endgame / Elastic
36
+ - **Original paper:** Anderson, H. S., & Roth, P. (2018). *EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models*
37
+ - **Original DOI:** https://doi.org/10.48550/arXiv.1804.04637
38
+ - **Original project/repository:** https://github.com/elastic/ember
39
+
40
+ Please cite the original EMBER paper when using this cleaned release in research.
41
+
42
+ ## Files
43
+
44
+ | File | Description |
45
+ |---|---|
46
+ | `ember_clean.npz` | Index file with row/feature counts and file references |
47
+ | `ember_clean_X.npy` | Feature matrix (`float32`), raw memmap, shape `(799838, 2099)` |
48
+ | `ember_clean_y.npy` | Label vector (`int32`), `0 = benign`, `1 = malware` |
49
+ | `ember_clean_metadata.parquet` | Per-sample metadata: SHA-256, timestamps, malware-related fields when available, quality flags |
50
+ | `ember_unlabeled.npz` | Index file for unlabeled split |
51
+ | `ember_unlabeled_X.npy` | Unlabeled feature matrix with the same 2,099 features |
52
+ | `ember_clean_metadata_unlabeled.parquet` | Metadata for unlabeled samples |
53
+ | `manifest.json` | Versioned manifest with checksums and artifact references |
54
+ | `EMBER_cleaned_notebook.ipynb` | Exploration and usage notebook |
55
+
56
+ ## What’s in the dataset?
57
+
58
+ This cleaned release contains the **labeled portion** of EMBER plus a **separate unlabeled split**.
59
+
60
+ ### Labeled split
61
+
62
+ - **799,838 labeled samples**
63
+ - approximately balanced between benign and malicious files
64
+ - **2,099 numerical features**
65
+ - feature dtype: `float32`
66
+ - label dtype: `int32`
67
+ - labels:
68
+ - `0` = benign
69
+ - `1` = malware
70
+
71
+ ### Unlabeled split
72
+
73
+ - **199,966 unlabeled samples**
74
+ - exported separately for semi-supervised workflows
75
+ - same 2,099-dimensional feature space
76
+ - not intended to be interpreted as benign or malicious ground truth
77
+
78
+ ### Feature representation
79
+
80
+ Samples are not raw executables. Each file is represented as a **fixed-length static feature vector** extracted from the original PE file. These features describe structural and statistical properties of the binary, such as:
81
+
82
+ - PE headers
83
+ - imported APIs / libraries
84
+ - sections
85
+ - byte-histogram-related information
86
+ - entropy-related characteristics
87
+
88
+ ## Cleaning summary
89
+
90
+ This release is the output of a quality-control and standardization pipeline applied to the original EMBER artifacts.
91
+
92
+ Main processing steps:
93
+
94
+ 1. **Duplicate removal** using feature fingerprints
95
+ 2. **Constant-feature filtering**, reducing the feature space from 2,381 to **2,099**
96
+ 3. **Metadata standardization**
97
+ 4. **Missing-value normalization and quality flagging**
98
+ 5. **Label separation**, exporting `label = -1` samples into a dedicated unlabeled split
99
+ 6. **Manifest generation** for reproducibility and integrity checks
100
+
101
+ Summary of the main changes:
102
+
103
+ - **196 duplicate samples removed**
104
+ - **282 constant features dropped**
105
+ - **199,966 unlabeled samples exported separately**
106
+ - final labeled dataset shape: **799,838 × 2,099**
107
+
108
+ ## File structure
109
+
110
+ ```text
111
+ ember_cleaned/
112
+ ├── ember_clean.npz
113
+ ├── ember_clean_X.npy
114
+ ├── ember_clean_y.npy
115
+ ├── ember_clean_metadata.parquet
116
+ ├── ember_unlabeled.npz
117
+ ├── ember_unlabeled_X.npy
118
+ ├── ember_clean_metadata_unlabeled.parquet
119
+ └── manifest.json
120
+ ```
121
+
122
+ The .npz index stores _rows and _features for reliable loading.
123
+ The feature matrices are raw memmap-backed arrays and should be loaded with explicit dtype and shape.
124
+
125
+ ## Requirements
126
+
127
+ To run the quickstart examples, install the minimum required dependencies:
128
+
129
+ ```bash
130
+ pip install numpy pandas pyarrow
131
+ ```
132
+
133
+ For notebook-based exploration and basic visualization, you may also install:
134
+ ```bash
135
+ pip install jupyter matplotlib seaborn scikit-learn
136
+ ```
137
+
138
+ ## Quickstart
139
+ This example loads the labeled EMBER Cleaned split and checks that features, labels, and metadata are consistent and ready for supervised use.
140
+
141
+ ```python
142
+ import numpy as np
143
+ import pandas as pd
144
+
145
+ idx = np.load("ember_clean.npz", allow_pickle=True)
146
+ n_rows = int(idx["_rows"])
147
+ n_features = int(idx["_features"])
148
+
149
+ X = np.fromfile("ember_clean_X.npy", dtype=np.float32).reshape(n_rows, n_features)
150
+ y = np.load("ember_clean_y.npy")
151
+ meta = pd.read_parquet("ember_clean_metadata.parquet")
152
+
153
+ print(f"Dataset: {X.shape[0]} samples, {X.shape[1]} features | " f"labels: {y.shape[0]} | " f"metadata columns: {meta.shape[1]}")
154
+
155
+ assert X.shape[0] == len(y) == len(meta)
156
+ assert set(np.unique(y)) == {0, 1}
157
+
158
+ print("Unique labels:", np.unique(y))
159
+ print("Labeled Metadata Columns:", meta.columns.tolist())
160
+ print("All checks passed.")
161
+ ```
162
+
163
+ The following example loads the unlabeled EMBER Cleaned split and checks that features and metadata are aligned for semi-supervised or exploratory use.
164
+
165
+ ```python
166
+ import numpy as np
167
+ import pandas as pd
168
+
169
+ idx_u = np.load("ember_unlabeled.npz", allow_pickle=True)
170
+ n_rows_u = int(idx_u["_rows"])
171
+ n_features_u = int(idx_u["_features"])
172
+
173
+ X_u = np.fromfile("ember_unlabeled_X.npy", dtype=np.float32)
174
+ assert X_u.size == n_rows_u * n_features_u, (
175
+ f"Unexpected X_u size: got {X_u.size}, expected {n_rows_u * n_features_u}"
176
+ )
177
+ X_u = X_u.reshape(n_rows_u, n_features_u)
178
+
179
+ meta_u = pd.read_parquet("ember_clean_metadata_unlabeled.parquet")
180
+
181
+ print(f"Dataset: {X_u.shape[0]} samples, {X_u.shape[1]} features | " f" unlabeled split: {n_rows_u} samples | " f"metadata columns: {meta_u.shape[1]}")
182
+
183
+ assert X_u.shape == (n_rows_u, n_features_u)
184
+ assert len(meta_u) == n_rows_u
185
+
186
+ if "label_int" in meta_u.columns:
187
+ print("Unlabeled metadata labels:", np.unique(meta_u["label_int"]))
188
+ assert set(np.unique(meta_u["label_int"])) == {-1}
189
+
190
+ print("Unlabeled metadata columns:", meta_u.columns.tolist())
191
+ print("Unlabeled split loaded successfully.")
192
+ ```
193
+
194
+ ## Notebook
195
+
196
+ The repository also includes an exploration notebook in `.ipynb` format, designed to provide additional context on the cleaned dataset, its structure, and its main analytical use cases.
197
+
198
+ The notebook can be used to:
199
+
200
+ - inspect the labeled and unlabeled splits
201
+ - explore metadata fields and label distributions
202
+ - validate dataset consistency
203
+ - review example analyses and downstream use cases
204
+
205
+ To open it locally, run:
206
+
207
+ ```bash
208
+ jupyter notebook EMBER_cleaned_notebook.ipynb
209
+ ```
210
+
211
+ or, if you use JupyterLab:
212
+
213
+ ```bash
214
+ jupyter lab EMBER_cleaned_notebook.ipynb
215
+ ```
216
+
217
+ Make sure to open the notebook from the dataset root directory so that relative file paths resolve correctly.
218
+
219
+
220
+ ## Typical use cases
221
+
222
+ EMBER Cleaned supports:
223
+
224
+ - binary malware detection
225
+ - benchmarking of tabular ML pipelines
226
+ - feature importance analysis
227
+ - semi-supervised learning using the separate unlabeled split
228
+ - exploratory data analysis
229
+ - representation learning and clustering
230
+
231
+ The accompanying notebook includes dataset loading, exploratory analysis, and example use cases focused on discriminative features and model evaluation.
232
+
233
+ ## Notes and limitations
234
+
235
+ This is a static-analysis dataset only.
236
+ The cleaned release contains derived features, not raw PE binaries.
237
+ The unlabeled split should not be treated as ground truth.
238
+ Results on EMBER should not be over-generalized to modern malware without additional validation.
239
+ The dataset is intended for defensive research, benchmarking, and education.
240
+
241
+ ## License
242
+
243
+ This cleaned release is derived from EMBER. The original EMBER data files are associated with the MIT License. Please verify that your downstream redistribution and reuse remain aligned with the original EMBER terms.
244
+
245
+ ## References
246
+
247
+ If you use this dataset, please cite the original EMBER paper:
248
+
249
+ @article{anderson2018ember,
250
+ title={EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models},
251
+ author={Anderson, Hyrum S. and Roth, Phil},
252
+ journal={arXiv preprint arXiv:1804.04637},
253
+ year={2018}
254
+ }
255
+
256
+ ## APA:
257
+
258
+ Anderson, H. S., & Roth, P. (2018). EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models. arXiv. https://doi.org/10.48550/arXiv.1804.04637
259
+
260
+ ## Contacts
261
+ Shared by: ACN