A Polar coordinate system represents syntax in large language models

Authors: pablo  diego-simón
stéphane d ' ascoli
emmanuel  chemla
yair  lakretz
jean-rémi  king
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 19:16:04

Abstract: Originally formalized with symbolic representations, syntactic trees may also be effectively represented in the activations of large language models (LLMs). Indeed, a ''Structural Probe'' can find a subspace of neural activations, where syntactically-related words are relatively close to one-another. However, this syntactic code remains incomplete: the distance between the Structural Probe word embeddings can represent the \emph{existence} but not the type and direction of syntactic relations. Here, we hypothesize that syntactic relations are, in fact, coded by the relative direction between nearby embeddings. To test this hypothesis, we introduce a ''Polar Probe'' trained to read syntactic relations from both the distance and the direction between word embeddings. Our approach reveals three main findings. First, our Polar Probe successfully recovers the type and direction of syntactic relations, and substantially outperforms the Structural Probe by nearly two folds. Second, we confirm that this polar coordinate system exists in a low-dimensional subspace of the intermediate layers of many LLMs and becomes increasingly precise in the latest frontier models. Third, we demonstrate with a new benchmark that similar syntactic relations are coded similarly across the nested levels of syntactic trees. Overall, this work shows that LLMs spontaneously learn a geometry of neural activations that explicitly represents the main symbolic structures of linguistic theory.

Main paper: 
 introduction: 
 Human languages have long been proposed to systematically follow tree-like structures (Chomsky, 1957; Tesnière, 1953) . In a sentence, words that are far apart can be syntactically linked. For example "cats" is the subject of "chase" in the sentence "The cats in cities chase the mice". In dependency grammar, the edges of such trees are directed and labelled to indicate the type of syntactic relation between words ("cats" is the subject of "chase", Fig. 1B ).Despite their conceptual soundness and alignment with human behavior (Robins, 2013) , syntactic trees have long been the crux of a core challenge in cognitive science (Smolensky, 1987) : trees are symbolic representations, which can superficially appear incompatible with the vectorial representations of neural networks. This opposition between symbols and vectors has been a major challenge to the unification of linguistic theories on the one hand, and neuroscience and connectionist AI on the other hand.Recently, Hewitt and Manning (Hewitt and Manning, 2019) proposed an important concept for this issue, by suggesting that the existence of syntactic link between two words may be represented by the distance between their corresponding embeddings. Specifically, their "Structural Probe" consists in finding a subspace of contextualized word embeddings such that the squared euclidean distance between words represents their distance in the dependency tree. They showed that the Structural Probe is most powerful in the intermediate layers of language models: these layers contain a subspace where syntactically-related words are closer together. This Structural Probe, however, can only reveal one aspect of dependency trees: namely, the existence of syntactic relations, between word pairs. However, whether and how the direction and the type of syntactic relations are represented in language models remains unknown.Here, we hypothesize that syntactic relations are represented by a polar coordinate system, where the existence and type of syntactic relations are represented by distances and direction, respectively (Fig. 1 ). To test this hypothesis, we introduce a "Polar Probe": a linear transformation trained such that pairs of words linked by the same dependency type are collinear, while remaining orthogonal to different dependency types. According to the dependency grammar framework, the sentences can be described as linear sequences of words connected by an acyclic graph. B. More precisely, such acyclic graph is both labeled and directed, where each edge has a direction, representing the hierarchy of the syntactic relation, and a label, representing the type of syntactic relation. C. The Structural Probe (Hewitt and Manning, 2019) finds a a linear transform (gray plane) of the language model's activations (here simplified as a 3D space), such that the distance between word embeddings is predicted by their dependency tree. In the Structural Probe subspace, however, it is not possible to distinguish whether "The cat chases the mouse" or "The mouse chases the cat." D. Our Polar Probe finds a linear transformation where the angle between syntactically-related word additionally represents the type and direction of these syntactic relations, and the distance codes its presence. The colored arrows indicate orthogonal directions in the Polar-Probe subspace. 
