SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.16367 · 2024

Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformers

arXiv · PDF · Open in the Atlas

Code that ran

10 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 5 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 6 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2404.16367.json · badge: /api/ran/2404.16367.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
kabirahuja2431/transformers-hg canonical (classifier label)
classifier basis: census
10 ran · 6 no recorded run
FunctionStatusWhere it lives
ensure_valid_input Ran
ran; our contract draft was wrong, not the code
kabirahuja2431/transformers-hg/transformers/src/transformers/convert_graph_to_onnx.py
pointer only (licence: NONE) · get_code("b220e701be05a184")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

gelu_fast Ran
ran, honoured the contract we drafted
kabirahuja2431/transformers-hg/transformers/src/transformers/activations_tf.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("37a5eed2dbd663ca")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_identified_filename Ran
ran; our contract draft was wrong, not the code
kabirahuja2431/transformers-hg/transformers/src/transformers/convert_graph_to_onnx.py
pointer only (licence: NONE); the stored copy get_code serves, from UW-Madison-Lee-Lab/looped-tf, is pointer only (licence: NONE) · get_code("7efe3db5c9e2f94d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_config_class_from_processor_class Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kabirahuja2431/transformers-hg/transformers/utils/create_dummy_models.py
pointer only (licence: NONE); the stored copy get_code serves, from takagi97/OXA-Fine-tuning, is pointer only (licence: NONE) · get_code("3d999b95009c7537")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_processor_types_from_config_class Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kabirahuja2431/transformers-hg/transformers/utils/create_dummy_models.py
pointer only (licence: NONE); the stored copy get_code serves, from takagi97/OXA-Fine-tuning, is pointer only (licence: NONE) · get_code("0c0b81b081919d8e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

hertz_to_mel Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kabirahuja2431/transformers-hg/transformers/src/transformers/audio_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("9a09cbf63a4ddff4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mel_filter_bank Ran
ran, honoured the contract we drafted
kabirahuja2431/transformers-hg/transformers/src/transformers/audio_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("7e7c601df5b22499")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mel_to_hertz Ran
ran, honoured the contract we drafted
kabirahuja2431/transformers-hg/transformers/src/transformers/audio_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("2650530d2f0dd9b2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mish Ran
ran, honoured the contract we drafted
kabirahuja2431/transformers-hg/transformers/src/transformers/activations_tf.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("cc8c8c3ebf0c343f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

quick_gelu Ran
ran, honoured the contract we drafted
kabirahuja2431/transformers-hg/transformers/src/transformers/activations_tf.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("e2d56cb91f999bef")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_architectures_from_config_class Not yet run
unverified (harvested, no recorded run)
kabirahuja2431/transformers-hg/transformers/utils/create_dummy_models.py
pointer only (licence: NONE); the stored copy get_code serves, from takagi97/OXA-Fine-tuning, is pointer only (licence: NONE) · get_code("b176efb26f72e507")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_base_transformer_cls Not yet run
unverified (harvested, no recorded run)
kabirahuja2431/transformers-hg/train_transformers.py
pointer only (licence: NONE) · get_code("e8d8bcdc4e03a8ce")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_base_transformer_lm Not yet run
unverified (harvested, no recorded run)
kabirahuja2431/transformers-hg/train_transformers.py
pointer only (licence: NONE) · get_code("da751511d95929df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_base_transformer_model Not yet run
unverified (harvested, no recorded run)
kabirahuja2431/transformers-hg/train_transformers.py
pointer only (licence: NONE) · get_code("a715ee364bed25a3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_configuration_file Not yet run
unverified (harvested, no recorded run)
kabirahuja2431/transformers-hg/transformers/src/transformers/configuration_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("dd3166a87bc972ff")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

infer_shapes Not yet run
unverified (harvested, no recorded run)
kabirahuja2431/transformers-hg/transformers/src/transformers/convert_graph_to_onnx.py
pointer only (licence: NONE) · get_code("0da835817b8a57bc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kabirahuja2431/transformers-hg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 13 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 0 the same month, 13 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_config_class_from_processor_class 27 other papers
9 dated earlier, 16 later, 2 same year, order not determinable
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2308.12219 (2023-08)
Diffusion Language Models Can Perform Many Tasks with Scaling and Instruction-Finetuning
2311.07468 (2023-11)
An Analysis and Mitigation of the Reversal Curse
and 24 more not named here
get_architectures_from_config_class 25 other papers
8 dated earlier, 16 later, 1 same year, order not determinable
2308.12219 (2023-08)
Diffusion Language Models Can Perform Many Tasks with Scaling and Instruction-Finetuning
2311.07468 (2023-11)
An Analysis and Mitigation of the Reversal Curse
2312.15710 (2023-12)
Alleviating Hallucinations of Large Language Models through Induced Hallucinations
and 22 more not named here
get_processor_types_from_config_class 25 other papers
8 dated earlier, 16 later, 1 same year, order not determinable
2308.12219 (2023-08)
Diffusion Language Models Can Perform Many Tasks with Scaling and Instruction-Finetuning
2311.07468 (2023-11)
An Analysis and Mitigation of the Reversal Curse
2312.15710 (2023-12)
Alleviating Hallucinations of Large Language Models through Induced Hallucinations
and 22 more not named here
mish 25 other papers
19 dated earlier, 5 later, 1 same year, order not determinable
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2104.08400 (2021-04)
Structure-Aware Abstractive Conversation Summarization via Discourse and Action Graphs
2106.00420 (2021-06)
Dialogue-oriented Pre-training
and 22 more not named here
gelu_fast 19 other papers
13 dated earlier, 5 later, 1 same year, order not determinable
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2110.04366 (2021-10)
Towards a Unified View of Parameter-Efficient Transfer Learning
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 16 more not named here
quick_gelu 16 other papers
10 dated earlier, 5 later, 1 same year, order not determinable
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2202.00666 (2022-02)
Locally Typical Sampling
2211.05392 (2022-11)
EVENTS REALM: Event Reasoning of Entity States via Language Models
and 13 more not named here
ensure_valid_input 14 other papers
12 dated earlier, 2 later
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 11 more not named here
generate_identified_filename 14 other papers
12 dated earlier, 2 later
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 11 more not named here
infer_shapes 14 other papers
12 dated earlier, 2 later
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 11 more not named here
get_configuration_file 11 other papers
8 dated earlier, 3 later
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2202.00666 (2022-02)
Locally Typical Sampling
2211.05392 (2022-11)
EVENTS REALM: Event Reasoning of Entity States via Language Models
and 8 more not named here
hertz_to_mel 5 other papers
2 dated earlier, 2 later, 1 same year, order not determinable
2311.07468 (2023-11)
An Analysis and Mitigation of the Reversal Curse
2024.findings-naacl.117 (2024 (year only))
Mitigating Hallucination in Abstractive Summarization with Domain-Conditional Mutual Information
2402.18223 (2024-02)
Improving Open-Ended Text Generation via Adaptive Decoding
and 2 more not named here
mel_to_hertz 5 other papers
2 dated earlier, 2 later, 1 same year, order not determinable
2311.07468 (2023-11)
An Analysis and Mitigation of the Reversal Curse
2024.findings-naacl.117 (2024 (year only))
Mitigating Hallucination in Abstractive Summarization with Domain-Conditional Mutual Information
2402.18223 (2024-02)
Improving Open-Ended Text Generation via Adaptive Decoding
and 2 more not named here
mel_filter_bank 4 other papers
1 dated earlier, 2 later, 1 same year, order not determinable
2311.07468 (2023-11)
An Analysis and Mitigation of the Reversal Curse
2024.findings-naacl.117 (2024 (year only))
Mitigating Hallucination in Abstractive Summarization with Domain-Conditional Mutual Information
2410.12178 (2024-10)
Model Balancing Helps Low-data Training and Fine-tuning
and 1 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Transformers trained on natural language data have been shown to learn its hierarchical structure and generalize to sentences with unseen syntactic structures without explicitly encoding any structural bias. In this work, we investigate sources of inductive bias in transformer models and their training that could cause such generalization behavior to emerge. We extensively experiment with transformer models trained on multiple synthetic datasets and with different training objectives and show that while other objectives e.g. sequence-to-sequence modeling, prefix language modeling, often failed to lead to hierarchical generalization, models trained with the language modeling objective consistently learned to generalize hierarchically. We then conduct pruning experiments to study how transformers trained with the language modeling objective encode hierarchical structure. When pruned, we find joint existence of subnetworks within the model with different generalization behaviors (subnetworks corresponding to hierarchical structure and linear order). Finally, we take a Bayesian perspective to further uncover transformers' preference for hierarchical generalization: We establish a correlation between whether transformers generalize hierarchically on a dataset and whether the simplest explanation of that dataset is provided by a hierarchical grammar compared to regular grammars exhibiting linear generalization.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2404.16367")
get_code_for_paper("2404.16367")
have("2404.16367")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2404.16367.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2404.16367.svg)](https://syntology.ai/paper/2404.16367)

Connect an agent — have() is free.