Venue: NAACL 2025

# Towards Robust Knowledge Representations in Multilingual LLMs for

Equivalence and Inheritance based Consistent Reasoning

 Gaurav Arora

Amazon

gaurvar@amazon.com

&Srujana Merugu

Amazon

smerugu@amazon.com

Shreya Jain

IIT Jammu

2020uee0135@iitjammu.ac.in

&Vaibhav Saxena

Amazon

saxenvai@amazon.com

Contributed to this work during her internship at Amazon

###### Abstract

Reasoning and linguistic skills form the cornerstone of human intelligence, facilitating problem-solving and decision-making. Recent advances in Large Language Models (LLMs) have led to impressive linguistic capabilities and emergent reasoning behaviors, fueling widespread adoption across application domains. However, LLMs still struggle with complex reasoning tasks, highlighting their systemic limitations. In this work, we focus on evaluating whether LLMs have the requisite representations to reason using two foundational relationships: "equivalence" and "inheritance". We introduce novel tasks and benchmarks spanning six languages and observe that current SOTA LLMs often produce conflicting answers to the same questions across languages in 17.3-57.5% of cases and violate inheritance constraints in up to 37.2% cases. To enhance consistency across languages, we propose novel "Compositional Representations" where tokens are represented as composition of equivalent tokens across languages, with resulting conflict reduction (up to 4.7%) indicating benefits of shared LLM representations.

## 1 Introduction

Reasoning is the capacity to employ logic and analyze relationships among entities to extrapolate from known evidence to derive new insights. Language significantly bolsters this process by supplying the necessary structure and vocabulary for encoding complex ideas, thus facilitating hypothesis generation and evaluation. The intricate connection between linguistic and reasoning capabilities is a hallmark of human intelligence, enabling abstract thinking, problem-solving, and decision-making.

Recent advancements in LLMs such as ChatGPT [6] and Claude [9] showcase their exceptional language generation capabilities and their potential to boost performance across diverse Natural Language Processing (NLP) tasks [8], with multiple studies also pointing to emergent reasoning abilities at scale [10]. However, LLMs continue to face challenges with complex reasoning tasks such as planning and problem-solving, indicating that their expansive modeling capacity and extensive training regime might enable them to mask deeper systemic shortcomings through superficial reasoning. As LLMs increasingly permeate applications catering to multilingual users with complex needs, gaining a deeper understanding of their functioning becomes imperative, as it could uncover systemic gaps and pave the way for superior models.

Robust reasoning hinges on the availability of powerful constructs such as entity-relation (ER) graphs and rules to interpret relationships. For instance, an ER graph with entities A, B, and C, where "A is the father of B" and "C is the wife of A" allows us to deduce that C is likely the mother of B, based on interpretation of the relationships "father" and "wife". While there are myriad relationships underpinning reasoning such as "cause and effect" and "comparison", in our current work, we focus on "equivalence" and "inheritance" due to their predominance in enhancing the efficiency of

Figure 1: An example of Reasoning by “Equivalence” and Reasoning by ”Inheritance” based on _existence_ of equivalence/ineritance relationship between concepts.



logical inference through property transfer, which is also reflected in their adoption as core constructs of knowledge representation and programming languages (Minsky et al., 1974). Fig 1 illustrates these relationships showing how humans create the necessary representations of "Apple" to reason across equivalent objects ("seb" : "Apple" in Hindi (transliterated), "Apfel" : "Apple" in German, etc) independent of the language/script of expression (Reasoning by Equivalence), and inherit properties from the abstract concept "Fruit" across all of its specific instances ("Apple", "orange" etc) (Reasoning by Inheritance). Here, we expect representations of equivalent objects to be similar, while that of inherited objects satisfy transitivity. These representations are crucial for efficient learning, knowledge sharing, and updation of beliefs.

Typically, humans create abstractions using denotational semantics, i.e., a word's meaning is defined by objects it describes, which is the favored approach in logical theory. In contrast, LLMs use distributional semantics, i.e., a word's meaning stems from the training data context, which can be problematic when the data has gaps, such as infrequent connections between equivalent words across languages. Hence, despite impressive performance on NLP tasks(Ahuja et al., 2023), it is unclear if LLMs create the necessary representations within and across languages to support consistent reasoning across equivalent and inherited objects.

**Contributions.** In this work, we focus on whether LLMs have the requisite representations to reason by equivalence and inheritance across languages and make the below contributions.

1. We introduce a novel task and parallel benchmark datasets of factoid QA to evaluate "Reasoning by Equivalence" in LLMs and assess the performance of multiple SOTA LLMs on this task across 6 languages (English, French, Spanish, German, Portuguese and Hindi). On our benchmarks, LLMs generate conflicting answers across languages in 17.3-57.5% of cases indicating a significant gap. We also perform a controlled experiment to identify factors promoting consistency across languages and find a strong positive correlation with similarity in script and typology.

2. We present another task and associated new benchmark to evaluate "Reasoning by Inheritance" in LLMs and study the proficiency of multiple SOTA LLMs across six languages. Our results indicate that LLM answers violate inheritance constraints in up to 37.2% cases across these languages with most violations observed in Hindi.

3. We also propose a novel method for constructing "Compositional Representations" in LLMs by representing tokens as composition of other equivalent tokens in vocabulary, which grants the model access to (otherwise) distant representations of equivalent objects across languages, thereby facilitating improved knowledge sharing and reduction in conflicts with gains up to 4.7% compared to baselines.

To the best of our knowledge, this is the first quantitative study of LLM reasoning via equivalence and inheritance across languages. We will share the benchmarks as a community resource and to ensure reproducibility after organization approval. Note that even when the desired equivalence and inheritance relationships hold and properties transfer correctly (our current focus), there may be gaps in LLM's multi-step reasoning pro

Figure 2: An example of LLM (Claude-v1 Instant) lacking “equivalence relationship between equivalent concepts across languages” due to tight coupling of knowledge representation and language expression unlike in Humans.

 

cess due to other factors as we discuss in detail in Appendix A.1.

## 2 Related Work

**Multilingual NLP.** LLMs like ChatGPT (OpenAI, 2022), GPT-4 (OpenAI et al., 2024), Claude (Anthropic, 2023c), BLOOMZ Muennighoff et al. (2023), XGLM Lin et al. (2022) have shown impressive performance on standard multilingual NLP tasks and benchmarks Ahuja et al. (2023); Zhao et al. (2023); Enis and Hopkins (2024); Ahuja et al. (2024). Despite extensive evaluations and the existence of parallel multilingual datasets such as MLQA and XQUAD Ahuja et al. (2024), to the best of our knowledge, there is no prior work or tailored benchmarks for assessing LLMs' ability to reason by equivalence and inheritance across multiple languages. Further, there is a chance of public benchmarks with duplicated knowledge across languages being included in LLM training data, rendering reasoning related assessments unreliable. Our study is the first to create controlled benchmarks and evaluate LLMs on these reasoning tasks to identify gaps and potential contributing factors.

**Reasoning in LLMs.** Reasoning abilities of LLMs have been studied for problem solving, decision making, and critical thinking Huang Chang (2023); Wei et al. (2022); Bubeck et al. (2023). Prior work has also looked at evaluating ability of encoder only models like BERT Devlin et al. (2018), RoBERTa Liu et al. (2019) to understand ontological knowledge Wu et al. (2023). In this work, we focus on reasoning based on two foundational relationships: equivalence and inheritance and evaluate popular LLMs on these dimensions across multiple languages. In recent years, there have been advances Aspis et al. (2022); Lazzari et al. (2024); Marconato et al. (2023) in neuro-symbolic architectures that combine symbolic and sub-symbolic components to enable efficient computation of symbolic representations and deductive reasoning. However, these works do not present a detailed analysis of representations of equivalent or related entities and these methods also entail much higher computational costs, limiting their adoption.

