Skip to main content
Magika: AI-Powered Content-Type Detection
  1. publications
  2. ai

Magika: AI-Powered Content-Type Detection

Available Media Publication (PDF) GitHub
Conference International Conference on Software Engineering (ICSE) - 2025
Authors Yanick Fratantonio , Luca Invernizzi , Loua Farah ,
Citation BibTeX
BibTeX
@inproceedings{Fratantonio2025Magika,
  title = {Magika: AI-Powered Content-Type Detection},
  author = {Yanick Fratantonio and Luca Invernizzi and Loua Farah and Kurt Thomas and Marina Zhang and Ange Albertini and Francois Galilee and Giancarlo Metitieri and Julien Cretin and Alex Petit-Bianco and David Tao and Elie Bursztein},
  booktitle = {International Conference on Software Engineering},
  year = {2025},
  organization = {IEEE/ACM}
}

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.

newsletter signup
newsletter signup