methods: 
 The goal of this work is to find a linear readout of the activations of pretrained language models which explicitly represents both the presence and the types of syntactic relations between words.Dependency grammar represents the syntax of a sentence as a symbolic tree. Accordingly, let:• w i be the i th word in a sentence,• d : w i , w j → Z + indicate the syntactic distance between two words,• C be the set of syntactic types,• t : w i , w j → C indicate the type of syntactic relation between directly-connected words.• u : w i , w j → {w i , w j } indicate the head word (and thus direction) of the syntactic relation between directly-connected words.Language models based on neural networks represent sentences as sequences of word vectors (a.k.a word embeddings)1 . As these embeddings propagate through the layers of the network, they incorporate information about the sentence they belong within, becoming contextualized word embeddings.Let h ℓ i ∈ R k be the i th contextualized word embedding of w i obtained at the output of layer ℓ of a neural network. For simplicity, we will drop the layer index ℓ in what follows, keeping in mind that different layers yield different representations.Retrieving syntactic trees from a neural network requires to obtain two read-out functions d :R k , R k → Z + , û : R k , R k → R k and t : R k , R k → C such that the following conditions are met: d(h i , h j ) ≈ d(w i , w j ), t(h i , h j ) ≈ t(w i , w j ), û(h i , h j ) ≈ u(w i , w j ),While d, t and û could be any complex functions, the goal of the present work is to identify a simple, interpretable "code" of how syntactic trees may be represented in vectorial systems. Following the classic definition of a representation as a linearly readable information, we focus on linear operators (DiCarlo and Cox, 2007; Kriegeskorte and Bandettini, 2007; King and Dehaene, 2014) .In (Hewitt and Manning, 2019) , the authors propose to solve d as a distance in a subspace of the contextualized word embeddings. Their "Structural Probe" is a linear transform, B S : R k → R k′ , which projects word embeddings such that their relative distances correspond to their distances in the syntactic tree. Formally, if s i,j ∈ R k is the (directed) "edge embedding" between words w i and w j :EQUATIONThen, the predicted distance d ∈ R + between two words can be computed directly as a function of this and no other information coming from the individual word embeddings 2 :EQUATION)Given a set of sentences, the authors extract the set Ω S of pairs of words belonging to the same sentence and optimize B S to minimize the absolute difference between the distances within the syntactic tree and the distances between the probed word embeddings:L S = 1 |Ω S | (wi,wj )∈Ω S |d(w i , w j ) -d(w i , w j )| (3)Following the development of the Structural Probe, squared Euclidean distances between probed word embeddings are not designed to represent both the presence of dependency relations and their types and directions simultaneously. (Hewitt and Manning, 2019) thus only propose a representational system to solve ê, but not t. Whether and how the directed and labeled syntactic tree is encoded in neural networks, thus remains unknown.Here, we hypothesize that neural networks use the orientation of the relations formed by connected word pairs to represent the type and direction of their syntactic dependency.To test this hypothesis, we first introduce an "Angular Probe" consisting of a linear transformB A : R k ′ → R k ′′. By abuse of notation, we denote as t(s i,j ) ≡ t(w i , w j ) the syntactic type of the corresponding edge. For the Structural Probe, the function d to be recovered is defined on all pairs of words; here the function t to be recovered is only defined on pairs of syntactically linked words, hence we only consider word pairs (w i , w j ) which are indeed syntactically linked.We use contrastive learning to align relations of the same type and ensure that different types are pointing to different directions. This approach is designed such that a linear readout could explicitly categorize dependency types.Specifically, the objective for the Angular Probe is to ensure that given two edge embeddings s and s ′ of syntactic types c = t(s) and c ′ = t(s ′ ), the linear transforms B A s andB A s ′ are colinear if c = c ′ , and orthogonal if c ̸ = c ′ .Formally, the Angular Probe is the linear transform which minimizes the contrastive loss:EQUATION• Ω A is the set of edge embeddings of syntactically connected words,• ∡ : x, y → x•y ∥x∥∥y∥ is the cosine similarity,• 1 : X →1 if X is true 0 otherwise is the indicator function.We can then construct a prototypical vector for each dependency type, by averaging all the probed edge embeddings belonging to that type:EQUATIONEQUATIONThe Angular Probe gives us the following function to retrieve the syntactic type of any given edge:EQUATIONWe also get the function û to predict the head word (and direction) of the syntactic relation given a predicted type t:û(h i , h j ) := h i if ∡(B A s ij , V t(hi,hj ) ) ≥ 0 h j if ∡(B A s ij , V t(hi,hj ) ) < 0 (7)The Angular Probe and the Structural Probe have independent objectives applied to two different datasets: L S relies on Ω S , which includes all word pairs from any sentence, whereas L A relies on Ω A , which contains only pairs of words that are syntactically linked.Consequently, we define the Polar Probe as a single linear transformation B P : R k → R k ′′ which results from the joint optimization of both the the Angular and Structural objectives. This Polar Probe defines the final functions to identify syntactic distances and relation types:d(h i , h j ) := ∥B P s ij ∥ 2 (8) t(h i , h j ) := argmax c |∡(B P s ij , V c )| (9) û(h i , h j ) := h i if ∡(B P s ij , V t(hi,hj ) ) ≥ 0 h j if ∡(B P s ij , V t(hi,hj ) ) < 0 (10)Therefore, the Polar Probe minimizes the following loss function, with λ a hyper-parameter weighing the Angular objective.argminB P L S + λL A (11)2.5 Data Natural dataset. We consider natural sentences extracted from the English Web Treebank dataset (Silveira et al., 2014) 3 . This corpus contains 254,820 words from 16,622 sentences, sourced from a diverse array of web media genres, including weblogs, newsgroups, emails or reviews. All the sentences in the dataset are manually annotated according to the Universal Dependencies framework (Nivre et al., 2017) , where each word is a node, each syntactic link is a labelled directed edge, and the syntactic tree is acyclic.Sentences containing email or web addresses are excluded from the dataset. Such filter removes noisy sentences not interesting from a syntactic point of view. We follow the default splitting provided by the English Web TreeBank resulting in a total of 11827 sentences for training, 1851 for validation, and 1869 for testing.Controlled dataset. To precisely evaluate our approach on well-controlled sentences, we designed a dataset, extending previous work (Lakretz et al., 2021b) , comprising 100 sentences built with a long-nested structure (e.g., "The book that the boy besides the car reads fascinates my teacher").In these sentences, a subordinate clause branches off the main phrase. There is also a constituent 'besides the car' that forms a branch inside the subordinate clause, adding further complexity to the syntactic structure.This controlled dataset is designed to clarify how the Polar Probe reconstructs the syntactic tree in complex conditions, but conditions well theorized in linguistics. In particular, we can create several variations of these long-nested sentences.• Short: "The book fascinates my teacher"• Relative clause: "The book that the boy reads fascinates my teacher"• Long-nested: "The book that the boy besides the car reads fascinates my teacher"Thanks to this dataset we can study whether the Polar Probe maps embeddings of different syntactically-identical sentences to consistent latent locations and orientations. In addition, with the different "sentence levels",word position and syntactic role can be disentangled to compare the Polar Probe's activations accross levels, as shown in Fig: 5 .We train the Polar Probe on the neural activations of Mistral-7B-v0.1 and Llama-2-7b-hf (Touvron et al., 2023; Jiang et al., 2023) , in response to sentences of the "Natural Dataset" described above.Both models are Auto-Regressive Language Models, they aim to identify future words from input sentences. Furthermore, these models read all the words simultaneously, building representations which depend on the whole sequence of tokens.We trained the Polar Probes with gradient descent, using the Adam optimizer (Kingma and Ba, 2014) with a learning rate of 0.005, and a batch size of 200 sentences. The duration of the training is 30 epochs, we perform model selection using the validation set. Hyperparameter λ is set to 10.0, ensuring an optimal balance between the Angular and Structural objective. We evaluate each probe either on its ability to faithfully represent (i) the unlabelled and undirected dependency tree ("structure"), (ii) the type and direction of dependencies and (iii) both of these elements.Dependency structure. Following (Hewitt and Manning, 2019) , we evaluate whether the probes accurately predicts the existence of each syntactic relation by using the Undirected Unlabeled Attachment Score (UUAS). UUAS quantifies the proportion of dependency relations (directly connected words) in the dependency tree that are correctly identified by the probe, irrespective of their dependency types and direction.Dependency type. To evaluate the accuracy of the predicted dependency types, we use three distinct metrics: Area Under the Curve (AUC), Dependency Type Accuracy and Dependency Type Balanced Accuracy.For AUC, we compute the cosine similarity between each edge s i and all other edges s j , that are either from the same dependency type, or not. This procedure ends with a distance vector x ∈ R m of m edge pairs and a binary vector of y ∈ 1 m . We can finally input these two vectors into scikit-learn's roc_auc_score (Pedregosa et al., 2011) .For Accuracy and Balanced Accuracy, we classify dependency types by comparing relations to prototypical relations. For this, from the training set, we pool 10,000 relations and define a prototype sk for each dependency type k, by computing the centroid of all relations belonging to the same type k. Then, we predict dependency types from the cosine similarity between each relation s i and each prototype V c , using scikit-learn's KNeighborsClassifier. (Pedregosa et al., 2011) . Finally, we use scikit-learn accuracy_score or balanced_accuracy_score to limit the effect of imbalance between dependency types.Combined dependency type and structure. Finally, to provide a metric which evaluates both dependency structures and dependency types, we compute the Labeled Attachment Score (LAS). LAS is defined as the proportion of correctly predicted labeled and directed edges in a sentence.Baselines. We compare the Polar Probe to a variety of baselines: (i) Structural Probe, (ii) "Polar Probe Random LLM": a Polar Probe trained on top of a random language model and (iii) "No Probe": the raw activations of the Language Model without any transformation. 