**Representation Learning in NLP.** Improving distributed representations led to significant performance improvements in past Liu et al. (2021); Devlin et al. (2018); Mikolov et al. (2013). Prior work on adapting attention mechanisms to bridge gaps across disparate but related inputs such as translated/transliterated data has led to improved multilingual representations Conneau et al. (2020); Khanuja et al. (2021); Arora et al. (2023). In our current work, we bridge the gap between distant representation spaces of various languages by adapting the attention mechanism to better utilize the token-language mapping.

## 3 Reasoning by Equivalence

Reasoning by equivalence is a core building block that enables efficient and scalable reasoning across contexts, with the efficiency being determined by the size of the equivalence classes (sets of equivalent objects). Construction of these "equivalence classes", i.e., "abstract concepts" from specific contexts and reusing these abstract concepts flexibly beyond the specific contexts An et al. (2023); Mitchell (2021); Kumar et al. (2023); Giunchiglia and Walsh (1992); Hull (1920), is a natural human skill. The human ability to acquire knowledge from one language (e.g., "apple is red") and construct representations shared across languages as in Fig 1 is a prime example. Similar to multilingual humans, LLMs also see large amount of multilingual data during pre-training Blevins and Zettlemoyer (2022). For instance, pretraining data of GPT-3 and BLOOM spanned 119 and 46 languages Brown et al. (2020); Scao et al. (2023) respectively. In this section, we evaluate if SOTA LLMs also have the ability to reason by equivalence across languages given their impressive multilingual capabilities, and if this ability is due to shared representations (i.e. existence of equivalence relationship) or duplication of knowledge across languages. Note that the existence of "equivalence relationships encoded in LLM representations" is a fundamental prerequisite for complex reasoning even though it does not guarantee that LLMs can effectively leverage it for multi-step logical reasoning due to gaps in LLM's inference mechanism based on associative attention (see Appendix A.1).

### How good are LLMs at exhibiting "Reasoning by Equivalence""?

We evaluate if LLMs exhibit "Reasoning by Equivalence" specifically across languages by estimating how dependent LLM's answers are on the language of input/output expression. A high dependency indicates tight coupling of the knowledge representation with the language and points to lack of shared abstractions and limited ability to reason 

by equivalence with knowledge duplication. Fig 2 shows an example where Claude-v1 instant's answers are significantly dependent on the language of input/output expression. Below, we outline our methodology, dataset, metrics and results.

#### 3.1.1 Methodology

Let \(R=\{r_{1},\cdots r_{L}\}\) be a set of languages with \([X^{r_{1}}X^{r_{2}},...X^{r_{L}}]\) denoting parallel questions across \(r_{i}\in R\). We perform two assessments.

**D**ependency on **I**nput **L**anguage **(DIL)**. Given \(L\) parallel questions \([X^{r_{1}},X^{r_{2}},...X^{r_{L}}]\); we generate LLM answers1\(Y^{r_{i}}\) for each \(X^{r_{i}}\) independently. Choosing an anchor language \(r_{\mathrm{anchor}}\in R\), we check for each \(r\in R\setminus\{r_{\mathrm{anchor}}\}\) if \(Y^{r_{\mathrm{anchor}}}\) and \(Y^{r}\) conflict with each other .

Footnote 1: Temperature=0 across the paper for deterministic outputs.

**D**ependency on **O**utput **L**anguage **(DOL)**. Given \(r_{\mathrm{anchor}}\), we input \(X^{r_{\mathrm{anchor}}}\) into the LLM and generate answers \(Y^{r}\) for \(X^{r_{\mathrm{anchor}}}\) for all \(r\in R\) independently. Then, we check for each \(r\in R\setminus\{r_{\mathrm{anchor}}\}\) if \(Y^{r_{\mathrm{anchor}}}\) and \(Y^{r}\) conflict with each other.

Here, two answers are called conflicting if they contain contradictory information and not merely if there are different or one of them is non-informative. For our experiments, we consider English (En), French (Fr), Spanish (Es), German (De), Portuguese (Pt) and Hindi (Hi) languages, i.e. \(R=\{\operatorname{En},\operatorname{Fr},\operatorname{Es},\operatorname{ De},\operatorname{Pt},\operatorname{Hj}\}\) and \(r_{\mathrm{anchor}}=\operatorname{En}\). Since authors in Lin et al. (2022); Ahuja et al. (2023) show that English instructions in the prompt perform better than instructions written in the native language for non-English languages, we tune the English instructions in prompt separately for each LLM and then keep these consistent for that LLM across all DIL and DOL experiments.

#### 3.1.2 Dataset and Metrics

**Dataset.** To ensure feasibility of automated evaluation via LLM-based judges and reduce variations due to subjective interpretation and cultural variations, our evaluation focused primarily on objective factual/attribute-based questions on entities. We prepare En factual questions dataset consisting of 88,334 questions on well known named entities and translate the dataset to Fr, Es, De, Pt and Hi using AWS Translate (AWS, 2017b). See Appendix A.5.1 for more details on the dataset and Fig 15 for a few sample questions.

**Metrics.** We compute the conflicts among answers generated by LLM for different input/output expression languages.2 We define conflict rate between \((r_{i},r_{j})\) language pair as fraction of total answer pairs which are conflicting, i.e. \(\operatorname{ConflictRate}(r_{i},r_{j})=\frac{\Sigma|D|}{|D|}\mathbf{J}(Y_{k} ^{r_{i}},Y_{k}^{r_{j}})}{|D|}\), where \(|D|\) is dataset size and \(J\) returns \(1\) if \((Y_{k}^{r_{i}},Y_{k}^{r_{j}})\) are conflicting, else returns \(0\). We use Claude v3 Sonnet as the judge \(J\) with prompt shown in Fig 13 in Appendix A.4. Table 5 in Appendix A.4 shows that the average precision of our judge is >95%.

Footnote 2: Since we care about consistent and common knowledge representation in LLMs for equivalent concepts, we only assess conflicting LLM responses to equivalent questions and not worry about factual accuracy of responses.

#### 3.1.3 Analysis and Results

Table 1 shows conflict rate for various LLMs for DIL task.3 We can see that conflict rate reduces with increase in model strength. Open source models lag behind closed source models by a significant margin with 25-44% average conflict rate across

\begin{table}
\begin{tabular}{l l c c c c c} \hline  & **En-Fr** & **En-Es** & **En-De** & **En-Pt** & **En-Hi** & **Avg** \\ \hline
**Claude v1 Instant** & 31.41 & 32.66 & 30.81 & 31.99 & 56.31 & 36.64 \\
**Claude v2** & 22.20 & 22.54 & 21.75 & 22.89 & 47.02 & 27.28 \\
**Claude v3 Sonnet** & **20.99** & **21.23** & **20.60** & **21.49** & **43.51** & **25.56** \\
**BLOOMZ-7B** & 37.23 & 34.67 & 50.88 & 33.95 & 52.69 & 41.88 \\
**XGLM-7.5B** & 42.99 & 42.49 & 38.74 & 41.74 & 57.53 & 44.70 \\ \hline \end{tabular}
\end{table}
Table 1: Conflict rate between LLM answers to parallel En-XX questions, XX = [Fr, Es, De, Pt, Hi].

