Research note · 9 October 2026

My model scored 90%. On a temporal split, it scored 83.8%

Ahmet Turan Taşdelen · 9 October 2026 · about 5 minutes · Project: Şef (Chief-Sef)

In short: The first Chief-Sef model reached 90.1% accuracy on EMBER test data. When I split the same model design by time (training on the first ten months of 2018 and testing on the last two), it scored 83.8%. The gap came not from a bug, but from which weeks the sample was drawn from.

Context

Chief-Sef is an experimental security engine that inspects Windows executables (PE files) before they are run. The model of its first phase is a Random Forest over five static features: file size, zero-byte ratio, mean section entropy, total API count and suspicious API count. The training data is 5,700 malicious and 5,700 benign files from the EMBER 2018 dataset.

This was the third time a measurement misled me. The first model scored 99.9% on synthetic data; because the data came from five fixed scenarios, the model memorised those patterns rather than malicious behaviour. The second scored 97%; because the benign files came from a single computer, the model partly learned "is this file from this machine?". In the first two, the problem was where the data came from. The third was subtler, because this time both classes came from the same source, measured the same way; the problem was time.

What I noticed

I was collecting the sample pool from EMBER's files in order, and the code started from the alphabetically first file (test_features.jsonl). All 11,400 rows came from the first ~34 thousand records of that file, and every one of them was from November 2018. The 80% training / 20% test split happened inside that narrow window.

This is not leakage in the classic sense: the test files were not in the training set. But because they came from the same weeks, sibling samples of the same campaigns and malware families sat on both sides. The model was learning to recognise "this month", not "the future". In real life, a model only ever meets files that arrive after the day it was trained.

How I measured it

I tested the same model with the same five features in three different ways:

EvaluationAccuracyAUC
Same period: 80% / 20% split within November 201890.1%—
Same model, rest of the same file (188,600 records, Nov–Dec)87.4%0.947
Temporal split: train on Jan–Oct, test on Nov–Dec83.8%0.920
Figure 1. The same model, three evaluations. As the test data moves further in time from the training data, accuracy drops; the realistic number to report is the highlighted one. Bars start at 0.

As the window widens and the test data moves further in time from the training data, the number drops. The realistic number to report is the last one. A separate question, how many false alarms the model raises on legitimate files on a real computer (3.5% on 5,700 files never seen in training), is not affected by this finding.

Why it matters

Malware keeps changing: new families, new packers, new campaigns. An evaluation that takes training and test data from the same period never measures how well a model withstands that change. This is a known problem in machine learning for security: the TESSERACT study showed that experiments ignoring time can inflate results considerably, and datasets such as BODMAS are published with timestamps for exactly this reason.

What I changed

I added a rule to the project and corrected the README accordingly:

Three questions for your own model

Transparency

I write the code for this project with AI, using Claude Code. The design of the measurements, the interpretation of the results and the decision about what to publish are mine. The scripts that ran these measurements and the detailed notes are in the Chief-Sef repository: CLAUDE.md (the measurement note and Critical Rule 6) and GELISIM_SURECI.md (both in Turkish).

References