Start with the data contract
Before choosing a model, define what one row represents, where it came from, which time window it covers, how labels were produced, and which fields may contain sensitive information. Security datasets often combine systems with different clocks, sampling rates, and retention rules.
A clean dataframe does not guarantee trustworthy data. Look for duplicated events, impossible timestamps, missing labels, post-incident fields that leak the answer, and class distributions that differ from production.
- Grain: one login, one flow, one alert, or one user-day.
- Provenance: sensor, query, export time, and owner.
- Label: rule, analyst judgment, incident outcome, or synthetic tag.
- Leakage: fields created after the event that reveal the class.
- Privacy: identifiers that should be removed, hashed, or aggregated.