{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/knee-deep-in-c-rasp-a-transformer-depth","title":"Knee-Deep in C-RASP: A Transformer Depth Hierarchy","arxiv_id":"2506.16055","date":"2025-06-19","proceeding":null,"authors":["Andy Yang","Michaël Cadilhac","David Chiang"],"abstract":"It has been observed that transformers with greater depth (that is, more layers) have more capabilities, but can we establish formally which capabilities are gained with greater depth? We answer this question with a theoretical proof followed by an empirical study. First, we consider transformers that round to fixed precision except inside attention. We show that this subclass of transformers is expressively equivalent to the programming language C-RASP and this equivalence preserves depth. Second, we prove that deeper C-RASP programs are more expressive than shallower C-RASP programs, implying that deeper transformers are more expressive than shallower transformers (within the subclass mentioned above). These results are established by studying a form of temporal logic with counting operators, which was shown equivalent to C-RASP in previous work. Finally, we provide empirical evidence that our theory predicts the depth required for transformers without positional encodings to length-generalize on a family of sequential dependency tasks.","url_abs":"https://arxiv.org/abs/2506.16055v1","url_pdf":"https://arxiv.org/pdf/2506.16055v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"knee-deep-in-c-rasp-a-transformer-depth","repo_url":"https://github.com/pentagonalize/crasp_depth","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2506.16055","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.16055"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pentagonalize/crasp_depth","reach":{"status":"ok"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":6,"samples":[{"code_sha256_prefix":"f1461acb60c1d702","entry":"generate_ab","repo":"pentagonalize/crasp_depth","repo_kind":"official","path":"generate_data.py","file_url":"https://github.com/pentagonalize/crasp_depth/blob/HEAD/generate_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f1461acb60c1d702"}},{"code_sha256_prefix":"552cfc2c9440d8d2","entry":"generate_strings","repo":"pentagonalize/crasp_depth","repo_kind":"official","path":"generate_data.py","file_url":"https://github.com/pentagonalize/crasp_depth/blob/HEAD/generate_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"552cfc2c9440d8d2"}},{"code_sha256_prefix":"48656611382046ea","entry":"get_accuracy_field_name","repo":"pentagonalize/crasp_depth","repo_kind":"official","path":"make_latex_tables.py","file_url":"https://github.com/pentagonalize/crasp_depth/blob/HEAD/make_latex_tables.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"48656611382046ea"}},{"code_sha256_prefix":"88113dba8e0f4e8e","entry":"get_range_label","repo":"pentagonalize/crasp_depth","repo_kind":"official","path":"make_latex_tables.py","file_url":"https://github.com/pentagonalize/crasp_depth/blob/HEAD/make_latex_tables.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"88113dba8e0f4e8e"}},{"code_sha256_prefix":"69bcc82aaba999a3","entry":"get_range_label","repo":"pentagonalize/crasp_depth","repo_kind":"official","path":"parse_logs.py","file_url":"https://github.com/pentagonalize/crasp_depth/blob/HEAD/parse_logs.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"69bcc82aaba999a3"}},{"code_sha256_prefix":"5880d8f69fc7a1d3","entry":"parse_test_ranges","repo":"pentagonalize/crasp_depth","repo_kind":"official","path":"make_latex_tables.py","file_url":"https://github.com/pentagonalize/crasp_depth/blob/HEAD/make_latex_tables.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5880d8f69fc7a1d3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}