cs.LGFeb 18, 2026

Synthesis and Verification of Transformer Programs (Technical Report)

Authors: Hongjian Jiang, Matthew Hague, Philipp Rümmer, Anthony Widjaja Lin

Organizations: University of Kaiserslautern-Landau, Germany · Royal Holloway, University of London, England · Uppsala University, Sweden · University of Regensburg, Germany · MPI-SWS, Germany

Abstract

C-RASP is a simple programming language that was recently shown to capture concepts expressible by transformers. In this paper, we develop new algorithmic techniques for automatically verifying C-RASPs. To this end, we establish a connection to the verification of synchronous dataflow programs in Lustre, which enables us to exploit state-of-the-art model checkers utilizing highly optimized SMT-solvers. Our second contribution addresses learning a C-RASP program in the first place. To this end, we provide a new algorithm for learning a C-RASP from examples using local search. We demonstrate efficacy of our implementation for benchmarks of C-RASPs in the literature, in particular in connection to the following applications: (1) transformer program optimization, and (2) constrained learning of transformer programs (based on a partial specification).

Figures & tables

Explore similar work

CardsList
  1. From Expressivity to Sample Complexity: Narrow Teachers for Transformers via C-RASP

    Jul 13, 2026Michael Rizvi-Martel, Satwik Bhattamishra, Guillaume Rabusseau +1TransformerSample Complexity

  2. On the Ability of Transformers to Verify Plans

    Mar 20, 2026Yash Sarrof, Yupei Du, Katharina Stein +3TransformerSymbolic Planning

  3. Length Generalization for Transformers via Compression

    Sep 8, 2026Georg Zetzsche, Hongjian Jiang, Andy Yang +4Transformer ExpressivityTransformer