\begin{table}
\begin{tabular}{l l l l l l l} \hline  & **En-Fr** & **En-Es** & **En-De** & **En-Pt** & **En-Hi** & **Avg** \\ \hline
**Claude v1 Instant** & 29.91 & 30.44 & 29.72 & 30.28 & 42.92 & 32.65 \\
**Claude v2** & 20.45 & 21.13 & 20.52 & 21.38 & **28.14** & 22.32 \\
**Claude v3 Sonnet** & **17.89** & **18.06** & **17.34** & **17.99** & 28.61 & **19.97** \\ \hline \end{tabular}
\end{table}
Table 2: Conflict rate between LLM responses in [En, Fr, Es, De, Pt, Hi] for input questions in En.

 

different LLMs and languages. Since we establish from results in Table 1 that LLMs are highly dependent upon input expression language, and that this dependency is consistent across varied open-source and closed-source LLMs of varied size, we evaluate only Claude family models for DOL task as shown in Table 2. We observe similar trends as average conflict rate of 19-32%. Both these results show that knowledge representation is tightly coupled with expression/language in LLMs, indicating a lack of right abstractions and limited knowledge sharing across languages in LLMs. Fig 16 and Fig 17 in Appendix A.5.2 show sample conflicting answers from various LLMs to equivalent questions from DIL and DOL tasks respectively.

### Factors affecting LLMs ability to exhibit "Reasoning by Equivalence"

To better understand knowledge transfer and source of conflicts across languages in LLMs, we perform a controlled experiment wherein we create synthetic QnA data with non-existent named entities that LLM does not have any prior knowledge on and train it on synthetic data in one language and test for its transfer in other languages.

#### 3.2.1 Controlled Experiment

**Dataset.** We create synthetic data of non-existent named entities and hallucinated articles about those entities using Claude v1-instant. We also generate factual questions about synthetic named entities which can be answered only from hallucinated articles. We only keep those questions for which Claude's answers with and without the article conflict with each other to ensure any LLM is unlikely to have any prior knowledge of our synthetic data. Our synthetic QnA dataset has 2063 synthetic named entities and has 32016 Qn pairs. As we perform the controlled experiment with \({\rm En},{\rm De},{\rm Hi}\) and \({\rm HiEn}\) (transliterated Hindi), and our synthetic question set is in \({\rm En}\), we also translate it to \({\rm De}\) and \({\rm Hi}\) using AWS Translate, and transliterate to \({\rm HiEn}\) using IndicTrans [4].

**Experiment Setup.** We train XGLM-4.5B on unique 25% of the synthetic data for each language and test on its parallel data in other three languages. Specifically, we train on concatenated \(D_{1}^{\rm en},D_{2}^{\rm bi},D_{3}^{\rm de},D_{4}^{\rm hien}\) data where \(D_{s}^{r}\) denotes synthetic data in \(r^{th}\) language from \(s^{th}\) quarter of \(D^{r}\). For \(s=1\), \({\rm En}\) is the anchor language and we evaluate knowledge transfer to \({\rm Hi},{\rm De},{\rm HiEn}\) by looking at conflicts between LLM answer to \({\rm En}\) question from \(D_{1}^{\rm en}\) and LLM answer to parallel \({\rm Hi},{\rm De},{\rm HiEn}\) questions from \(D_{1}^{\rm hi},D_{1}^{\rm de},D_{1}^{\rm hien}\) respectively. As shown in Fig 4, same procedure is followed for \(s\in\{2,3,4\}\) where \({\rm Hi},{\rm De},{\rm HiEn}\) are anchor languages respectively.

Figure 4: Setup for the controlled experiment. We train on unique 25% of the data for each language and test on its parallel data in other three languages.

Figure 3: Avg. Rank and Fraction of tokens which had to be replaced in German and Hindi with parallel English token to achieve consistent answer as English.

 



#### 3.2.2 Results and Analysis

Fig 5 shows there is significantly higher knowledge transfer between languages with similar typology and same script, as compared to the pairs where either typology or script is different (see Fig 18 in Appendix A.5.3 for conflict rate of all language pairs individually). For instance, conflict rate for En-De is much lower than that of En-HiEn, which in turn is lower than that of En-Hi.

We define **Rank** of a token \(x\) in a non-anchor question as the _position_ at which its parallel token from anchor question occurs if we sort all tokens in the vocabulary by cosine similarity with \(x\) in descending order. Rank of a token captures the relative proximity to the an-chor language's parallel token in the embedding space. To assess what it would take to get a non-conflicting answer, we replace tokens in the non-anchor question with their parallel anchor question tokens in the descending order of rank, i.e., farthest (non-anchor,anchor) parallel tokens are replaced first, till we obtain a non-conflicting answer. Fig 2(a) shows dense region of \({\rm De}\) tokens with small ranks which had to be replaced by their parallel anchor question tokens to reach a non-conflicting consistent answer. This shows that having close enough representations for equivalent tokens in different languages might also not be enough, and they have to be same for LLM to learn consistent knowledge. This limitation stems from the representation space LLMs operate in since we project discrete symbols in the continuous embedding space. On the other hand, for Hi in Fig 2(b), average rank of replaced tokens is significantly higher relative to De, likely due to the typology and script differences in case of \({\rm En-Hi}\), which points to the need for near similar representations to share knowledge.

These results show that consistency of LLMs for distant languages is likely to stem from duplication of knowledge across languages in the training data, whereas for languages with similar typology and script, knowledge sharing occurs due to similar representation of equivalent tokens and information propagation. The effect of "duplicate knowledge in LLM training" is also reflected in conflict rate numbers of Tables 1 and 2 which are lower than those in Table 4. Results in Tables 1 and 2 are based on factual questions on well-known real entities, while the Table 4 results are from the controlled experiment with questions about synthetically created non-existent named entities. For the real entities in Tables 1 and 2, LLMs may have been pre-trained on duplicate information about the same entity expressed in multiple languages leading to consistent responses even when the LLM representations of the corresponding entities are significantly different (i.e., no equivalence relationship). However, for the synthetic entities in Table 4, LLMs are unlikely to have seen duplicate knowledge across languages during pre-training and has to learn about them (in one language) during the controlled training process resulting in significantly higher "conflict rates". See Appendix A.2 for more discussion on the effect of duplication of knowledge across languages in LLM's training data.

## 4 Reasoning by Inheritance

Reasoning by Inheritance is also a key building block of common sense and logical reasoning in humans enabled by concept abstractions. Humans identify common patterns amongst instances of the same type and create abstract concepts to reason consistently across all specific instances by inheriting properties from the abstract concept as shown in Fig 1. In this section, we investigate if SOTA LLMs can use their ontological knowledge and inherit properties from abstract concepts consistently across various specific instances of the abstract concept within multiple languages.

We evaluate if an LLM exhibits "Reasoning by

Figure 5: Conflict rate for different language pair types.

Figure 6: Illustration of Rank.



Inheritance" within a language by checking if specific instances of an abstract parent concept inherit properties of the parent without conflicts. Fig 7 shows an example wherein Claude-v1 instant does not exhibit reasoning by inheritance in due to the lack of the right abstractions.