results: 
 Reliable coding of dependency types. We first analyze the Polar Probe on the 16 th layer of Llama-2-7b-hf, Mistral-7B-v0.1 and BERT-large (Touvron et al., 2023; Jiang et al., 2023; Devlin et al., 2019) on the English Web Treebank (EWT) sentences (Silveira et al., 2014) annotated with dependency trees. We evaluate, on an independent test set with 10000 relations, whether pairs of words linked by similar syntactic relations point towards similar orientations in the probe's representational space (Fig. 2 ). Fig. 2 .A shows a Principal Component Analysis (PCA) projection of the dependency relation embeddings from the test set, once linearly read by the Polar Probe. For readability, we restrict ourselves to three of the most common types of dependencies in the dataset. As expected, the three types of dependency consistently point in different directions.We then compute the cosine similarity between all pairs of edge embeddings probed with the Polar Probe (Fig. 2 .C (right)), indeed showing that relations of the same types are collinear, while relations of different types are orthogonal. This is much clearer for the Polar Probe than for baselines (Fig. 2 Comparison with baselines. In Fig. 2 .B, we summarize with AUC and Balanced Accuracy the extent to which the orientations of these edge embeddings reliably represent the syntactic types.On average across dependency types, the Polar Probe reaches a AUC score of 95%, well above the Structural Probe (AUC=73%), the Angular Probe (AUC=97%), and no-probe (AUC=80%). The same relative results accross probes are conserved for the Balanced Accuracy score. Importantly, these results confirm that the Polar Probe outperforms the Structural Probe in predicting dependency types of the edge embeddings. The latter is therefore something not emergent in the Structural Probe.Unexpectedly, "No Probe" predicts syntactic types well above chance, and significantly better than the Structural. This hints to the fact that syntactic types are already represented in the raw activations. A likely explanation for this is that words belonging to the same part-of-speech (such as verbs, nouns) are clustered in the embedding space, thus partially guiding the inference of syntactic dependencies.Moreover, training a Polar Probe on a random initialization of a language model does not accomplish the contrastive objective better than chance. Resulting in near chance-level Balanced Accuracy and AUC scores. This confirms that the linear probe needs a rich underlying representation space to work, and cannot learn to cluster the different syntactic types on its own.Layer-wise analysis. To evaluate how the Angular and Structural performance interact in the Polar Probe, and whether the mechanism generalizes to both Mistral-7B-v0.1, Llama-2-7b-hf and BERT-large, we evaluate the layers of the three models on Labeled Attachment Score (LAS) (Fig. 3 ). (See Supplementary for BERT-large and Mistral-7B-v0.1) Interestingly, BERT-large, Mistral-7B-v0.1 and Llama-2-7b-hf all peak at layer 16, which is the same layer reported in (Hewitt and Manning, 2019) . At layer 16, the models achieve a LAS on the test set of 70.2, 60.6 and 62.9 respectively. As recently reported in (Eisape et al., 2022) for the Structural Probe, these results suggest that the Polar Probe also works best with Masked Language Models. The Polar Probe, despite its conceptual simplicity matches performance with a more intricate and modular labeled probe (Müller-Eberstein et al., 2022) .Structural evaluation. The Polar Probe is optimized with both a Structural and an Angular objective. This means that the optimization of such probe might affect the original performance of the Structural Probe. To verify that the gap in performance, we compute the UUAS between the predicted tree and the annotated tree for both the Structural and Polar probe (Fig. 3 ). The results confirm that the Polar Probe preserves (but does not improve) the syntactic distances between the linear readout of the probed word embeddings. Dimensionality analysis. How many dimensions are necessary to successfully represent the full syntactic tree with the proposed polar coordinate system? To address this question, we varied k ′′ , namely the dimensionality of the space of the Polar Probe (Fig. 4 ). Analogously to the rank analysis of Structural Probe (Hewitt and Manning, 2019) , we observe a peak around k ′′ = 128. Contrary to theoretical predictions (Smolensky, 1987) , these results suggest that the space representing the complete syntactic tree needs not be unreasonably large. For dependency types, this phenomenon could be relatively intuitive, as the unit circle (i.e. only 2 dimensions) can easily separate many different dependency types, such that a weakly non-linear readout would isolate these categories. Controlled sentences. Natural sentences are highly variable in structure and content. To verify more precisely the behavior of the Polar Probe, we evaluate it on the "Controlled Dataset" and its different sentence levels: Short, Relative Clause and Long-Nested.First, we observe that in the space of the Polar Probe, the representation of dependency trees appears to be consistent across sentences' length and substructures. For example, as shown in Fig. 5 , the coordinates of the main phrase are virtually identical whether it is attached to a prepositional phrase and/or a long-nested structure. This invariance supports the notion that dependency trees are represented by a systematic coordinate system that can be recovered with the Polar Probe.We also observe that dependency types are robustly identified, whether they are part of the main phrase or not.Overall, these results visually confirm that the Polar Probe reliably represents the dependency structure and dependency types of complex syntactic structures. The latter agrees with the extensive Structural and Angular evaluations performed.det nsubj obj nmod acl case Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof? Answer: [NA] Justification: The paper is not theoretical in nature, it rather is a proposal of a neural code for syntax that is empirically demonstrated with the presented experiments. There are no mathematical theoretical results. Guidelines:• The answer NA means that the paper does not include theoretical results.• All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced. • All assumptions should be clearly stated or referenced in the statement of any theorems.• The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition. • Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material. • Theorems and Lemmas that the proof relies upon should be properly referenced. 
