Neural Decompiling of Tracr Transformers

Hannes Thurnherr, Kaspar Riesen
9/29/2024
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Recently, the transformer architecture has enabled substantial progress in many areas of pattern recognition and machine learning. However, as with other neural network models, there is currently no general method available to explain their inner workings. The present paper represents a first step towards this direction. We utilize \textit{Transformer Compiler for RASP} (Tracr) to generate a large dataset of pairs of transformer weights and corresponding RASP programs. Based on this dataset, we then build and train a model, with the aim of recovering the RASP code from the compiled model. We demonstrate that the simple form of Tracr compiled transformer weights is interpretable for such a decompiler model. In an empirical evaluation, our model achieves exact reproductions on more than 30\% of the test objects, while the remaining 70\% can generally be reproduced with only few errors. Additionally, more than 70\% of the programs, produced by our model, are functionally equivalent to the ground truth, and therefore a valid decompilation of the Tracr compiled transformer weights.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{thurnherr2024neural,
  title  = {Neural Decompiling of Tracr Transformers},
  author = {Hannes Thurnherr and Kaspar Riesen},
  year   = {2024},
  eprint = {2410.00061},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.00061v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.00061.svg)](https://codeofpaper.com/paper/2410.00061)

Discussion