**Dataset.** We prepare a set of 35 abstract concepts and 2396 well known named entities which are specific instances of those abstract concepts. For each one of the abstract concept, we hand-curate set of properties that all of its specific instances should inherit. We create templatized questions from those properties to prepare dataset and translate it to \(\mathrm{Fr}\), \(\mathrm{Es}\), \(\mathrm{De}\), \(\mathrm{Pt}\) and \(\mathrm{Hi}\) using AWS Translate [4]. Fig 19 in Appendix A.6.1 shows a sample of our dataset.

**Methodology.** We evaluate the consistency of LLMs in inheriting and applying ontological knowledge consistently across specific instances of abstract concepts by directly asking in native language if the specific instance has the property of abstract concept and checking if the answer for abstract concept and specific instance are conflicting.

**Metrics.** We compute conflict rate as in the Section 3 but focus on comparing LLM answers on an inheritable property for an abstract parent concept and that of its specific instances.

**Results.** Table 3 shows conflict rate for questions requiring reasoning by inheritance across six languages.[3] We notice that conflict rate is low for for most models but quite high for \(\mathrm{Hi}\), which likely has low representation in the model training corpus. This indicates that the ability to reason by inheritance likely depends on the amount of specific language data during training LLMs, which in turn points to gaps in inductive biases in LLMs. Fig 20 in Appendix A.6.2 shows few LLM responses that violate inheritance constraints with conflicting answers for parent and child concepts.

## 5 Compositional Representation (CoRe)

We now consider mechanisms to mitigate lack of knowledge consistency across languages which emerged as a problem in the prior sections. Our analysis points to two key observations:

1. "Identical" representations for equivalent concepts ensures perfect knowledge transfer while "distant" representations lead to separate copies of knowledge being learned.

2. Languages from different families (such as En and Hi) have distant LLM representations for equivalent concepts resulting in low knowledge sharing between them and high inconsistency unless duplicate information is fed in both languages.

Based on these observations, we propose CoRe with the aim of bridging distant representation spaces to enable greater knowledge sharing. It

Figure 8: CoRe Illustration: LLM can access distant equivalent representations to permit knowledge sharing.

\begin{table}
\begin{tabular}{l c c c c c c c} \hline  & **En** & **Fr** & **Es** & **De** & **Pt** & **Hi** & **Avg** \\ \hline
**Claude v1 Instant** & 3.36 & 18.33 & 17.16 & 9.12 & 15.05 & 36.5 & 16.59 \\
**Claude v2** & 3.37 & 4.55 & 11.69 & 4.96 & 6.78 & 18.53 & 8.31 \\
**Claude v3 Sonnet** & **0.13** & **4.43** & **7.27** & **1.86** & **5.41** & **14.69** & **5.63** \\
**BLOOMZ-7B** & 4.78 & 8.76 & 7.49 & 8.08 & 10.4 & 23.27 & 10.46 \\
**XGLM-7.5B** & 36.61 & 30.87 & 35.65 & 36.5 & 37.27 & 33.59 & 35.08 \\ \hline \end{tabular}
\end{table}
Table 3: Conflict rate of LLM answers on inheritance-based questions on common concepts in En, Fr, Es, De, Pt, Hi.

Figure 7: An example of LLM (Claude v1 Instant) exhibiting reasoning by inheritance in but not in \(\mathrm{Hi}\).

 

hinges on the key idea that representing a concept via composition of representations of all equivalent concepts across languages would enable LLM to maintain consistent knowledge for that concept across languages as shown in Fig. 8. This is in contrast to the current LLM models (Fig. 9) where a sentence input into the transformer decoder in LLMs does not have access to representations of equivalent tokens from distant languages and can only utilize the localised knowledge in that language's representation space.

### Methodology

Attention Vaswani et al. [2017] is an essential mechanism of transformer architecture that converts an input sequence into a latent encoding using representational vectors formed from the input, i.e., queries, keys and values to determine the importance of each portion of input while decoding. Typically, in transformers, each token pays attention to other nearby tokens in the input sequence. Since this process can miss out on equivalent tokens in other languages, especially in the absence of a parallel multi-lingual corpus, we modify the learning approach to consider all tokens in the vocabulary as candidates for attention. Specifically our methodology consists of two steps: (a) proximal token selection, and (b) construction of compositional representation, which we describe below.

**Step 1: Proximal token selection.** For a given token, we first select the top-\(n\) proximal tokens across each language based on compatibility of the existing representations. Formally, let \(X=[x_{i}]^{N}_{i=1}\) and \(Z=[z_{i}]^{N}_{i=1}\) denote the sequence of input tokens and the associated embedding representations of size \(d_{o}\). Let \(U=[u_{j}]^{M}_{j=1}\) be all the vocabulary tokens and \(B=[b_{j}]^{M}_{j=1}\) be the associated embedding representations of size \(d_{o}\). Further, let \(U^{r}\) be the vocabulary tokens associated with the language \(r\in R\), where \(R\) denotes the entire set of languages being considered. Let \(Q=[q_{i}]^{N}_{i=1}\), \(K=[k_{j}]^{M}_{j=1}\) and \(V=[v_{j}]^{M}_{j=1}\) be the sequences of query, key and value vectors of dimensions \(d_{k},d_{k}\) and \(d_{v}\) respectively, given by \(q_{i}=z_{i}^{T}W_{Q}\), \(k_{j}=b_{j}^{T}W_{K}\) and \(v_{j}=b_{j}^{T}W_{V}\) where \(W_{Q}\in R^{d_{o}\times d_{k}}\), \(W_{K}\in R^{d_{o}\times d_{k}}\) and \(W_{V}\in R^{d_{o}\times d_{v}}\) are the learned projection matrices. Let \(C=\frac{QKT^{\prime}}{\sqrt{d_{k}}}\in R^{N\times M}\) be the compatibility matrix between \(Q\) and \(K\).

For each input token \(x_{i}\), we identify the top \(n\) proximal or most-compatible tokens from each language \(r\in R\) as per the compatibility values:

