What the 99% Does—and Does Not—Mean
Magika's headline accuracy is meaningful only when its denominator and operating conditions remain visible. This chapter reads the evidence behind the reported 99 percent through the initial test set, per-type F1, comparison scope, timing method, and known failure cases. The practical outcome is a deployment boundary: readers should be able to decide when the benchmark is informative for their workload, when it needs local re-evaluation, and when a fast type label must be followed by independent validation.
What the benchmark actually measured
The ICSE study evaluated Magika on a held-out test benchmark of about 1.2 million samples spanning 113 canonical content types. The dataset was intentionally balanced by type, so the average was built from per-type behavior rather than from the frequency of files in one platform's natural traffic. The test samples were not used to train the model or to choose its hyperparameters and thresholds. That separation gives the result a credible interpretation within the study: it measures performance on unseen examples from the study's selected categories under the study's labeling process.
The paper reports an average F1 score of 99 percent overall. F1 combines precision and recall: precision asks how often a type label is correct when emitted, while recall asks how much of the true class the detector finds. Averaging F1 per content type gives each class a voice in the summary. That is different from simply dividing all correct predictions by all files. A detector could perform extremely well on common classes and poorly on rare ones while still posting a strong pooled accuracy; the balanced, per-type calculation makes that trade-off harder to hide.
F1 is still not the probability that an arbitrary file will be labeled correctly. It is an average over a defined set of class-level measurements. A deployment with a different mix of files should weight the relevant per-type behavior by its own frequencies. A service that sees mostly PDFs will experience a different aggregate error rate from one that sees mostly source code, archives, or unknown binary data, even if both use the same model and mode.
It also compresses two failure patterns into one number. A class can have high precision but low recall: when Magika names it, the label is usually right, but many files of that class are left generic or assigned elsewhere. Another class can have high recall but lower precision: most of its true examples are found, but the label also attracts confusing neighbors. Both classes might produce similar F1 values while creating very different operational problems. A security router that must avoid sending non-PDF files into a PDF-only path may care more about precision; an indexing service trying to reduce the generic bucket may care more about recall. The score becomes useful only after that error shape is connected to the action taken.
The test-set split provides another kind of confidence. Because the test samples were withheld from training and threshold selection, the study avoids the most direct form of measuring on examples used to tune the system. It does not guarantee that the test set represents every organization, file producer, encoding, or attacker.