Inference Forensics Discuss a matter

Insights

AI Reverse Engineering and AI Forensics: Same Tools, Different Questions

Reverse engineering reconstructs mechanisms. Forensics reconstructs events. Disputes over AI decisions will need both.

I keep hearing a reasonable question from colleagues on both sides of my work. Security people ask whether AI forensics is simply reverse engineering applied to models. Machine learning researchers ask whether interpretability already does what forensics promises. Both questions treat the two fields as one, and that confusion has practical costs once an AI decision ends up in a dispute.

Digital forensics and incident response (DFIR) practitioners already know the distinction from malware work. A reverse engineer pulls a sample apart and tells you what it can do: how it persists and where it beacons. The incident responder has to establish what it actually did on this host, on this date, and what the artifacts can prove. Both use disassemblers. Nobody confuses the two reports.

AI is heading toward the same split, and it helps to name it before the tooling blurs it.

Two objectives

AI reverse engineering aims to understand how a system works. You take an existing model apart, conceptually or technically, to reconstruct its architecture, internal representations, computational mechanisms or learned behaviour.

AI forensics aims to establish what happened in a particular incident or disputed decision, and what the evidence can support about why.

The line between them is the objective. The technique can be identical.

One rejected claim, two investigations

Take an AI system that wrongly rejects an insurance claim.

The reverse engineer asks which internal features and pathways produce rejections of this kind. The answer is general. It describes the model.

The forensic investigator asks a narrower question. Which inputs, model version, system instructions, retrieved documents and execution steps contributed to this rejection of this claim, and which of those contributions can be demonstrated from preserved evidence? The answer is specific. It describes an event.

A third discipline sits nearby. An auditor asks whether the model systematically rejects certain categories of claims incorrectly or unfairly. That is a population question, answered with statistics over many decisions. It can flag a pattern without explaining any single case.

Access does not draw the line

A common shortcut says reverse engineering needs the weights or source code, while forensics works from logs. Neither half holds.

Reverse engineering can be done entirely through a query interface. Tramèr and colleagues showed in 2016 that models offered through commercial prediction application programming interfaces (APIs) could be extracted with near-perfect fidelity. In 2024, Carlini and colleagues recovered the entire embedding projection matrix of OpenAI's Ada and Babbage models through ordinary API access for under 20 US dollars, confirming hidden dimensions that had never been disclosed. That is reverse engineering of a proprietary system with no weights in hand.

Forensics, in turn, can go inside the model. When weights or activations are available and relevant to the question, an investigator should examine them. In the process model for AI forensics that Sajad Homayoun and I published in 2026, white-, grey- and black-box access are conditions that shape an investigation. None of them places an investigation outside the field.

Mechanistic interpretability is the established research area closest to the popular image of taking a model apart and reading its computation. Reverse engineering is broader. It also covers recovering the architecture and parameters of proprietary systems, which interpretability researchers rarely attempt.

Mechanism is general, evidence is specific

Lawyers distinguish general causation from specific causation. General causation asks whether a substance can cause a disease. Specific causation asks whether it caused this plaintiff's disease. Courts expect both, and proof of the first never substitutes for the second.

Reverse engineering produces general causation for AI systems. Forensics has to produce specific causation. The gap between them is wider than it looks, for two reasons both communities should take seriously.

The first is that today's mechanistic tools are partial even on their own terms. Anthropic's 2025 attribution graph study of Claude 3.5 Haiku reported satisfying insight for about a quarter of the prompts the authors tried, and the analysis runs on a replacement model that only approximates the original. That is honest science and valuable work. It is also a long way from an error rate a forensic expert could defend under cross-examination for a single decision.

The second is that the deployed system is larger than the model and does not run the same way twice. The rejected claim passed through a system prompt, a retrieval step, possibly tool calls and business rules, and sampling settings chosen by the deploying company. A perfect account of the weights says nothing about which policy document the retriever fetched that afternoon. Replay is also weaker evidence than most people assume. Thinking Machines Lab showed in 2025 that many inference endpoints are nondeterministic even at temperature zero, mainly because batch size changes with server load and common kernels are not batch invariant. An investigator who re-runs the claim and gets the same rejection has shown that the system can produce that output. They have not shown that the original decision followed the same path.

Where reverse engineering serves forensics

This is where the two fields meet productively, particularly when investigators have limited access to a proprietary model.

The first forensic question in many AI disputes is which model produced the output. Vendors update and reroute models without notice, and deploying companies often cannot say what ran on a given day. Fingerprinting is reverse engineering aimed at exactly this question. LLMmap, presented at USENIX Security 2025, identified 42 large language model (LLM) versions with over 95 percent accuracy from as few as eight queries. A technique like that, validated and documented, can corroborate or challenge a party's account of which version was live.

Architecture recovery can test a vendor's description of its own system. Mechanistic analysis can generate hypotheses about why a class of decisions goes wrong, which the investigator then tests against the preserved records of the actual case.

Two conditions apply. The output enters the forensic report as corroboration with its error rate stated, the way a malware analyst's capability assessment supports an intrusion timeline without replacing it. The investigator also needs authority to probe. The LLMmap authors themselves note that fingerprinting a third party's application may breach terms of service or confidentiality agreements. An investigation that creates its own legal problem has helped nobody.

What each community could do next

For machine learning researchers, the useful question is transfer. Under what conditions does a mechanism found in a lab replay hold for a logged production decision made with different context and a different batch? Interpretability results that report those conditions become usable as evidence. Results that do not will stay in papers.

For DFIR practitioners, the task is to build AI reverse engineering into casework the way malware analysis was built in: a specialist layer with documented methods and known error rates, feeding an investigation that still rests on artifacts preserved from the deployment.

Reverse engineering reconstructs mechanisms. Forensics reconstructs events and tests what the evidence can support. Disputes over AI decisions will need both, and the reports will be stronger when each says plainly which question it answered.

References

  • Tramèr, F., Zhang, F., Juels, A., Reiter, M. K., and Ristenpart, T. Stealing Machine Learning Models via Prediction APIs. USENIX Security 2016. usenix.org
  • Carlini, N., et al. Stealing Part of a Production Language Model. ICML 2024. proceedings.mlr.press
  • Lindsey, J., et al. On the Biology of a Large Language Model. Anthropic, Transformer Circuits Thread, March 2025. transformer-circuits.pub
  • He, H., and Thinking Machines Lab. Defeating Nondeterminism in LLM Inference. Connectionism, September 2025.
  • Pasquini, D., Kornaropoulos, E. M., and Ateniese, G. LLMmap: Fingerprinting for Large Language Models. USENIX Security 2025. usenix.org
  • Dehghantanha, A., and Homayoun, S. AI Forensics Across White-, Grey-, and Black-Box Access: A Process Model and Research Agenda for Post-Incident Investigation of AI Systems. 2026. arXiv:2608.03520

Related: What is AI forensics? A definition · Post-incident investigation

If an AI decision in your organization will one day be examined, start the record now.

Contact us