Supporting code for generating the sentences from a context-free grammar, a tree-adjoining grammar (in the indexed grammar class), and a context-sensitive grammar in the folder sentence-generation and Dataset S1 (stats.csv) and Dataset S2 (stats_per_question.csv) in the folder evaluations, for the paper Three tiers of computation in transformers and in brain architectures.
The Three tiers of computation in transformers and in brain architectures proposes computational evaluations, from the formal language perspective, that indicate the computation tier (automata class) of a pre-trained language model (language foundation model). The findings offer potential explanations for the concerns of current approaches of research directions toward more competent and general AI systems, such as those discussed in How AI can achieve human-level intelligence: researchers call for change in tack
This code was run with Python 3.10.15 and with the packages random, os, sys, and time to run the sentence-generation/main.py file.
@misc{graham2025tierscomputationtransformersbrain,
title={Three tiers of computation in transformers and in brain architectures},
author={E Graham and R Granger},
year={2025},
eprint={2503.04848},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2503.04848},
}Additional code contact information:
contact emma.graham.th@dartmouth.edu for
- additional scripts of API calling wrappers
- evaluation scripts and raw model outputs
- visualization scripts