discussion: 
 Summary. We show that within the activation space of language models, there exists a subspace, where syntactic trees are fully represented by a polar coordinate system. There, the presence and type of a syntactic relation between two words is represented by their distance and relative direction, respectively. Importantly, the Polar Probe preserves the structural properties of the Structural Probe (Hewitt and Manning, 2019) , but better represents the type of syntactic relations.Limitations. The present work presents four main limitations. First, we only investigate the English language. Yet, human languages use different grammatical rules, and may, consequently, be structured according to different types of trees. Interestingly, as language models become increasingly able to process a wide spectrum of languages (Costa-jussà et al., 2022) , the present framework opens the exciting possibility to explore universal (or divergent) grammatical representations in artificial neural networks, following (Müller-Eberstein et al., 2022; Chi et al., 2020) .Second, syntactic structures are not necessarily restricted to the description of relations between words. In particular, morphology predicts that words themselves may be represented as trees of morphemes. Consequently, whether and how the present framework generalizes to the different scales of linguistic structures remains to be further investigated.Third, like the Structural Probe, the Polar Probe is based on a supervised task: we optimize a linear transformation that maximally retrieves a known syntactic structure from the neural activations.Developing an unsupervised probe would be important to help discovers unsuspected syntactic structures. In addition, we here focused on dependency structures. Yet, other formalisms, based on phrase structures (Chomsky, 1957; Joshi and Schabes, 1997; Cinque and Rizzi, 2009; Chomsky, 2014) could offer alternative trees, and could be equally probed through the present framework. This approach could thus offer the possibility of experimentally testing which of these linguistic theories best account for the representations of human languages in neural networks.Finally, we assume that syntactic trees can be best read out using Euclidean probes. However, alternative assumptions, such as hyperbolic representations, have been a fruitful tool to interpret deep learning models' representations in both text and image modalities (Dhingra et al., 2018; Nickel and Kiela, 2017; Desai et al., 2023) . We speculate that this direction could provide a valuable avenue for extending the current work.Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)? Answer: [Yes] Justification:The paper provides with detailed information about the training procedure as well as the details of the experimental setting. Furthermore a code repository will be made public to replicate all the results shared with the camera-ready version of the paper.Guidelines:• The answer NA means that the paper does not include experiments.• If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not. • If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable. • Depending on the contribution, reproducibility can be accomplished in various ways.For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed. • While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. (d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility.In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results. 
related work: 
 Syntax in artificial neural networks. Overall, this study complements previous research on syntax in artificial neural networks. Originally, (Smolensky, 1987) demonstrated that vectorial systems could, in principle, represent symbolic structures with tensor products but did not provide an empirical demonstration that neural networks did, in fact, demonstrate this property. More recently, language models were tested on their capacity to process syntactic structures by evaluating their behavior on grammatical and ungrammatical sentences (Lakretz et al., 2020 (Lakretz et al., , 2021a;; Hewitt and Manning, 2019; Hale et al., 2022; Evanson et al., 2023; Linzen et al., 2016) . Finally, several groups explored how this capacity was instantiated in the neural activations (Huang et al., 2017; Palangi et al., 2017; Soulos et al., 2019; Lakretz et al., 2019) , culminating in (Hewitt and Manning, 2019)'s Structural Probe. Since the discovery of the Structural Probe different adaptations have been developed, notably including hyperbolic (Chen et al., 2021) , orthoghonal (Limisiewicz and Mareček, 2021) , nonlinear (Eisape et al., 2022; White et al., 2021) variants. The present work completes this long effort by showing how an interpretable syntactic code based on both distances and orientations spontaneously emerges in language models.Syntax in biological neural networks. This link between linguistics and artificial neural networks holds significant potential for neuroscience. In particular, until the latest rise of large language models, many experimental neuroimaging studies aimed to identify the neural bases of syntax in the human brain (Hale et al., 2022) . For example, (Pallier et al., 2011) showed with functional Magnetic Resonance Imaging (fMRI) that several regions of the superior temporal lobe and prefrontal cortex responded proportionally to constituent size. Critically, language models are now becoming standard bases to predict and explain the brain responses to natural language processing: The activations of these artificial neural networks have indeed been shown to linearly map onto fMRI, intracranial and MEG recordings of the brain in responses to the same words and sentences (Jain and Huth, 2018; Caucheteux and King, 2022; Reddy and Wehbe, 2021; Caucheteux et al., 2021; Pasquiou et al., 2022 Pasquiou et al., , 2023)) . However, this mapping remains difficult to interpret, and the neural code for syntax in the brain remains a major unknown. The present work thus provides a testable hypothesis to understand how syntactic trees may be explicitly represented in the brain.Broader impact. Combined with the works outlined above, our results open the exciting possibility that the polar coordinate system may, in fact, explain how syntax is encoded in the human brain. Critically, this framework may generalize beyond syntactic tree structures, and apply to any compositional problem, including compositional semantics, object-feature binding in vision, and representation of knowledge graphs. Above all, while many have long opposed symbolic and connectionist formalisms, this work contributes to show how these two systems of representations may be largely compatible with one another, as long predicted (Smolensky, 1990; Smolensky et al., 2022) . This reconciliation thus holds great promises to understand the brain mechanisms of language and composition.Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?Answer: [Yes] Justification: As stated in the previous section a code repository will be shared together with the controlled datasets that we created. Furthermore, the "natural dataset" (UD-EN-EWT) is public.Guidelines:• The answer NA means that paper does not include experiments requiring code.• Please see the NeurIPS code and data submission guidelines (https://nips.cc/ public/guides/CodeSubmissionPolicy) for more details. • While we encourage the release of code and data, we understand that this might not be possible, so "No" is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark). • The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https: //nips.cc/public/guides/CodeSubmissionPolicy) for more details.• The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc. • The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why. • At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable). • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
acknowledgments: 
 This project was provided with computer and storage resources by GENCI at IDRIS thanks to the grant 2023-AD011014766 on the supercomputer Jean Zay's the V100 and A100 partition (PDS). Answer: [Yes] Justification: Yes, there is a section dedicated to limitations of the work where we explain follow-up work to be done as well as the weak points we perceive in this current approach. Guidelines:• The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper. • The authors are encouraged to create a separate "Limitations" section in their paper.• The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be. • The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated. • The authors should reflect on the factors that influence the performance of the approach.For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon. • The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size. • If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness. • While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?Answer: [Yes] Justification: In the methods sections all the training details are written. This details are more than enough to understand and replicate the results.Guidelines:• The answer NA means that the paper does not include experiments.• The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them. • The full details can be provided either with the code, in appendix, or as supplemental material. 
experiment statistical significance: 
 Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?Answer: [No] Justification: Due to the nature of the experiments and the scarcity of compute, to get error bars we would need to train the probes several times, this is unfortunately not possible and would take a lot of time. In previous works like (Hewitt and Manning, 2019) , error bars were also not shown.Guidelines:• The answer NA means that the paper does not include experiments.• The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper. • The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors). • It should be clear whether the error bar is the standard deviation or the standard error of the mean. • It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified. • For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates). • If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text. 
