An Adversarial Benchmark for Firearm Detection in 3D Printing

Four-panel illustration of a 3D printer printing an object; in the final panel a STOP sign blocks a firearm-shaped print.

A defensive benchmark for flagging 3D-printable regulated firearm parts at the slicer stage.

3D printers can now produce functional firearms parts directly from a digital model, with no specialized skill or equipment. These "ghost guns" are cheap, unregistered, untraceable, and often invisible to the metal detectors in schools, theaters, and airports. Seizures of 3D-printed firearms by the NYPD rose from about 100 in 2019 to over 600 in 2022, reaching roughly 10% of all weapons seized in 2024, and they are now considered one of the fastest-growing threats to public safety.

States like New York and others are passing legislation requiring firearm-blocking technology at different stages of the 3D-printing pipeline. At the same time, private institutions like schools, universities, or individual manufacturers are considering implementing such measures on their own.

These decisions are made by people with limited technical background, who may reasonably worry: do we actually have the technology to enforce this? The purpose of this public code repository is to answer that question. While no detector is perfect, and there will always be room for research on more robust and efficient techniques, the technology is — and indeed has long been — here.

Caveats and assumptions

Before we jump into the conclusions, we must acknowledge some assumptions that this simplified project is making:

How this benchmark works

This benchmark has three components: a dataset, simulated adversaries, and simulated detectors.

An adversary is an agent that tries to evade detection by modifying a device's file while keeping it printable — for example, by re-posing it (rotation and translation), adding small random noise to its surface, completely re-meshing it (rebuilding the surface from scratch so the underlying file is entirely different), reordering the data inside the file (no change to the shape, but a different digital fingerprint), appending broken or invalid geometry meant to crash a careless checker.

A detector is a method that looks at a (possibly adversary-modified) geometry and decides whether it is one of the Glock MCDs in the dataset or not. We implement four key detectors:

Finally, the dataset is private and contains, for now, 28 Glock MCDs, each in the form it comes in at the slicer. After applying all of the adversaries' modifications, this results in about 9,200 malign shapes and 4,400 benign shapes. As is traditional in benchmarks like these, we split the data into training data (which the models may look at beforehand) and held-out evaluation data — 1,000 benign and roughly 4,000 malign shapes, about 5,000 shapes the models never see. Every metric we report is computed on that held-out set.

Results

DetectorApproachAccuracy (AUC)Time / file
Geometric signaturegeometry / math1.0000107 ms
AI-driven 2D classifierAI (images)0.9989119 ms
AI-driven 3D classifierAI (point cloud)0.993846 ms
File hashingindustry status quo0.501 ms

The accuracy reported above is the "area under the curve", the traditional metric for evaluating binary classifiers: 1.0 is perfect, while 0.5 is as good as a coin flip. The geometric signature is essentially perfect: a 1.0000 AUC (0.99999809), raising zero false alarms across all 1,000 benign models and missing only 2 of the ~4,000 evaluation devices. Crucially, no single adversary manages to pull any of the three real detectors below ~99% accuracy. And detection is fast: from about 1 millisecond per file for hashing to roughly 50–120 milliseconds for the geometry and AI methods — comfortably within the budget of a model upload or a slicing step, so screening adds no perceptible delay.

Conclusion

The technology is there. Even the most basic baselines (a decades-old geometric signature and standard off-the-shelf neural networks that are well obsolete by now) reach near-perfect accuracy, and they do so on a small dataset, under active disguise. Every method here was trained and evaluated on a single MacBook Air, with a fraction of the data and compute available to an industry lab, a government, or even most volunteer-run open-source projects.

If a working detector is this reachable (on a laptop, by a small academic team, with limited data) then the technology to underpin these emerging policies is well within reach. The open question is no longer whether it can be done, but how to standardize, govern, and scale it responsibly.

Limitations

This shows the technology is there; of course, this is a prototype, and it still lacks important components one would need before deployment: