File-type detection determines how software should interpret an arbitrary sequence of bytes. Magika approaches this task with a small deep-learning model that runs on a single CPU and requires about 1 MB for its weights.
The paper evaluates the initial model across more than a hundred content types and over a million test files, reporting an average F1 score of 99%. Applications include routing attachments to the right security scanners and helping analysts understand unfamiliar files. The model and training pipeline are available as open source.