File size: 9,434 Bytes
432fd0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67530ed
432fd0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e22344d
432fd0c
 
e22344d
 
 
432fd0c
 
 
 
 
 
 
 
 
 
 
 
67530ed
 
 
432fd0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e22344d
432fd0c
 
67530ed
 
 
432fd0c
 
67530ed
 
 
432fd0c
 
 
 
 
 
 
 
 
 
 
 
 
 
67530ed
432fd0c
 
 
67530ed
 
432fd0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e22344d
432fd0c
 
 
e22344d
 
432fd0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67530ed
 
432fd0c
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
---
annotations_creators:
- machine-generated
language:
- en
license: odc-by
multilinguality:
- monolingual
size_categories:
- 10M<n<100M
source_datasets:
- HuggingFaceFW/fineweb
task_categories:
- text-generation
- text-classification
task_ids: []
pretty_name: RedSage-CFW Full (Dedup)
tags:
- cybersecurity
- pretraining
- continual-pretraining
- fineweb
- common-crawl
- deduplication
- datatrove
dataset_info:
  features:
  - name: probability
    dtype: float64
  - name: relevant
    dtype: bool
  - name: text
    dtype: string
  - name: id
    dtype: string
  - name: dump
    dtype: string
  - name: url
    dtype: string
  - name: date
    dtype: string
  - name: file_path
    dtype: string
  - name: language
    dtype: string
  - name: language_score
    dtype: float64
  - name: token_count
    dtype: int64
  - name: idx
    dtype: int64
configs:
- config_name: default
  data_files:
  - split: train
    path: "*.jsonl.gz"
---

# Dataset Card for RedSage-CFW Full (Dedup)

<p align="center">
  <b> "RedSage: A Cybersecurity Generalist LLM" (ICLR 2026). </b>
  <br>
  <b>Authors:</b> Naufal Suryanto<sup>1</sup>, Muzammal Naseer<sup>1†</sup>, Pengfei Li<sup>1</sup>, Syed Talal Wasim<sup>2</sup>, Jinhui Yi<sup>2</sup>, Juergen Gall<sup>2</sup>, Paolo Ceravolo<sup>3</sup>, Ernesto Damiani<sup>3</sup>
  <br>
  <sup>1</sup>Khalifa University, <sup>2</sup>University of Bonn, <sup>3</sup>University of Milan  
  <br>
  <sup>†</sup>Project Lead
  <br>
  <br>
  <a href="https://openreview.net/forum?id=W4FAenIrQ2"><img src="https://img.shields.io/badge/Paper-OpenReview-B31B1B.svg"></a>
  <a href="https://huggingface.co/RISys-Lab"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-RISys--Lab-orange"></a>
  <br>
  🌐 <a href="https://risys-lab.github.io/RedSage/">Project Page</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  🤖 <a href="https://huggingface.co/collections/RISys-Lab/redsage-models">Model Collection</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  📊 <a href="https://huggingface.co/collections/RISys-Lab/redsage-benchmarks">Benchmark Collection</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  📘 <a href="https://huggingface.co/collections/RISys-Lab/redsage-datasets">Data Collection</a>
</p>

****

## Dataset Description