experiments compute resources: 
 Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?Answer: [No] Justification: All experiments are done with a single A100 GPU, however, these details are not relevant for the scope of the paper. The only important aspect is to be able to fit a LLM in the memory of the GPU to do inference.Guidelines:• The answer NA means that the paper does not include experiments. Justification: All the ethics are strictly respected.Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics. • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 
broader impacts: 
 Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?Answer: [NA] Justification: Unfortunately due to space constraints we could not add this section. However this is written and would be shared in the extra page of the camera-ready version. We do not think this paragraph is essential as others due to the fundamental nature of our work, it is far from the application.Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.Guidelines:• The answer NA means that the paper does not release new assets.• Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc. • The paper should discuss whether and how consent was obtained from people whose asset is used. • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.38th Conference on Neural Information Processing Systems (NeurIPS 2024).Sequences are built from "tokens", which sometimes correspond to subwords. When this is the case, one can simply average the subword embeddings to obtain word embeddings(Hewitt and Manning,2019).2 See(Chen et al., 2021) for an explanation of how hyperbolic spaces are best measured through square Euclidean distances.https://universaldependencies.org/treebanks/en_ewt/index.html 
 
 Appendix:  


Decision: Overall, there is a consensus among the reviewers that the paper should be accepted, with a clear contribution and results that support the main idea. There is a need for better baselines and distinguishing the work from previous work in the literature. The authors clarified the difference between their work and previous work (M&E 2023), mentioning that they aim to show that syntax can be represented using polar coordinates, while previous work tried to build encoders for dependency parsing.

