Logo Lanfrica

ArmelRandy/compositional-translation

Domain:

natural language processing

Record type:

software
Creator:
Arm
Host:
[EMNLP 2025 Findings] Compositional Translation: A Novel LLM-based Approach for Low-resource Machine Translation # Official Repo of Compositional Translation (CompTra) Official implementation of Compositional Translation: A Novel LLM-based Approach for Low-resource Machine Translation with code, prompts and model outputs. # Table of Contents 1. Overview of the Compositional Translation (CompTra) framework 2. Installation 3. Experiments - 3.1 Main Experiments - 3.2 Additional Experiments - 3.3 Comparison to existing approaches - 3.4 Recapitulation - 3.5 Evaluation - 3.6 Ablation Studies 4. Contributions - 4.1 How to add a new model? - 4.2 How to add a new MT benchmark? - 4.3 How to add a new MT method? 5. Miscellaneous 6. Aknowledgements 7. Citations # Overview *Compositional Translation* (CompTra) is designed to help LLMs (in particular decoder-based) perform the Machine Translation (MT) task step by step. As a matter of fact, this technique was designed in order to improve the capabilities of LLMs to perform MT from english to low-resource languages (LRLs), a setup where they still lag behind supervised models such as NLLB. So, how does CompTra work? The task consists into translating a sentence $x$, written in a source language *src* (typically **English**, language in which most LLMs are proficient) into a target language *tgt* (e.g. Amharic). There is selection pool $\mathcal{P} = \{(x_i, y_i)\}_{i=1}^{|\mathcal{P}|}$, i.e. a **small** set of sentence-translation pairs which can be used to translate $x$ (They do not need to have any sort of relatedness with $x$). CompTra works as follow: 1. The LLM $\mathcal{L}$ is used to decompose the sentence $x$ into simple, coherent and independent phrases $s_1, \ldots s_N$. This is done via few-shot prompting (using a *divide prompt*), where the LLM is provided with example of sentences and their division in phrases. $N$ is not a hyperparameter and depends only on the structure of the sentence. 2. A retriever $\mathcal{R}$ takes each phrase and retrieve $k$ similar sentence in $\mathcal{P}$. For each phrase $s_i$ we then hav …