- **Developed by:** RISys-Lab
- **Repository:** [GitHub](https://github.com/RISys-Lab/RedSage)
- **Paper:** [RedSage: A Cybersecurity Generalist LLM (ICLR 2026)](https://openreview.net/forum?id=W4FAenIrQ2)
- **Arxiv:** https://arxiv.org/abs/2601.22159
- **Curated 5-Chunk Pretraining Release:** [RISys-Lab/RedSage-CFW](https://huggingface.co/datasets/RISys-Lab/RedSage-CFW)
- **Raw Non-Deduplicated Release:** [RISys-Lab/RedSage-CFW-Full-NonDedup](https://huggingface.co/datasets/RISys-Lab/RedSage-CFW-Full-NonDedup)

### Dataset Summary

**RedSage-CFW Full (Dedup)** is the globally deduplicated cybersecurity web corpus extracted from **FineWeb** across all 103 Common Crawl dumps from **CC-MAIN-2013-20** through **CC-MAIN-2024-51**.

Starting from the raw \~122.15M classified documents (\~89.8B tokens), this corpus was processed using global MinHash-LSH deduplication via Hugging Face's `datatrove` library, removing \~47.9% redundant tokens across dumps. The result is packaged as 40 sharded `jsonl.gz` files totaling \~88.8 GB of compressed data, containing clean, deduplicated domain-specific text spanning over a decade of public cybersecurity discourse.

> **Note on CFW Versions:**
> - **[RedSage-CFW Full (Non-Dedup)](https://huggingface.co/datasets/RISys-Lab/RedSage-CFW-Full):** Complete raw classifier outputs across 103 dumps (122.15M rows, \~267 GB Parquet). No deduplication applied.
> - **[RedSage-CFW Full (Dedup)](https://huggingface.co/datasets/RISys-Lab/RedSage-CFW-Full-Dedup) [This Dataset]:** Complete full-span filtered corpus after global MinHash-LSH deduplication (40 compressed `jsonl.gz` shards, \~88.8 GB compressed). No general replay mixed.
> - **[RedSage-CFW](https://huggingface.co/datasets/RISys-Lab/RedSage-CFW):** The final training-ready corpus combining the latest 5 chronological chunks with MinHash deduplication and 30% FineWeb-Edu general knowledge replay (\~13M documents, \~11.7B tokens).

### Supported Tasks

- **Continual Domain Pretraining:** Train or continue pretraining foundational LLMs on clean, non-redundant cybersecurity web text.
- **Custom Replay & Mixing Experiments:** Mix with custom general-purpose datasets (e.g., FineWeb-Edu, SlimPajama) at bespoke ratios without pre-baked replay constraints.
- **Cybersecurity Text Evolution & Corpus Linguistics:** Track the emergence of domain-specific terminology, public security disclosures, and changing community practices across more than ten years of web discourse.

### Languages

The dataset consists primarily of English text filtered from the FineWeb Common Crawl archive.

---

## Dataset Structure

### Data Instances

The dataset is partitioned into 40 compressed JSON Lines files (`00000.jsonl.gz` to `00039.jsonl.gz`). Each JSON record represents a unique deduplicated document identified as cybersecurity-relevant.

### Data Fields

The dataset contains the following 12 fields per record:

- **`probability`** (*float*): Confidence score generated by the ModernBERT cybersecurity classifier.
- **`relevant`** (*bool*): Binary classification flag (`true`/`false`) confirming domain relevance.
- **`text`** (*string*): Full extracted text of the document.
- **`id`** (*string*): Unique Common Crawl URN document identifier (e.g., `<urn:uuid:...>`).
- **`dump`** (*string*): Source Common Crawl snapshot identifier (e.g., `CC-MAIN-2024-51`).
- **`url`** (*string*): Source web URL.
- **`date`** (*string*): Crawl / publication timestamp string.
- **`file_path`** (*string*): Source path within the FineWeb archive.
- **`language`** (*string*): Detected language tag (e.g., `en`).
- **`language_score`** (*float*): Confidence score from the language identifier.
- **`token_count`** (*int*): Document token count.
- **`idx`** (*int*): Record index identifier.

### Files & Storage Summary

The corpus is packaged into 40 gzipped JSONL files totaling approximately **88.8 GB compressed**:

| File Range | Shard Count | Total Compressed Size | Format |
| :--- | :--- | :--- | :--- |
| `00000.jsonl.gz` – `00039.jsonl.gz` | 40 shards | \~88.8 GB | Gzip-compressed JSONL (`.jsonl.gz`) |

---

## Usage

### Loading via `datasets`

```python
from datasets import load_dataset

# Load a specific shard
shard_0 = load_dataset(
    "RISys-Lab/RedSage-CFW-Full-Dedup",
    data_files="00000.jsonl.gz",
    split="train"
)
print(shard_0[0])

# Stream across the entire deduplicated dataset
full_stream = load_dataset(
    "RISys-Lab/RedSage-CFW-Full-Dedup",
    split="train",
    streaming=True
)

for sample in full_stream:
    print(sample["id"], sample["token_count"])
    break
```

### Processing Directly in Python

```python
import gzip
import json

with gzip.open("00000.jsonl.gz", "rt", encoding="utf-8") as f:
    for line in f:
        doc = json.loads(line)
        print(doc["id"], doc["probability"])
        break
```

---

## Dataset Creation

### Curation Rationale

Continual pretraining on redundant web documents can degrade training efficiency and trigger verbatim memorization. While `RedSage-CFW Full (Non-Dedup)` provides the complete raw classifier outputs for cross-crawl auditing, this deduplicated release provides a cleaner, computation-ready base across the entire 2013–2024 time span.

### Source Data

- **Base Corpus:** [HuggingFaceFW/fineweb](https://huggingface.co/datasets/HuggingFaceFW/fineweb), aggregated across 103 Common Crawl snapshots between 2013 and 2024 (\~17.2T tokens).

### Data Processing Pipeline

1. **Classifier Filtering:** A binary classifier based on **ModernBERT-base** (achieving 97.3% validation accuracy) was run across 103 FineWeb dumps, retrieving \~122.15M cybersecurity-relevant documents (\~89.8B tokens).
2. **Global Deduplication:** MinHash-LSH was executed across the corpus using **DataTrove**, identifying and removing duplicate and near-duplicate text. This reduced total token volume by \~47.9%.
3. **Partitioning:** The deduplicated records were serialized into 40 gzip-compressed JSON Lines shards (`.jsonl.gz`).

---

## Considerations for Using the Data

### Social Impact

This dataset provides an accessible, non-redundant training resource for developing open-source cybersecurity foundational models, transparent assistants, and automated defensive tooling.

### Discussion of Biases and Limitations

- **Source Biases:** As with all web-scale scrapes, the dataset contains informal syntax, forum noise, and potential biases from public discussions.
- **Dual-Use Considerations:** Contains authentic technical discussions, exploit mechanics, and vulnerability disclosures. Safe deployment requires post-training alignment and guardrails.

---

## Citation

```bibtex
@inproceedings{suryanto2026redsage,
  title={RedSage: A Cybersecurity Generalist {LLM}},
  author={Naufal Suryanto and Muzammal Naseer and Pengfei Li and Syed Talal Wasim and Jinhui Yi and Juergen Gall and Paolo Ceravolo and Ernesto Damiani},
  booktitle={The Fourteenth International Conference on Learning Representations},
  year={2026},
  url={https://openreview.net/forum?id=W4FAenIrQ2}
}
```

### Acknowledgements

Global deduplication was conducted using the open-source [datatrove](https://github.com/huggingface/datatrove) library.