Reviews: review: paper_summary: paper_summary: Previous work introduced linear probes to explore how syntactic relationships are encoded in LLM embeddings.  This work aims to take it a step further and examine how types of syntactic relationships are encoded in the LLMs.  They introduce a polar probe that when optimized can predict the type of syntactic relations via the angle between them.  In a multi-faceted evaluation, the model outperforms baselines (which are essentially ablations of the model) in terms of stronger cosine similarity between the same relations, and in terms of tree accuracy (UAS/LAS).
strength_weakness: strength_weakness: - I find the distinction between probing and parsing to be not entirely clear.  At the point where the evaluation is in terms of UAS/LAS, could this not be compared directly to parsers on the same data (especially since building on top of LLM embeddings would be the most performant solution)?  And where would the discrepancies be, and what would that mean?  Do LLMs not encode those relationships?

- In general the paper seems to suffer from a lack of convincing baselines.  The baselines presented -- the structural or angular probe, are steps along the path to the polar probe.

- Cosine similarity between identical syntactic categories is surprisingly low (to me).  The ranking of categories in terms of the strength of that correlation is also surprising, ith things like 'case' being quite strong.  In general there are many "odd" patterns that I don't have an intuitive explanation for why they occur, and aren't discussed in detail in this work.

- There is no dedicated related work.  I do think the parsing literature, and especially the parsing-on-top-of-LLMs literature is relevant.
questions: questions: Suggestions / Questions:

Q1 - How the trees are predicted is not clear / whether these are a series of independent predictions or whether they are processed sequentially or decoded jointly?

Q2 Do the same syntactic relations that occur at different levels of the sentence have distinct embeddings?  I think the authors were setting up to explore some questions about the meaningfulness in the "hierarchy" of the tree, especially with the controlled sentence dataset, but then I never saw these really come to fruition.  Especially the talk of short/relative/long-nested partitions -- where are these discussed?  Fig. 5 is mentioned (L241) but Fig 5 is fluff.

L33: "and its neuronal substrate."  What?  It's just a model.

L36: "to settle"?  Though the sentence is bizarre regardless

L24-L253, improper citation formats almost everywhere

"According to linguistics, sentences can be described as linear sequences of words connected by a dependency tree", there isn't a "linguistics" -- there are many competing syntactic frameworks and heated debate as to the pros/cons of each framework, but at the end of the day, these are merely formalisms

L83: Squared euclidean distances (between two word embeddings) cannot trivially represent the presence
84 of dependency relations and their types and directions simultaneously.

