AST-Probe recovers full code syntax trees from a 64-128 dimensional subspace
measured in 1 paperHernandez Lopez et al. extend Hewitt-Manning's structural probe to programming-language abstract syntax trees, fitting an orthogonal subspace projection predicting a (distance, label, marker) tuple convertible to the complete labeled AST [hernandez-lopez-etal-2022-ast-probe] Across five pretrained code/text models plus a random-init control, all five show a significant F1 gap over the baseline across Python, JavaScript, and Go (GraphCodeBERT and CodeBERT best) [hernandez-lopez-etal-2022-ast-probe] The syntactic subspace's dimensionality is 64-128 of 768 ambient dimensions (8-17%), concentrated in middle layers [hernandez-lopez-etal-2022-ast-probe] No causal intervention is performed; the addition rests on the quantified subspace-dimensionality claim [hernandez-lopez-etal-2022-ast-probe]