\[U^{r}_{sel}(i)=\{u_{j}|C_{ij}\in\text{top-$n$}(\{C_{ij}|u_{j}\in U^{r}\}),\]

where top-\(n(\cdot)\) denotes the largest \(n\) values of the input set. Note that in addition to using the organic representations for estimating compatibility, we could also use additional cues from domain ontologies or dictionaries to construct this proximal token set. Further, to ensure computational efficiency, instead of considering the entire set of vocabulary, a smaller candidate pool of tokens per language can be chosen using K-NN based on existing token embeddings at each stage.

**Step 2: Construction of compositional representation.** The next step is to build a compositional representation from all the selected proximal tokens similar to regular attention mechanism. To ensure only the selected proximal tokens contribute, we define \(f(C)=[f_{ij}]\) where,

\[f_{ij}=\begin{cases}0&\text{if $u_{j}\in U^{r}_{sel}(i)$ }~{}\forall r\in R\\ -\infty&\text{otherwise.}\end{cases} \tag{1}\]

We augment representation of \(Z\) being input to the decoder layer as \(Z^{\prime}=softmax(C+f(C))V\). Since \(R\) includes all the languages including ones distant from that of the input sequence \(X\), \(Z^{\prime}\) becomes a composition of equivalent tokens from all the languages yielding more consistent responses.

### Experiments and Results

CoRe augments the transformer architecture and can be used while pretraining LLMs. However, since pretraining entails additional compute cost, it is preferable to use CoRe with existing pre-trained models. For our experiments, we augment pretrained XGLM-4.SB model with CoRe.

**Dataset, Downstream Task and Implementation Details.** Since we want to examine if CoRe helps improve consistency among distant languages, we use the same dataset and setup as the controlled experiment in Sec 3.2.1. We augment XGLM architecture and add CoRe to it. We initialize learnable projection matrices \(W_{Q},W_{K},W_{V}\) by identity matrix to ensure stable continual training and choose \(n\in\{5,10,15\}\) for selecting the top-\(n\) tokens for our experiment. In our experiments, for

Figure 9: Default mechanism in Transformers.

 

each one of the languages we are working with \(({\rm En},{\rm Hi},{\rm De},{\rm HiEn})\), we consider the top-\(n\) most compatible tokens from all vocabulary tokens of that language and \({\rm En}\). This considers \({\rm En}\) as the anchor language and helps build a "bridge" between distant representation spaces of other languages and \({\rm En}\). We did this for more efficient experimentation but there is no constraint in CoRe on the set of languages from which we can choose top-\(n\) proximal tokens. We identify the language(s) a vocabulary token can belong to beforehand using language detector from AWS Comprehend [14] and store the asset for repeated use during forward pass. We use Pytorch [20] and Huggingface Transformers library [35] for implementation. We train baseline XGLM-4.5B and XGLM-4.5B+CoRe for 20k steps on p3dn.24xlarge machine with 8 GPUs with learning rate of 1e-05 and linear learning rate scheduler with 80040 max steps, gradient accumulation steps of 2 and per device training batch size of 1.

**Results.** Table 4 shows that CoRe consistently reduces conflict rate across 12 language pairs, with gains up to 4.7%. Variation in conflict rate with different values of \(n\) suggests that keeping \(n\) static is not ideal as it might add noise to representations in some cases. Distribution of cosine similarity of random 1K parallel \({\rm En}\)-\({\rm De}\) words in Fig 10 shows that representations from CoRe for equivalent words are closer with similar behavior observed for other language pairs. Fig 21 in Appendix A.7.1 shows sample questions where XGLM-4.5B+CoRe provides more consistent answers compared to XGLM-4.5B (baseline). To evaluate CoRe's impact on a downstream task we did a small scale experiment for NLI task on XNLI [6] dataset and observed 14% reduction in inconsistency across predictions for parallel \({\rm En}\)-\({\rm De}\) NLI data points without hurting NLI performance, see Appendix A.7.2 for more details.

**Efficiency of CoRe.** In our experiments, adding CoRe increased the training time by \(\sim\)50% but that is without using FlashAttention [9] for CoRe which is expected to be \(\sim\)2x faster. We were unable to experiment using FlashAttention because we only had access to V100 machine. Since compatibility matrix is constructed by dot product of \(Q\) and \(K\) matrices as described in Sec 5.1, this is a computationally intensive operation which can be made more efficient by considering a smaller candidate pool of tokens per language of interest using a more efficient method like K-NN before constructing compatibility matrix. We will be experimenting with these alternatives which can improve computational efficiency of CoRe as part of our future work.

## 6 Conclusion

We introduce "Reasoning by Equivalence" and "Reasoning by Inheritance" tasks and evaluate popular LLMs to highlight the lack of consistent representation across languages. This systemic gap manifests in inefficient learning, limited knowledge sharing, and over-reliance on extensive data and computational resources, pointing to the need for better representations. We also perform controlled experiments to identify the influencing factors and propose CoRe to bridge the gap between distant language representations which leads to 4.7% boost in performance. We hope our work spurs further research on gaining richer understanding of LLM-based reasoning across languages.

Figure 10: Distribution of cosine score of random 1K parallel En-De words.

 



### Limitations

Our current work has a few limitations, which we discuss below.

_Scope of Relationships:_ Our study focuses on LLMs' ability to reason based on two foundational relationships: "equivalence" and "inheritance." Future research could broaden this scope to include other key relationships such as "cause and effect," "comparison," and "mereological" relationships. Our proposed CoRe approach is also applicable only to symmetric relationships such as "equivalence," but there is a possibility of extending to asymmetric and transitive relationships using hyperbolic representations.

_Evaluation Focus:_ Current experiments primarily targeted objective, factoid-based questions, chosen for their clarity and the feasibility of automated evaluation via LLM-based judges. This approach facilitated a less ambiguous assessment of LLM reasoning capabilities and the benefits of our CoRe-based mitigation. However, reasoning tasks do encompass subjective, long-form generation tasks such as summarization and problem solving, which can be explored in future, since that could entail access to expensive human-in-the-loop evaluations.

_LLM Architectures:_ Our current work focuses exclusively on transformer-based autoregressive generative LLMs,which include widely used models such as Claude, XGLM, GPT-4, and LLama. Recent advances in neuro-symbolic methods offer alternative architectures and training methods that enhance reasoning abilities albeit at a higher computational costs that limits their adoption in real-world application. Our research identifies specific gaps in the popular LLMs, highlighting the need to integrate ideas from neuro-symbolic research.

## Ethics Statement

Our research aims to identify and address gaps in the reasoning abilities of widely used LLMs, particularly for low-resource languages used by a large population of the world. To ensure the validity of our findings, we created a new parallel factoid QA datasets and conducted controlled experiments to prevent data duplication across languages in LLM training data from influencing LLM reasoning performance. The datasets used have no associated privacy or intellectual property concerns, and we plan to open-source them post-review to adhere to double-blind protocol and ensure reproducibility. Evaluation was performed using automated LLMs, with prompts detailed in the appendix for transparency. Beyond the common ethical considerations of using generative language models, our work did not involve any additional ethical issues.

## References

* Ahuja et al. (2023) Kabir Ahuja, Harshita Diddee, Rishav Hada, Milliocent Ochieng, Krithika Ramesh, Prachi Jain, Akshasy Nambi, Tanuya Ganu, Sameer Segal, Maxamed Axmed, Kalika Bali, and Sunayana Sitaram. 2023. Mega: Multilingual evaluation of generative ai. _Preprint_, arXiv:2303.12528.
* Ahuja et al. (2024) Sanchit Ahuja, Divyanshu Aggarwal, Varun Gumma, Ishaan Watts, Ashutosh Sathe, Millicent Ochieng, Rishaw Hada, Prachi Jain, Maxamed Axmed, Kailka Bali, and Sunayana Sitaram. 2024. Megaverse: Benchmarking large language models across languages, modalities, models and tasks. _Preprint_, arXiv:2311.07463.
* An et al. (2023) Shengnan An, Zeqil Lin, Bei Chen, Qiang Fu, Nanning Zheng, and Jian-Guang Lou. 2023. Does deep learning learn to abstract? a systematic probing framework. _Preprint_, arXiv:2302.11978.
* Anthropic (2023a) Anthropic. 2023a. Anthropic support. [https://support.anthropic.com/en/articles/7996845-what-are-some-things-i-can-use-claude-for](https://support.anthropic.com/en/articles/7996845-what-are-some-things-i-can-use-claude-for). Accessed: 14-10-2024.
* Anthropic (2023b) Anthropic. 2023b. Claude 2 model card. [https://www-cdn.antropic.com/ccat9cc247484deccf10%fc699baf29250302ec5da70/claude-2-model-card.pdf](https://www-cdn.antropic.com/ccat9cc247484deccf10%fc699baf29250302ec5da70/claude-2-model-card.pdf). Accessed: 14-10-2024.
* Anthropic (2023c) Anthropic. 2023c. Welcome to claude. [https://docs.anthropic.com/claude/docs/intro-to-claude](https://docs.anthropic.com/claude/docs/intro-to-claude). Accessed: 30-04-2024.
* Anthropic (2024) Anthropic. 2024. Claude 3 model card. [https://www-cdn.anthropic.com/de8ba9b01c9ab7cbabbf5c33bsdb7bbc618857627/Model_Card_Claude_3.pdf](https://www-cdn.anthropic.com/de8ba9b01c9ab7cbabbf5c33bsdb7bbc618857627/Model_Card_Claude_3.pdf). Accessed: 14-10-2024.
* Arora et al. (2023) Gaurav Arora, Surjana Merugu, and Vivek Sembium. 2023. CoMix: Guide transformers to code-mix using POS structure and phonetics. In _Findings of the Association for Computational Linguistics: ACL 2023_, pages 7985-8002, Toronto, Canada. Association for Computational Linguistics.
* Scalable Neurom Symbolic Reasoning via Clustered Embeddings. In _Proceedings of the 19th International Conference on Principles of Knowledge Representation and Reasoning_, pages 421-431.
* AWS (2017a) AWS. 2017a. Aws comprehend. [https://aws.amazon.com/comprehend/](https://aws.amazon.com/comprehend/). Accessed: 14-10-2024.



AWS 2017b. Aws translate. [https://docs.aws.amazon.com/translate/](https://docs.aws.amazon.com/translate/). Accessed: 30-04-2024.
* AWS (2023) AWS. 2023. Aws bedrock claude. [https://aws.amazon.com/bedrock/claude/](https://aws.amazon.com/bedrock/claude/). Accessed: 14-10-2024.
* Bhat et al. (2015) Irshad Ahmad Bhat, Vandan Mujadia, Aniruddha Tammewar, Riyaz Ahmad Bhat, and Manish Shrivastava. 2015. Iiit-h system submission for fire2014 shared task on transliterated search. In _Proceedings of the Forum for Information Retrieval Evaluation_, FIRE '14, pages 48-53, New York, NY, USA. ACM.
* Blevins and Zettlemoyer (2022) Terra Blevins and Luke Zettlemoyer. 2022. Language contamination helps explains the cross-lingual capabilities of English pretrained models. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_, pages 3563-3574, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
* Brown et al. (2020) Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tonn Haighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. _CoRR_, abs/2005.14165.
* Bubeck et al. (2023) Sebastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzh Li, Scott Lundberg, Harsha Nori, Hamid Palangi, Marco Tulio Ribeiro, and Yi Zhang. 2023. Sparks of artificial general intelligence: Early experiments with gpt-4. _Preprint_, arXiv:2303.12712.
* Conneau et al. (2020) Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzman, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_, pages 8440-8451, Online. Association for Computational Linguistics.
* Conneau et al. (2018) Alexis Conneau, Guillaume Lample, Ruty Rinott, Adina Williams, Samuel R. Bowman, Holger Schwenk, and Veselin Stoyanov. 2018. XNLI: evaluating cross-lingual sentence representations. _CoRR_, abs/1809.05053.
* Cao et al. (2022) Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Re. 2022. FlashAttention: Fast and memory-efficient exact attention with IO-awareness. In _Advances in Neural Information Processing Systems (NeurIPS)_.
* Devlin et al. (2018) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. BERT: pre-training of deep bidirectional transformers for language understanding. _CoRR_, abs/1810.04805.
* Enis and Hopkins (2024) Maxim Enis and Mark Hopkins. 2024. From llm to nmt: Advancing low-resource machine translation with Claude. _Preprint_, arXiv:2404.13813.
* Giunchiglia and Walsh (1992) Fausto Giunchiglia and Toby Walsh. 1992. A theory of abstraction. _Artificial Intelligence_, 57(2):323-389.
* Huang and Chang (2023) Jie Huang and Kevin Chen-Chuan Chang. 2023. Towards reasoning in large language models: A survey. _Preprint_, arXiv:2212.10403.
* Hull (1920) Clark L Hull. 1920. Quantitative aspects of the evolution of concepts: An experimental study. _Psychological Monographs_, 28(1):1-85.
* Kassner et al. (2021) Nora Kassner, Philipp Dufter, and Hinrich Schutze. 2021. Multilingual LAMA: Investigating knowledge in multilingual pretrained language models. In _Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume_, pages 3250-3258, Online. Association for Computational Linguistics.
* Khanuja et al. (2021) Simran Khanuja, Diksha Bansal, Sarvesh Mehtuni, Savya Khosla, Atreyee Dey, Balaji Gopalan, Dilip Kumar Margam, Pooja Aggarwal, Rajiv Teja Nagipogu, Shachi Dave, Shruti Gupta, Subhash Chandra Bose Gali, Vish Subramanian, and Partha Talukdar. 2021. Muril: Multilingual representations for indian languages. _Preprint_, arXiv:2103.10730.
* Kumar et al. (2023) Sreejan Kumar, Ishita Dasgupta, Nathaniel D. Daw, Jonathan D. Cohen, and Thomas L. Griffiths. 2023. Disentangling abstraction from statistical pattern matching in human and machine learning. _Preprint_, arXiv:2204.01437.
* a neuro-symbolic reasoner based on descriptions and situations. _Preprint_, arXiv:2402.00591.
* Lin et al. (2022) Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal, Shruti Bhosale, Jingfei Du, Ramakanth Pasunuru, Sam Shleifer, Punit Singh Korau, Vishrav Chaudhary, Brian O'Horo, Jeff Wang, Luke Zettlemoyer, Zornitsa Kozareva, Mona Diab, Veselin Stoyanov, and Xian Li. 2022. Few-shot learning with multilingual generative language models. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_, pages 9019-9052, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
* Liu et al. (2019) Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized BERT pretraining approach. _CoRR_, abs/1907.11692 

Zhiyuan Liu, Yankai Lin, and Maosong Sun. 2021. Representation learning for natural language processing. _CoRR_, abs/2102.03732.
* Marconato et al. (2023) Emanuele Marconato, Gianpaolo Bontempo, Elisa Ficarra, Simone Calderara, Andrea Passerini, and Stefano Teso. 2023. Neuro-symbolic continual learning: Knowledge, reasoning shortcuts and concept rehearsal. _Preprint_, arXiv:2302.01242.
* Mikolov et al. (2013) Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient estimation of word representations in vector space. _Preprint_, arXiv:1301.3781.
* Minsky et al. (1974) Marvin Minsky et al. 1974. A framework for representing knowledge.
* Mitchell (2021) Melanie Mitchell. 2021. Abstraction and analogymaking in artificial intelligence. _Annals of the New York Academy of Sciences_, 1505(1):79-101.
* Muennighoff et al. (2023) Niklas Muennighoff, Thomas Wang, Lintang Sutawika, Adam Roberts, Stella Biderman, Teven Le Scao, M Saiful Bari, Sheng Shen, Zheng-Xin Yong, Hailey Schoelkopf, Xiangru Tang, Dragomir Radev, Alham Flikri Aji, Khalid Almubarak, Samuel Albanie, Zaid Alvarezli, Albert Websson, Edward Raff, and Colin Raffel. 2023. Crosslingual generalization through multitask finetuning. _Preprint_, arXiv:2211.01786.
* OpenAI (2022) OpenAI. 2022. Introducing chatgpt. [https://openai.com/index/chatgpt](https://openai.com/index/chatgpt). Accessed: 30-04-2024.
* OpenAI et al. (2024) OpenAI, Josh Achiam, and Steven Adler et al. 2024. Gpt-4 technical report. _Preprint_, arXiv:2303.08774.
* Paszke et al. (2019) Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshtein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykan Tejani, Sasank Chilamukthy, Benoti Steiner, Lu Fang, Junije Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alche-Buc, E. Fox, and R. Garnett, editors, _Advances in Neural Information Processing Systems 32_, pages 8024-8035. Curran Associates, Inc.
* Rushing (2020) Greg Rushing. 2020. Aus machine learning blog. [https://aws.amazon.com/blogs/machine-learning/amazon-translate-ranked-as-l-machine-translation-provider-by-inton](https://aws.amazon.com/blogs/machine-learning/amazon-translate-ranked-as-l-machine-translation-provider-by-inton). Accessed: 11-10-2024.
* Ke Chao et al. (2023) Teven Le Scao, Angela Fan, and Christopher Akiki et al. 2023. Bloom: A 176b-parameter open-access multilingual language model. _Preprint_, arXiv:2211.05100.
* Vaswani et al. (2017) Ashish Vaswani, Noam M. Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. _ArXiv_, abs/1706.03762.
* Wei et al. (2022) Jason Wei, Yi Tay, Rishi Bonmassani, Colin Raffel, Barret Zoph, Sebastian Borgead, Daniy Yogatama, Maarten Bosma, Denny Zhou, Donald Metzler, Ed H. Chi, Tatsuori Hashimoto, Oriol Vinyals, Percy Liang, Jeff Dean, and William Fedus. 2022. Emergent abilities of large language models. _Preprint_, arXiv:2206.07682.
* Wolf et al. (2020) Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Fantowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Phu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Loest, and Alexander M. Rush. 2020. Transformers: State-of-the-art natural language processing. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_, pages 38-45, Online. Association for Computational Linguistics.
* Wu et al. (2023) Weiqi Wu, Chengyuq Jiang, Yong Jiang, Pengjun Xie, and Kewei Tu. 2023. Do PLMs know and understand ontological knowledge? In _Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, pages 3080-3101, Toronto, Canada. Association for Computational Linguistics.
* Zhao et al. (2023) Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, Yifan Du, Chen Yang, Yushuo Chen, Zhipeng Chen, Jinhao Jiang, Ruiyang Ren, Yifan Li, Xinyu Tang, Zikang Liu, Peiyu Liu, Jian-Yun Nie, and Ji-Rong Wen. 2023. A survey of large language models. _Preprint_, arXiv:2303.18223.

## Appendix A Appendix

### Existence of Equivalence/Inheritance Relationships vs Using them in Multi Step Reasoning

It is important to distinguish between **(a)** the existence of "equivalence" and " inheritance" relationships among concepts in LLM representations, and **(b)** the LLM's ability to actually utilize these relationships (encoded in the representations) for multi step reasoning. The former can be considered a prerequisite for the latter.

By the "existence of an equivalence relationship" between \(\bar{A}\) and \(B\), we mean that the LLM's representations and their direct use during inference allows properties of \(A\) and \(B\) to be transferred to each other or reconciled for conflicts. Similarly, an "inheritance relationship" between \(A\) and \(B\) would imply that \(A\) inherits properties of \(B\).

Consider the question "Does the river Kaveri flow in the same continent as the river Seine?". We could answer this correctly as 

"No" using different sets of prior information with varying levels of reasoning applied. For example, in **Scenario 1**, we might directly utilise the information "Kaveri and Seine flow in different continents". Alternatively, in **Scenario 2**, we might need to combine multiple pieces of information (expressed as entity-attribute or entity relationship predicates) as shown in Fig 11 to arrive at the answer. Scenario 2 demonstrates the ability to generalize from a small set of training data with limited compute effort to address a broader range of questions. To arrive at the correct answer, we need both the basic building block relationships as well as the capability to effectively combine them as part of LLM inference.

In our current study, we are primarily focused on evaluating whether the basic equivalence/inheritance relationships exist in LLMs by assessing simple property transfer and conflict resolution on questions related to equivalent entities or parent-child entities. It is possible that even when the desired relationships hold and properties transfer correctly, there may be gaps in the overall multi-step reasoning process, resulting in an inaccurate LLM response. This is because the existence of "abstraction" or "equivalence/inheritance relationships encoded in LLM representations" does not necessarily mean that the LLM would always effectively leverage this information for its reasoning since the LLM's inference mechanism, which relies on associative attention, differs from logical operations. We do not yet evaluate this larger capability (item b) because there are multiple factors involved, and there is likely a gap in item (a) itself.

### Impact of Prior Information seen during Training

Consider a pair of parallel questions from the MLAMA Kassner et al. (2021) dataset ("Which continent is Kaveri located in ?") as shown in Fig 12. When an LLM provides the same response "Asia" without conflicts for the two parallel questions in \({\rm En}\) and \({\rm Hi}\), it could be due to one of the following two reasons:

1. [leftmargin=*]
2. **Existence of Equivalence relation-ship/Common Abstraction**: The LLM is aware of equivalence between the \({\rm En}\) and \({\rm Hi}\) versions of entities "Kaveri" and "India" in Fig 11 beyond just the basic language constructs.
3. **Duplication of Information**: The LLM could have seen two parallel, aligned pieces of information that "kaveri is located in Asia" in both \({\rm En}\) and \({\rm Hi}\) even though there LLM's representations of the corresponding equivalent entities are highly divergent. In the latter case, while the LLM can answer this specific question well without conflicts, that behavior might not generalize well to other questions about "Kaveri" in \({\rm Hi}\) that were not part of the training data.

Hence, conflict rate estimates could lead to misleading conclusions about the existence of equivalence and inheritance relationships for well-known real entities due to the bias introduced by prior duplicate (or even contradictory) information in the LLM training data across languages. This **effect of "duplicate knowledge in LLM training"** is also reflected in our results, where the conflict rate numbers in Table 4 are higher than those in Tables 1 and 2. We expect the effect observed in Tables 1 and 2 to be more pronounced in public datasets like MLAMA, as they may be part of the LLM's training data, either directly or indirectly. For instance, we generated responses from Claude v1 instant for parallel \({\rm En}-{\rm De}\) 100 randomly sampled questions from MLAMA dataset and observed \(\sim\)15% conflict

Figure 11: An example of prior information which can be combined to answer the question ”Does the river Kaveri flow in the same continent as the river Seine?” in both English and Hindi. Equivalence relationships are in bold.

Figure 12: An example parallel question from MLAMA Kassner et al. (2021) dataset.

 

rate which is much lower than the average results in Tables 1 and 2 (\(\sim\)30%).

### Accounting for LLMs' proficiency in different languages

We evaluate LLMs only on the languages for which there is official documentation of support for that language or there is prior work demonstrating good performance on NLP tasks of that language. For example, Anthropic claims support for English, Spanish, Portuguese, French, German and multiple other languages [5]; AWS, 2023), and also showcases Claude's multilingual capabilities on these languages. Hindi is also mentioned in Claude model cards [6, 47]. In our study, the LLMs we evaluate on a language are proficient with respect to the linguistic patterns and the common vocabulary of that language, which is different from the knowledge (factual information) aspects. Further in our evaluation, we focused on well-formed objective factual questions to avoid variations due to subjective interpretations and cultural nuances. This ensures that the knowledge consistency or alternatively the conflict rate in responses across languages primarily depends on (a) the knowledge duplication in the training data and (b) the effectiveness of knowledge transfer, i.e., equivalent entity representations across the languages. The point we wish to highlight in our work is that LLM training and representations should be designed so as to enable efficient knowledge transfer within and across languages.

### Judge Precision

Table 5 shows precision of Claude v3 Sonnet as the judge in identifying conflicting answers across language pairs obtained by annotating random sample of 100 answer pairs for 5 language pairs each. Prompt for Claude v3 Sonnet judge is shown in Fig 13.

### Reasoning by Equivalence

#### a.5.1 Data Preparation

We hand-curated 51 (parent) abstract concepts manually (e.g., monuments, actors, cities, etc.) that primarily correspond to common nouns. See Fig 14 for full list of the 51 abstract concepts. Then, we created 3641 named entities that are specific instances of these (parent) abstract concepts, e.g., Taj Mahal is a specific instance of monument) using Claude with human review to weed out non-existent ones. For each one of the 3641 named entities, we prepared a set of questions which have objective or factual answers using Claude with the following prompt.

Give different unambiguous complete questions about "{entity}" which have specific factual answers.

We built this prompt after multiple iterations of analysis of generated questions for a small sample of entities. The dimensions of evaluation were: (i) The generated question should be complete and unambiguous, i.e. it should be clear which entity the question is about and what attribute/fact is being asked, (ii) The answer to the generated question should be an unambiguous factual response. From the final set of generated 88,334 questions, we randomly sampled and manually annotated 500 generated questions of which 96.2% were complete and unambiguous, and 99.4% had an unambiguous factual answer. The annotations were done by a professional English speaker.

Our original question set is in \(\mathrm{En}\) which we also translate to \(\mathrm{Fr}\), \(\mathrm{Es}\), \(\mathrm{De}\), \(\mathrm{Pt}\) and \(\mathrm{Hi}\) using AWS Translate [1]. We translated using AWS translate which is one of the best commercial translation services [12]. AWS translate is expected to translate questions while preserving their meaning. We rely on AWS translate to translate the concept into most natural variant in case multiple variants are possible. To get an estimate of lower bound of AWS translate's performance on our datasets, we consider the En-Hi translation task since Hi being a non-Latin language with different lexical representation is much more divergent from En. We enlisted a professional bilingual Hindi and English speaker to annotate a random sample of 200 En-Hi question pairs on the translation accuracy and observe 97.5% accuracy. This high translation accuracy is likely due to the nature of our English questions, which are well-formed and unambiguous. Fig 15 shows few sample questions from our dataset.

#### a.5.2 Analysis

Fig 16 and Fig 17 show sample conflicting answers from various LLMs to equivalent questions from DIL and DOL tasks respectively.

\begin{table}
\begin{tabular}{c c c c c c} \hline
**En-Fr** & **En-Es** & **En-De** & **En-Pt** & **En-Hi** & **Avg** \\ \hline
96\% & 97\% & 94\% & 95\% & 94\% & 95.20\% \\ \hline \end{tabular}
\end{table}
Table 5: Precision of Claude v3 Sonnet as the judge in identifying conflicting answers across language pairs 



#### a.5.3 Additional Details on Controlled Experiment

For computing the rank of a multi-token word, we compute the rank of each one of its tokens and consider the minimum rank amongst them as the rank of multi-token word. Figure 18 shows conflict rate of all (anchor, non-anchor) language pairs with number of training steps.

### Reasoning by Inheritance

#### a.6.1 Dataset

Fig 19 shows sample questions about abstract concepts and their specific instances from our dataset.

#### a.6.2 Qualitative Analysis

Fig 20 shows a few sample errors from various LLMs wherein they violate inheritance constraints by giving conflicting answers for parent and child concept, and across children of the same type.

### Compositional Representation (CoRe)

#### a.7.1 Qualitative Analysis

Fig 21 shows few sample anchor and non-anchor language questions with their answers from XGLM-4.5B (baseline) and XGLM-4.5B+CoRe.

#### a.7.2 Effect of CoRe on a Downstream Task

The main focus of our work in "Reasoning by Equivalence" was to assess if LLMs exhibit consistent knowledge across languages, and we proposed CoRe to improve consistency. However, to evaluate CoRe's impact on a downstream task we performed a small experiment for NLI task on XNLI Conneau et al. (2018) dataset (on first 100 examples from validation set) with the same zero shot setup as XGLM paper Lin et al. (2022) and observed comparable performance with and without CoRe (46-47 for En, 39-40 for De). However, we observed a significant reduction in inconsistency across predictions for parallel \(En-De\) NLI data points (28% inconsistency in predictions without CoRe vs 14% inconsistency with CoRe, wherein model's prediction is said to be inconsistent if it predicts different labels for parallel datapoints across languages (\(En\) and \(De\) in this case)). We anticipate that incorporating CoRe during pre-training or continual training with larger dataset could yield further improvement in downstream task performance as well which we could not do because of compute constraints. We consider those experiments and further evaluation of CoRe across various different tasks

Figure 14: List of 51 (parent) abstract concepts.

Figure 13: Prompt for Claude v3 Sonnet to use it as the judge.



* [15] M. C. Bader, R. D. Kiefer, and A. J. Brox. The role of the action-based action-based action recognition system for action recognition. In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_, pages 2378-2390, 2014.

[MISSING_PAGE_POST]

 

Figure 17: Sample errors from different LLMs on DOL task. Red and Green colored cells highlight conflicting and non-conflicting answers with the anchor language (\({\rm En}\)) answer, respectively.

Figure 18: Figure showing how conflict rate changed during training in controlled experiment.

 

on NLP benchmarks as part of future work.

Figure 19: Dataset sample of questions about abstract concepts and their specific instances which we use to evaluate LLMs for reasoning by inheritance.

Figure 20: Sample errors from various LLMs wherein they violate inheritance constraints. Red and Green colored cells highlight conflicting and non-conflicting answers with the parent concept question’s answer, respectively.

 

* [150] M. C. Bock, J. A. Harvey, and R. H. McIntyre, "A survey of the field-based image classification system for large scale images," in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)_, pp. 2398-2406, 2007.
* [151] D. P. Kingma and S. Welling, "Adam: a method for stochastic optimization," in _Advances in neural information processing systems_, vol. 34, no. 1, pp. 1373-1380, 2014.
* [152] K. L. Chuang, Y. Bengio, and G. Hinton, "Deep residual learning with deep convolutional networks," _arXiv preprint arXiv:1412.6110_, 2014.
* [153] T. Darrell, E. Farhadi, and F. Fergus, "Image recognition using deep belief nets," _IEEE Transactions on Image Processing_, vol. 12, no. 1, pp. 1-10, Jan. 2014.
* [154] I. Goodfellow, I. Guyon-Abadie, and V. Mirza, "Generative adversarial nets for image recognition," _Journal of Machine Learning Research_, vol. 10, no. 1, pp. 1-10, Jan. 2014.
* [155] W. Dong, X. Li, Z. Zhang, and Q. Weinberger, "Learning generative models from tiny data," _Neural Computation_, vol. 10, no. 1, pp. 1-10, Jan. 2014.
* [156] J. Deng, L. Fei, and G. He, "Fashion-specific adversarial nets for image recognition," _CoRR_, abs/1412.05810, 2014.

[MISSING_PAGE_POST]