Why not?  If these are represented in separate subspaces, why is it not possible to represent these three concepts in a vector space?
limitations: limitations: Yes, the limitations are described.
paper_summary: paper_summary: Whereas prior work (Hewitt and Manning 2018) probed syntactic distance and depth, this work proposed to push that forward by also probing headedness and dependency type.  Specifically, this doesn't separately probe those three, but aims for a single vector space where euclidean distance defines syntactic distance but the difference vector maps to a UD dependency label (optimized with a contrastive learning objective).
strength_weakness: strength_weakness: - If viewed merely as a combination of probing structure and labeling, it is very similar to a work like Muller-Eberstein et al. 2022.   The advantage of this paper -  having more of a shared representation -- is appealing, but I wish the consequences of that shared space were better explored.
- Analysis was somewhat lacking: for a probing paper, there were relatively work showing what this tells us about the syntactic behavior of models.
questions: questions: - Have the authors looked at extended dependencies?  The notion of differences as dependency type seems more specific (and to imply more interesting consequences) if there are multiple "paths" through a tree.
limitations: limitations: Yes
paper_summary: paper_summary: This paper proposes polar probes, a kind of structural probe that learns a distance and rotation function that can more accurately classify syntactic structure from language model representations than previous approaches. In particular, the question of whether direction can represent the type of syntactic relationship is answered. The authors find that their polar probe outperforms previous methods quite significantly and show
strength_weakness: strength_weakness: Weaknesses like the focus on dependency parses and drawbacks of current tokenizers are addressed in limitations, but are still weaknesses nonetheless.

Please include  UUAS, LAS and Balanced Accuracy for the evaluation on the controlled dataset separately for comparison.

As thorough as this paper is, I think it could go deeper on the model analysis. It's nice that the layer-wise analysis is consistent with previous work, but this would be mostly expected. For example, could the authors show that models of different sizes capture more/less syntactic complexity? Is there a critical point where syntax becomes well represented and gains are diminishing after more scaling? Do larger models capture more of the "tail" of rare syntactic constructions? This could be carried out on the GPT2 or Pythia family of models.

Nits:

- please make the text in the legend/axis labels for figure 3 bigger

- Typo L36: "proposed settle"
questions: questions: N/a
limitations: limitations: Yes

Comments: title: A marked improvement, but a little thin
Thank you for the reply. Interesting rebuttal results
comment: I'd like to thank the authors for taking the time to thoroughly answer many of the questions raised in the review.  I think I have a clearer understanding now of how best to interpret some of the results.

I also appreciate the additions to the paper, all of which seem like good steps towards rounding out the paper and helping to differentiate it from existing work.

I may come back to this, but at this time I believe I am going to keep the score as is, as I think this score is appropriate for the paper, even in light of the suggested improvements.  I am stating that I believe the paper should be accepted even in its current form.  But while Fig 3 in particular seems very promising, it is also hard to ignore that its role in the paper in its current form seems something of an afterthought.  I believe the paper  still struggles a bit to differentiate itself from the previous Muller-Eberstein work (even if the stated goals of each paper are different).  Expanding in the direction of Fig 3 appears to be a very sensible way of accomplishing this, but it seems underexplored in its current state.
We thank Reviewer tm4o for their response and are grateful that our analyses have been able to address the previous concerns to a satisfactory level.

We acknowledge that the meaningfulness of the Polar Probe's representations on the controlled dataset may not be sufficiently emphasized, as Reviewer 9Ubp noted. To address this issue, we propose adding the following paragraph to the Discussion section:

"One key advantage of the present Polar Probe is its ability to provide linear, compact, and interpretable representation of dependency trees, distinguishing it from other parsing models. Notably, Figure 6 (Figure 3 in the rebuttal PDF) illustrates an unexpected phenomenon: the probe appears to assign the same coordinates to words within identical phrases and syntactic roles, regardless of sentence length, complexity, and semantic variations. This representational invariance offers a promising foundation for further exploration of how recursion and compositionality are effectively represented and processed in neural networks."

We hope this addition clarifies the meaningfulness of hierarchical structures in the Polar Probe and encourages further exploration of its implications for linguistic representation and processing.
Thanks to the authors for their detailed response, and the additional analyses provided on the paper - and so am bumping the score up from 4 to 5. I still feel like there is room for further analysis -- I really like Reviewer's 9Ubp's comment that 'I think the authors were setting up to explore some questions about the meaningfulness in the "hierarchy" of the tree, especially with the controlled sentence dataset, but then I never saw these really come to fruition.'.
Thank you to the authors for their response and additional experiments. I appreciate the work put into the rebuttal to address the finer-grained questions that I think this work raises. I have read the other reviews and reconsidered the paper, and I'm raising my score from a 7 to an 8. Other reviewers raised good points (baselines, Muller-Ebstein), but I agree with the authors responses to these/the authors agree to reasonable proposed changes. I see a lot of value in this approach for model interpretability and testing linguistic hypotheses in models of language. I would like to see this paper published