Elamur Research

Steering Large Language Models for Machine Translation with Finetuning and In-Context Learning

Paper · 2023 · Duarte M. Alves, Nuno M. Guerreiro, João Alves et al.

Summary

Examples can tell a translator more than which language to use. They can suggest the vocabulary of a medical discussion, the conventions of a legal document, or the tone of a conversation. Yet a system that translates well after specialized training may become worse at using those examples. Alves and colleagues investigate this conflict in machine translation: how to improve translation through training without losing the flexibility that demonstrations provide at the moment of use. They also examine a related practical problem, unwanted generation after an otherwise complete translation.

The experiments start with LLaMA 7B and 13B. The main language coverage comprises 10 directions connecting English with Dutch, French, German, Portuguese, and Russian. For the 7B system, the authors compare updates to the full parameter set with LoRA, an adaptation method that trains a much smaller component. Translation quality is closely matched, although LoRA uses 50 times fewer trainable parameters. Both forms of adaptation generally improve on the pretrained system prompted with demonstrations. They also teach a useful output boundary: generation ends with the requested translation, avoiding the extra material that otherwise needs removal.

The difficulty emerges when demonstrations are supplied to a system trained only on translation requests without examples. Its scores often decline, including on specialized material where examples should provide relevant guidance. The authors change the training inputs to address this mismatch. Each translation request receives a randomly chosen number of demonstrations between 0 and 5, drawn from a separate example pool. Training therefore includes requests with contextual support alongside requests that stand alone. This simple alteration generally restores productive use of demonstrations while maintaining strong translation without them.

The improvement has clear boundaries. The detailed results include directions and domains where demonstrations still fail to help, and individual sentences can deteriorate sharply even when average performance improves. Training with demonstrations lowers the measured frequency of severe failures caused by adding examples, but hallucinations remain. Evaluation relies on automatic translation metrics rather than a systematic human assessment. The paper establishes a practical interaction between training format and later adaptation: efficient translation specialization need not discard contextual flexibility, but preserving that flexibility requires testing it directly.

Deep dive: Steering Large Language Models for Machine Translation with Finetuning and In-Context Learning

How translation fine-tuning changes the use of prompt examples, and how training with demonstrations restores adaptable translation. · about 35 minutes to read

The problem and its context

A translation request carries several obligations

A translation system must preserve the message while changing its language. In practical use, it also needs to follow conventions that the source sentence alone may not reveal. A legal heading has an expected form. A technical abbreviation may have a conventional equivalent. A customer-service reply may require a particular register.

The paper considers demonstrations as a way to communicate such expectations. A prompt contains completed source–translation pairs before presenting the sentence that needs translation. These examples provide evidence about the task and about how the answer should be expressed. The system can respond to that evidence without undergoing another round of parameter updates.

This behavior is usually called in-context learning. It differs from fine-tuning, where training changes parameters so that future requests produce different behavior. With contextual demonstrations, the intervention is carried in the current input. Changing the examples changes the available guidance for that request.

The distinction creates an appealing division of labor. Training can establish broad translation competence, while examples can handle local conventions. A user facing unfamiliar terminology would then supply relevant translations rather than collect enough material for another training run. The authors ask whether these forms of adaptation remain compatible after the system has been specialized.

That compatibility cannot be assumed from a strong translation score alone. A system may produce good translations under the instruction format used in training while reacting poorly to a longer prompt containing demonstrations. The paper therefore treats translation quality and responsiveness to examples as related but separately measurable behaviors.

Why prompting was attractive

The authors situate their work in the development of large language models that can perform tasks from contextual evidence. They connect this ability to Language Models are Few-Shot Learners, and describe translation research in which demonstrations elicit substantial capability without explicit translation-specific training.

The appeal of few-shot learning is especially clear when the desired behavior changes frequently. A fixed translator cannot receive a parameter update for every new document convention. Examples offer a lightweight channel through which a request can specify what matters now.

However, the paper describes this route as fragile. Translation quality depends on the examples selected. A demonstration may be informative, irrelevant, or misleading for the current sentence. The presence of examples is therefore insufficient by itself; their content and the system’s response to them both matter.

The authors discuss this sensitivity through earlier translation-prompting research, including Prompting PaLM for Translation. Their motivation is not that demonstrations always fail. It is that successful prompting comes with choices whose effects can be difficult to predict.

There is also an inference cost. The system must process the demonstrations whenever they accompany a request. Even if the examples are unchanged across many sentences, they occupy input that has to be handled alongside each new source. Training that makes demonstrations unnecessary for ordinary translation could therefore be attractive, provided examples remain available when adaptation is useful.

The answer may be present inside an unsuitable output

Another weakness concerns what happens after the translation. A pretrained system sees completed examples and a new request, then generates a continuation. It may complete the requested answer and continue the surrounding pattern.

The resulting output can contain a correct translation followed by repeated instructions, another source label, or more translation-like material. This behavior is called overgeneration. It differs from a mistranslation within the answer: the desired content may already be there, but generation does not recognize the intended stopping point.

The paper’s pretrained baseline uses a cleanup rule that discards material following the first newline. That procedure extracts the intended answer from a longer continuation. It also means that raw output is not directly suitable for use, and computation may be spent generating text that will immediately be removed.

Prompt formatting offers a plausible remedy. If demonstrations are clearly separated from the final request, perhaps the system will distinguish supporting context from material it should continue. The authors investigate such alternatives, but their larger question concerns whether translation training can establish the boundary more reliably.

Stopping behavior matters independently of average translation quality. A metric applied after cleanup may judge the extracted translation favorably while concealing the extra generation. For this reason, the paper examines output lengths and termination behavior as well as translation scores.

Fine-tuning changes where adaptation happens

When parallel text is available, the authors describe translation-instruction training as an alternative to repeated demonstrations. Each training record presents a source, a requested direction, and the expected translation. Repeated parameter updates make that instruction sufficient to elicit the task.

The paper cites earlier work reporting that such training can outperform prompting alone. This creates a practical opportunity: establish translation behavior once, then use short requests without demonstration overhead. But conventional fine-tuning updates the entire parameter set, which is expensive for a large backbone.

Parameter-efficient methods provide a different update mechanism. The paper places them in the line of research represented by Parameter-Efficient Transfer Learning for NLP. LoRA is the specific method tested against full updates.

The computational question is separate from the contextual-learning question. A smaller trainable component might match full fine-tuning in translation quality yet still impair later prompting. Conversely, preserving demonstrations would be less useful if the adapted translator lost the quality benefits that motivated training.

The study therefore has several connected comparisons. It examines whether LoRA can substitute for full updates, whether translation specialization changes the effect of demonstrations, and whether modifying the training inputs improves that interaction. Each comparison addresses a different part of the proposed combination.

Domain adaptation gives examples a meaningful job

A demonstration from familiar general text may offer little that an already trained translator needs. Accordingly, a failure to improve on general benchmarks would not necessarily show that contextual learning had been damaged.

Specialized domains provide a stronger test. Examples can communicate terminology, register, or formatting that general training does not consistently supply. The paper links this motivation to In-context Examples Selection for Machine Translation, which it describes as showing adaptation from a small example pool.

The important distinction is between examples being unnecessary and examples being difficult for the adapted system to use. If demonstrations merely repeat familiar information, little change is unsurprising. If relevant domain examples systematically reduce scores, their presence is creating a more consequential problem.

The authors consequently evaluate general benchmarks alongside medical, legal, and conversational material. These settings let demonstrations carry information with a plausible practical purpose. They also expose whether successful specialization has come at the expense of flexibility.

The proposed intervention follows directly from that concern. If training always presents the task without demonstrations, later example-bearing requests introduce an input condition the specialization procedure did not exercise. Including those requests during training tests whether broader exposure can preserve useful contextual behavior.

The method, step by step

Assemble general translation data

The training material comes from OPUS parallel corpora. The authors use Europarl and Globalvoices, together with Paracrawl and Tilde. Ubuntu and Wikipedia provide additional material. These sources establish the general translation training condition against which later specialized-domain adaptation is assessed.

The main language set connects English with Dutch and French, and also with German and Portuguese. Russian completes the set. Translation is trained in both directions for each English-centered pairing.

Before drawing the training sample, the authors apply quality filters. Bicleaner uses a threshold of 0.85. Pairs that survive must then receive COMETKiwi scores above 0.8 when assessed in each direction.

These conditions specify the material from which the reported adaptation results arise. They are not merely corpus names: they determine which parallel records can influence training. The paper does not separately compare training with and without these filters, so their individual contribution cannot be extracted from the final scores.

After filtering, the authors take 250K records per language pair. During optimization, sampling is uniform across pairs so that training exposure is comparable. A larger available corpus therefore does not automatically dominate the multilingual training mixture.

The Flores-200 development split supplies validation material for the represented directions. Validation guides prompt and hyper-parameter choices. Final evaluations use test material, allowing those choices to be assessed beyond the data used to select them.

Chinese is handled separately because the authors describe it as unsupported by LLaMA. The separate investigation tests whether the main behavioral pattern persists in those additional directions. It does not redefine the principal experiment as a broad test of language-resource conditions.

Establish what the prompting terms mean

A basic translation instruction identifies the source language and the requested target language, then presents the source sentence. Generation begins where the target answer belongs. This arrangement is used for training without demonstrations and for evaluation when the current request contains no examples.

The paper calls that inference condition zero-shot. For an adapted system, the term concerns the prompt rather than its training history. A zero-shot request can be processed by a system that has already learned from substantial parallel data.

Five-shot evaluation instead places five completed translations in the prompt. Those demonstrations precede the current request and provide contextual evidence. The count describes the current input, not the total number of examples previously available during training.

This distinction is necessary for interpreting the comparisons. An adapted zero-shot result does not represent translation without supervision. A pretrained five-shot result uses examples, but those examples influence the current continuation rather than updating parameters.

The main comparison gives the pretrained baseline demonstrations because the authors regard that as fairer than comparing adaptation only with unsupported prompting. Both routes have access to translation examples, although access occurs through different mechanisms and at different stages.

Train the full parameter set or a smaller component

The initial efficiency experiment uses LLaMA 7B. Full fine-tuning updates the backbone’s parameters, whereas LoRA restricts learning to a smaller trainable adaptation component. Both are trained for translation with the standard cross-entropy objective.

Cross-entropy training encourages probability to be assigned to the expected output tokens. The paper names this objective without presenting its mathematical derivation. The proposed change concerns the information surrounding the translation request, instead of a replacement loss function.

For LoRA, the reported trainable count is 134M. For full updates, the paper gives 6,7B. The authors characterize this as a factor of 50 in trainable parameters.

These counts describe how much of the system is updated. They should not be read as directly measured elapsed-time or energy ratios. The empirical question is whether the much smaller update mechanism preserves translation quality closely enough to support the remaining experiments.

Only the 7B backbone receives this direct full-update comparison because of computational constraints. Once LoRA is found competitive, it becomes the adaptation method used for the subsequent investigations, which also include 13B.

The LoRA settings include a rank, denoted by r. Rank controls the size of the low-rank adaptation used during training. The authors report underfitting in preliminary experiments with lower values, motivating their focus on larger settings.

The hyper-parameter specification gives the relationship between rank and the scaling parameter as:

α = 2 · r

Here, α denotes the LoRA scaling setting, and r denotes rank. The centered dot represents multiplication. This expression specifies a configuration relationship; it is not a new translation objective.

Select training settings on validation performance

For full fine-tuning, the authors first vary learning rate and weight decay without warm-up. They subsequently investigate scheduling and warm-up choices. Selection is based on mean validation COMET across the included language directions.

The chosen full-update configuration uses a learning rate of 1e-6. It has a constant schedule, no warm-up, and no weight decay. The optimizer is AdamW, and the reported batch size is 256.

For the LoRA setup, AdamW is the optimizer, the batch size is 8, and the learning rate is 2e-4. It uses linear scheduling, 500 warm-up steps, and dropout of 0.05. The rank search includes 128 and 256.

The authors also examine weight decay and label smoothing. These settings alter regularization during training. Their search finds limited variation across the evaluated configurations, and they select rank 256 with weight decay 0.0.

There is an unresolved detail in the label-smoothing report. The prose names 0.001 as the selected value, but the strongest COMET row in the accompanying table has 0.01. A precise reconstruction of that setting therefore requires resolving an inconsistency within the paper.

The 13B experiments reuse the 7B hyper-parameters. This keeps the training recipe consistent across backbone sizes, but it also means that the larger system does not receive a separately reported hyper-parameter search of the same kind.

Introduce demonstrations while fine-tuning

The central intervention changes how each training input is assembled. The authors first reserve an example pool separately from the translation records used as the current prediction targets. Demonstrations are drawn from that pool.

For a training item, the number of demonstrations is sampled uniformly between 0 and 5. The selected completed translations are placed before the current translation request. Training then proceeds using the expected translation for that request.

Translation training that includes contextual demonstrations

The steps in order.

Translation training that includes contextual demonstrationsStep 1: Filter general parallel text1. Filter general parallel textStep 2: Reserve a separate demonstration pool2. Reserve a separate demonstration poolStep 3: Draw the current training pair3. Draw the current training pairStep 4: Sample 0 to 5 contextual examples4. Sample 0 to 5 contextual examplesStep 5: Build examples followed by the request5. Build examples followed by the requestStep 6: Optimize translation through LoRA updates6. Optimize translation through LoRA updatesStep 7: Test requests with and without examples7. Test requests with and without examples

The count of 0 retains the ordinary demonstration-free condition within the training mixture. Other sampled counts expose the system to supporting translations. A single adaptation procedure therefore encounters both short requests and requests containing contextual evidence.

The separation between completed examples and the current target is central. Demonstrations are already answered translation items. They should inform generation, but they are not additional requests whose answers must be generated after the current translation.

The authors connect their sampling choice to Rethinking the Role of Demonstrations. Their own experiment applies this form of input variation to translation fine-tuning and evaluates whether later demonstrations remain useful.

This procedure introduces no domain-specific objective. The training still uses general translation data and cross-entropy. Specialized information enters the later evaluation through examples drawn from the relevant domain’s development material.

Nor does the method introduce a learned retriever for choosing demonstrations. Sampling is the specified mechanism. The study consequently tests compatibility with contextual examples under that sampling procedure, instead of solving the broader problem of finding the best examples for every sentence.

Distinguish the examples from the active request

The authors treat demonstration formatting as a hyper-parameter. They investigate a repeated-instruction format and alternatives that collect examples into a more distinct section before the current request.

The repeated arrangement presents the translation task around each completed pair. This resembles a pattern that a pretrained continuation system might extend. The alternatives attempt to make the supporting examples more clearly separate from the sentence awaiting translation.

Prompt selection uses the 7B system trained with demonstrations. The authors compare formats on Flores-200 development data and choose the one with the strongest average COMET score.

When collecting demonstrations for a validation item, they exclude that item from its own context. This avoids presenting the answer to the current validation request as one of its demonstrations. The selected format is then used in the few-shot experiments.

The formatting investigation also serves a diagnostic purpose. If a clearer example section alone prevented unwanted continuation, the stopping problem might be attributable mainly to prompt layout. If fine-tuning changes behavior across layouts, training provides a more substantial explanation.

The paper reports the latter pattern: pretrained generation continues beyond the translation under every tested layout, while the fine-tuned conditions avoid that behavior. The method therefore does more than choose a convenient arrangement of labels.

Compare training exposure and inference context

The evaluation crosses the presence of demonstrations during training with their presence during inference. Ordinary translation fine-tuning is tested on requests both without examples and with five. Training that includes demonstrations receives the same inference comparison.

This crossing separates two possible improvements. A system may become a better translator under either prompt condition, or it may become more responsive to the examples added at inference. The detailed results permit both effects to be examined.

For each test sentence, the contextual examples are sampled uniformly from the corresponding development set. On specialized datasets, that gives the demonstrations domain relevance without placing the test answer itself into the prompt.

The main translation measure is COMET. The authors specify wmt22-comet-da from version 2.0.1 and connect their evaluation to COMET-22. Additional metrics provide alternative views of the outputs.

Finally, the procedure includes behavioral diagnostics. Output lengths help reveal continuation beyond the answer. Sentence-level score changes expose variability hidden by averages. Inspection of severe changes identifies concrete failures associated with adding demonstrations.

The authors make their translation_llm code available. The code release accompanies a method whose central alteration is deliberately small: vary demonstration exposure during translation training, then assess whether that exposure changes subsequent use of context.

Experiments and results

What the benchmarks measure

Flores-200 provides the principal general-domain test. Evaluation covers the directions represented in training. Relevant WMT22 test sets supply another general translation assessment.

The specialized tests serve a different purpose. Medical and Law come from the domain collection associated with Aharoni and Goldberg. TICO and WMT Chat introduce further translation conditions. These datasets test whether demonstrations can supply information beyond general translation training.

Their language coverage is not identical. In the specialized tables, Medical and Law include German–English translation in both directions. TICO includes translation from English into French and Portuguese. Chat additionally includes English-to-German.

The paper reports generating over 100,000 translations across the study. That scale supports comparisons across training conditions, contextual settings, languages, and domains. It does not substitute for diversity in every possible deployment condition, but it gives the central behavioral claim several distinct tests.

COMET is the primary score, with higher values treated as better. The supplementary evaluation includes BLEU, whose cited source is Bleu: a Method for Automatic Evaluation of Machine Translation. The authors also report chrF and COMETKiwi.

The measures do not always produce the same pattern. The paper gives particular attention to learned metrics when analyzing the 13B contextual comparisons. Its argument therefore rests on a collection of measurements and diagnostics, instead of every metric agreeing on every condition.

LoRA closely tracks full fine-tuning

The opening experiment compares the pretrained 7B system under five-shot prompting with adapted systems under zero-shot prompting. The adapted systems differ in whether training updates the full backbone or uses LoRA.

English-to-German on the Flores-200 test illustrates the result:

LLaMA 7B English-to-German, Flores-200 test COMET

Efficient adaptation closely matches full updates and exceeds the pretrained demonstration-based baseline.

LLaMA 7B English-to-German, Flores-200 test COMETPretrained with five demonstrations: 82.74Pretrained with five demonstrations82.74Full fine-tuning without demonstrations: 83.47Full fine-tuning without demonstrations83.47LoRA without demonstrations (this paper): 83.63LoRA without demonstrations (this paper)83.63
The numbers
System or settingCOMET
Pretrained with five demonstrations82.74
Full fine-tuning without demonstrations83.47
LoRA without demonstrations (this paper)83.63

The chart compares complete operating conditions. Demonstrations support the pretrained baseline, whereas training has already established the task for the adapted systems. It is therefore evidence about alternative routes to translation behavior, rather than a comparison holding all supervision timing constant.

Other directions show how close the adaptation methods remain. For German-to-English, both full fine-tuning and LoRA receive 88.66 COMET. Portuguese-to-English gives 88.88 for full updates and 88.91 for LoRA.

The ordering is not uniformly favorable to adaptation. Dutch-to-English receives 86.46 under pretrained five-shot prompting, compared with 86.44 after full updates and 86.40 after LoRA. This exception matters because the paper’s broad conclusion concerns comparable quality and overall improvement, not dominance in every direction.

For English-to-French, full fine-tuning receives 85.39 and LoRA receives 85.36. The pretrained five-shot baseline has 84.52. For English-to-Russian, the adapted scores are 84.91 and 84.73, against 83.44 for the pretrained baseline with examples.

These results make LoRA a credible basis for the remaining experiments. The authors can investigate contextual behavior without carrying the cost of updating every parameter. The result is specific to the tested setup, but it establishes that the efficient route does not introduce a large quality sacrifice in this comparison.

The supplementary lexical and learned metrics support the same broad judgment about LoRA versus full fine-tuning. This agreement strengthens the initial efficiency finding because it is not confined to the headline COMET evaluation.

Demonstrations strongly affect the pretrained baseline

The detailed results also include pretrained generation without demonstrations. The authors do not make this their main baseline because examples substantially improve the original system, especially away from English.

On Flores-200 English-to-Portuguese, pretrained zero-shot COMET is 74.60, whereas five-shot prompting receives 86.43. English-to-Dutch has 73.99 without examples and 83.12 with them.

English-to-Russian shows an especially pronounced contrast: 57.63 without demonstrations and 83.44 with five. These figures demonstrate why a pretrained zero-shot baseline would provide an incomplete account of the capability available before adaptation.

The authors suggest that English-heavy pretraining contributes to the directional imbalance. Their experiments generally show stronger translation into English. They relate this trend to earlier multilingual translation findings, including Massively Multilingual Neural Machine Translation in the Wild.

That explanation remains an interpretation. The study does not independently vary pretraining language proportions to establish their causal role. What is directly measured is the asymmetry in translation scores and the improvement associated with contextual demonstrations.

Useful adaptation appears with limited training data

The authors vary the amount of translation data used for LoRA training. Their reported finding is that the adapted system can exceed pretrained five-shot performance with as few as 2,000 training examples.

This experiment matters because it distinguishes the method’s benefit from a requirement to use the entire sampled corpus. Translation steering is already useful at a smaller data setting investigated in the study.

The result should be attached to its conditions. It concerns the tested backbone, multilingual training arrangement, quality-filtered data, and Flores-200 evaluation. It does not specify how much parallel material every language or domain would require.

The analysis also does not establish a universal point after which further training data become unnecessary. It shows that the comparison with prompting can become favorable before using the full available training sample.

Ordinary training often reverses the benefit of examples

After establishing efficient translation adaptation, the paper evaluates what happens when demonstrations are added to the resulting translator. This is where the central tension appears.

For 7B English-to-French on Flores-200, ordinary translation training gives 85.36 COMET without demonstrations. The score becomes 85.12 when five examples are supplied. English-to-Dutch similarly changes from 83.10 to 82.99.

The phenomenon is not restricted to translation away from English. Russian-to-English changes from 85.42 without examples to 85.30 with them. German-to-English has 88.66 and 88.53 under the corresponding conditions.

There are exceptions. French-to-English receives 88.77 without demonstrations and 88.79 with them. Dutch-to-English receives 86.40 and 86.44. The measured effect is therefore a frequent degradation rather than a rule that every example-bearing request must perform worse.

Specialized domains provide the stronger motivation for concern. A translator may already know enough about general text that general demonstrations are redundant. Medical or legal demonstrations should have a more distinctive role, yet ordinary translation fine-tuning often responds negatively there too.

Domain tests expose the training-format interaction

The Law test for German-to-English provides a clear comparison:

LLaMA 7B German-to-English, Law test COMET

Exposure to demonstrations during training changes their later effect from harmful to helpful.

LLaMA 7B German-to-English, Law test COMETOrdinary training, no demonstrations: 84.11Ordinary training, no demonstrations84.11Ordinary training, five demonstrations: 82.67Ordinary training, five demonstrations82.67Example-bearing training, no demonstrations: 84.26Example-bearing training, nodemonstrations84.26Example-bearing training, five demonstrations (this paper): 84.43Example-bearing training, fivedemonstrations (this paper)84.43
The numbers
System or settingCOMET
Ordinary training, no demonstrations84.11
Ordinary training, five demonstrations82.67
Example-bearing training, no demonstrations84.26
Example-bearing training, five demonstrations (this paper)84.43

The comparison shows more than recovery from the weaker ordinary five-shot condition. Training with demonstrations also produces a stronger demonstration-free result in this setting. The training intervention can affect general translation performance as well as the response to added context.

For Medical German-to-English, ordinary training receives 83.54 without demonstrations and 83.03 with them. The proposed training procedure gives 83.73 and 83.77. The contextual improvement is modest in the latter comparison, but the direction differs from ordinary training.

Law English-to-German behaves similarly. Its ordinary-training scores are 80.83 without examples and 79.35 with examples. Training that includes demonstrations produces 81.55 without them and 81.64 with them.

The pattern is not perfectly uniform across specialized material. In 7B Chat English-to-French, ordinary training gives 86.71 without demonstrations and 86.38 with them. The proposed condition gives 86.52 and 86.62. Examples help within the proposed condition, but the strongest demonstration-free result in that comparison belongs to ordinary training.

This distinction is important. The paper supports a useful change in how contextual evidence is handled. It does not establish that every training-with-examples score exceeds every ordinary-training score.

Training with examples also preserves direct translation

On Flores-200, the 7B system trained with demonstrations often improves even when evaluated without them. English-to-Russian receives 85.41 without examples, followed by 85.57 with five. Ordinary training gives 84.73 and 84.50.

French-to-English provides another example. The proposed training condition receives 88.94 without demonstrations and 88.98 with them. Its ordinary counterpart receives 88.77 and 88.79.

These comparisons address a possible tradeoff. Broadening training to include contextual examples does not generally force the system to depend on examples at inference. Requests without demonstrations remain effective.

There are nevertheless cases where adding demonstrations after the proposed training does not help. English-to-Portuguese receives 87.36 without them and 87.35 with them. On WMT22, English-to-Russian receives 82.33 without examples and 82.24 with examples.

Other WMT22 directions improve. Russian-to-English has 82.97 without demonstrations and 83.12 with them. English-to-German has 80.94 and 81.19. The evidence supports restored usefulness across many settings while retaining variability across directions and benchmarks.

The 13B evidence requires more qualification

The larger backbone frequently has strong direct translation performance, and its contextual patterns are less uniform. The authors note that the degradation from ordinary training is clearer under COMETKiwi than under lexical measures.

For Flores-200 English-to-German, ordinary 13B training receives 84.87 COMET without demonstrations and 84.64 with them. Training with demonstrations receives 85.01 in both conditions.

English-to-Russian reveals a different boundary. Ordinary training has 86.46 without examples and 86.08 with them. The proposed training condition improves those absolute scores to 86.92 and 86.64, but demonstrations still lower COMET within that condition.

There are also directions where ordinary training benefits from examples. English-to-Dutch receives 84.10 without demonstrations and 84.63 with them. This is incompatible with a literal claim that translation fine-tuning necessarily removes the ability to use context.

The specialized 13B results include stronger counterexamples to universal superiority. In Chat English-to-French, ordinary training gives 87.46 without examples and 88.18 with them. Training with demonstrations gives 86.41 and 86.86.

The larger-system results therefore reinforce the need to separate overall tendencies from individual comparisons. The proposed procedure frequently improves the translation system and reduces harmful reactions to examples, but it does not guarantee a contextual gain or the strongest score everywhere.

The paper discusses metric disagreement in light of How Good Are GPT Models at Machine Translation?. Its stated concern is that translations with less literal wording may be poorly represented by reference-overlap scores. That concern motivates examining several metrics instead of interpreting each lexical change as a complete quality judgment.

What the ablations show

Training exposure is the main controlled intervention

The paper offers controlled comparisons and diagnostic studies, rather than a complete component-by-component ablation of a complex architecture. Its most important intervention is whether contextual demonstrations appear during translation training.

This comparison has a useful structure. Both resulting translators can receive the same kind of inference request. Differences in how they react to examples can therefore be examined separately from their demonstration-free translation scores.

The specialized tests sharpen the interpretation. If examples failed only on familiar general material, redundancy would remain a plausible explanation. Their harmful effect across specialized settings supports the authors’ concern that ordinary training makes later example-bearing requests harder to use.

The experiment remains behavioral. It shows a relationship between training exposure and output quality under different prompts. It does not reveal a unique internal representation responsible for the change, or prove that all forms of in-context learning are preserved.

Prompt layouts produce similar validation scores

The authors compare demonstration layouts using the 7B system trained with examples. On the Flores-200 validation split, Formats 1, 2, and 3 receive COMET scores of 85.25, 85.34, and 85.27.

The second format also leads the other reported measures. Its COMETKiwi score is 82.54, its BLEU score is 32.62, and its chrF score is 57.37. The authors choose that format for subsequent few-shot prompting.

The closeness of the scores limits what should be claimed. The result suggests modest sensitivity among these particular alternatives after training. It does not establish that arbitrary prompts, different instructions, or confusing arrangements would behave equally well.

The stopping analysis provides another comparison. All tested layouts permit unwanted continuation from the pretrained backbone. After fine-tuning, none of those layouts exhibits that problem in the reported analysis.

This weakens a purely formatting-based explanation of the improvement. Clearer example sections were a reasonable design choice, but the decisive behavioral change accompanies training across the investigated arrangements.

Increasing the share of requests without examples offers little advantage

The main training mixture samples demonstration counts uniformly between 0 and 5. An alternative puts no examples in 50% of training requests. The remaining requests receive a uniformly selected count between 1 and 5.

This tests whether additional emphasis on direct translation better preserves the no-demonstration condition. Such a mixture could be attractive if contextual training risked making examples necessary.

The authors report similar results, with the alternative slightly weaker. They retain the simpler uniform-count procedure instead of pursuing the alternative further.

The finding supports adequacy within the tested comparison. It does not establish an optimal mixture for every language, dataset size, or deployment preference. Only a limited alternative is investigated.

It also gives no basis for concluding that demonstration count is irrelevant. The experiment changes the distribution of counts during training, not every possible count or arrangement at inference. Its contribution is narrower: heavier emphasis on demonstration-free training is unnecessary for obtaining the reported balance.

The LoRA search supports a sufficiently capable adapter

The hyper-parameter study examines rank and regularization before the main contextual comparison. The authors describe preliminary lower-rank settings as underfitting, which motivates evaluating ranks of 128 and 256.

In the reported validation table, rank 256 with weight decay 0.0 and label smoothing 0.01 receives the highest COMET value, 84.87. A rank-128 setting with weight decay 0.0 and label smoothing 0.05 receives 84.80.

Stronger label smoothing does not improve that search. At rank 128, weight decay 0.0 and smoothing 0.2 give 84.36 COMET. The authors nonetheless characterize the variation across configurations as limited.

These results help establish the adaptation configuration. They do not explain the recovery of contextual behavior by themselves, because demonstration exposure is a separate intervention.

The search also leaves the reporting discrepancy already noted: the prose’s selected smoothing value differs from the strongest table row. That uncertainty concerns reproduction of the exact configuration, rather than evidence that demonstration mixing was not performed.

Chinese repeats the main behavioral pattern

The Chinese investigation extends the comparison to a language the authors describe as unsupported by the starting backbone. It first asks whether LoRA remains competitive with full updates.

On Flores-200 English-to-Chinese, full fine-tuning receives 72.94 COMET and LoRA receives 72.43. The pretrained five-shot result is 66.04. Chinese-to-English gives 83.68 for full updates and 83.15 for LoRA, against 82.27 for pretrained five-shot prompting.

The contextual comparison again favors training exposure. For English-to-Chinese, ordinary LoRA training receives 72.43 without demonstrations and 71.77 with them. Training with examples gives 74.25 and 74.74.

Chinese-to-English has 83.15 without examples and 82.57 with examples after ordinary training. Under the proposed training condition, those scores are 83.71 and 83.73.

These results extend the observed pattern beyond the principal language set. They do not amount to broad evidence for low-resource generalization or for translation directions that omit English. Their value is that a further language condition preserves the same interaction between training format and later demonstrations.

Length distributions diagnose answer boundaries

The authors compare tokenized generation lengths against reference lengths. For 7B, the adapted systems produce distributions resembling the references, whereas pretrained generation contains additional continuation.

The qualitative example is especially informative because the translation itself is the same across conditions. The pretrained output continues into instruction-like material after producing the Portuguese answer. Both adapted systems stop at the translation.

That example isolates a practical distinction that a translation score could miss. A system can provide the right content and still package it inside an unsuitable continuation. The improvement concerns where generation terminates, not necessarily a different lexical choice within the answer.

The authors report that adapted generation uses an end-of-sentence token rather than relying on a newline boundary. They also describe a similar output-length pattern for 13B.

Length agreement has a specific evidential role. It supports the claim that unwanted continuation has been removed in the tested outputs. It cannot establish that every remaining translation is complete, accurate, or free from unsupported content.

Sentence-level changes have long tails

To examine the effect of demonstrations more closely, the authors compare COMET for each sentence under the two prompting conditions. Their plots interpret positive changes using:

∆ > 0

Here, ∆ represents the COMET change associated with adding examples. A value above 0 means that the example-bearing output receives the higher score. This is the paper’s sign convention for the diagnostic plots.

For the 7B system trained with demonstrations, many sentence-level changes lie slightly on the positive side. However, the distributions extend far in both directions, especially for translation away from English.

The supplementary analysis finds similar tails after ordinary training and across specialized domains. Examples can therefore have a large effect on particular sentences even when the average change is small.

Manual inspection gives those tails an interpretation. Some demonstrations correct generation in the wrong language. Others improve a domain-specific expression. Harmful cases can instead become repetitive, unrelated to the source, or otherwise severely degraded.

The legal terminology example shows how contextual information can help. A German abbreviation remains unchanged in the demonstration-free English output, but contextual support leads to the expected English acronym for genetically modified organisms.

A separate legal heading benefits from conventional word ordering. The example-bearing translation follows the reference arrangement more closely than the output produced without examples. These cases demonstrate plausible domain adaptation without implying that every observed gain has the same cause.

Severe contextual failures become less frequent

The authors define a diagnostic for a sharp deterioration after demonstrations are added. They count cases whose demonstration-free translation scores above 30 BLEU and whose example-bearing translation falls below 3.

The thresholds connect the analysis to earlier hallucination-under-perturbation work, including Hallucinations in Large Multilingual Translation Models. Here, adding demonstrations is the input change whose consequences are examined.

For Medical test material, the reported rates are:

Medical test severe-failure diagnostic across language pairs

Training that includes demonstrations lowers the measured rate of failures triggered by adding examples.

Medical test severe-failure diagnostic across language pairs7B ordinary training: 1.097B ordinary training1.097B example-bearing training (this paper): 0.057B example-bearing training (this paper)0.0513B ordinary training: 0.2913B ordinary training0.2913B example-bearing training: 0.0013B example-bearing training0.00
The numbers
System or settinghallucination rate %
7B ordinary training1.09
7B example-bearing training (this paper)0.05
13B ordinary training0.29
13B example-bearing training0.00

The Law diagnostic shows 2.70% for ordinary 7B training and 0.05% for training with demonstrations. For 13B, the corresponding Law rates are 0.48% and 0.15%.

The Chat rates are 1.80% and 0.23% for 7B. At 13B, they are 0.51% and 0.00%. TICO is a useful exception to improvement at every size: its 13B rate is 0.04% under both training conditions.

The authors inspect several kinds of failure. Some outputs detach from the source’s meaning; others become repetitive or use an unintended language. They also observe copying from the instruction, including material from the source or demonstrations.

They report that instruction-copying disappears in the investigated outputs after training with examples. Other hallucinations persist. The measured reduction therefore supports improved robustness to this contextual intervention while preserving the authors’ warning that the remaining failures can be serious.

Limitations

Author-stated boundary: language and resource coverage

The authors explicitly restrict the principal study to high-resource translation involving English. They leave open whether the findings extend to low-resource settings or to language pairs with no English side.

This matters because the procedure assumes access to several useful resources. It uses filtered parallel training records, a separately reserved example pool, and development material for contextual evaluation. Their availability and quality may differ substantially in other conditions.

The Chinese experiments broaden the evidence, but they do not answer the entire generalization question. The tested directions still connect with English. They are not a systematic comparison across resource levels.

Accordingly, the paper supports a claim about the tested adaptation setting. It does not show that variable demonstration exposure is sufficient to preserve contextual learning across every multilingual configuration.

Author-stated boundary: no systematic human assessment

The authors state that time and cost prevented a human quality evaluation. Their central comparisons rely on automatic metrics.

Using several measures is valuable because it exposes agreement and disagreement. The strong agreement on LoRA versus full fine-tuning supports that result. The less uniform contextual findings at 13B make the interpretation more conditional.

The paper’s qualitative inspection identifies recognizable successes and failures, but selected examples are not a substitute for a systematic assessment. They explain what some score changes correspond to without establishing the frequency of every linguistic error type.

The ethics discussion also notes a weakness in evaluations learned from human preferences. Such judgments may overlook better alternatives and assign favorable quality assessments incorrectly. This is an acknowledged concern about the evaluation process, rather than proof that a particular score in the study is wrong.

For readers, the consequence is straightforward: reported gains are gains under the specified measures. They provide evidence about translation quality, but small numerical differences should not automatically be treated as settled human preferences.

Author-stated boundary: hallucinations remain

The authors explicitly describe residual hallucinations as serious. Including demonstrations during training reduces the investigated problem without eliminating it.

That qualification is central to the proposed use of context. Demonstrations are supplied to improve translation, yet the study shows that their introduction can occasionally damage an answer that was previously reasonable.

The remaining failures motivate further investigation into how contextual examples influence generation. The training procedure improves compatibility, but it supplies neither a complete explanation nor a guarantee against harmful output changes.

The ethics statement also identifies inherited risks from large-scale pretraining, including toxic web content and substantial energy consumption during training. It connects those concerns to work such as RealToxicityPrompts and Energy and Policy Considerations for Deep Learning in NLP.

Translation adaptation is not evaluated as a general removal of those risks. The demonstrated improvements concern translation behavior, stopping, and responsiveness to examples.

Reader-inferred boundary: the failure rate is a selective diagnostic

The hallucination-rate calculation requires a particular transition between outputs. A relatively high BLEU score without examples must become a very low score after examples are introduced.

This is useful for studying severe failures caused by the contextual change. It does not count every mistranslation or every unsupported statement. An output that is poor under both conditions falls outside the intended transition.

Subtle meaning changes may also escape the thresholds. A serious factual error need not destroy lexical overlap with the reference. Conversely, a lexical score alone does not explain the full nature of every failure it flags.

The reported rates should therefore be understood as a measure of a specified deterioration pattern. They are not comprehensive estimates of all hallucinations produced by the translators.

A displayed rate of 0.00% likewise does not establish impossibility. It reports the outcome of this diagnostic at the precision used for the tested material. The authors’ broader warning about residual hallucination remains applicable.

Reader-inferred boundary: demonstrations are not uniformly beneficial

The detailed results include contextual declines after the proposed training procedure. They also include settings where ordinary training remains stronger.

This limits the meaning of recovered few-shot capability. It describes a broadly improved response to demonstrations across the experiments, rather than a promise that any given request will benefit from five examples.

Sentence-level tails make this limitation more consequential than a few exceptions in aggregate tables. A favorable average can coexist with a badly damaged translation for an individual source.

The paper does not introduce a decision procedure that predicts when examples should be supplied. It also does not provide a mechanism for choosing between the resulting example-bearing and demonstration-free translations.

Those omissions do not undermine the training comparison. They identify additional requirements for turning an average improvement into dependable behavior on each request.

Reader-inferred boundary: example selection covers a limited condition

Demonstrations are sampled uniformly from the relevant development material. This creates a clear experimental condition, but it does not represent every way contextual examples might be obtained.

The study does not establish robustness to conflicting instructions, systematically incorrect translations, or examples selected to mislead. It also does not compare a broad set of retrieval strategies.

Earlier concerns about demonstration quality therefore remain. Training exposure makes sampled examples more usable in the investigated setting; it does not make selection irrelevant.

The reserved training example pool is another component whose independent effect is not isolated. The paper tests the assembled procedure instead of every alternative relationship between demonstrations and current training targets.

Reader-inferred boundary: efficiency is not a complete systems benchmark

The most explicit numerical efficiency evidence is the trainable-parameter comparison. LoRA reaches closely matched translation scores while updating a much smaller component.

That result does not supply a general conversion into elapsed training time, memory use, financial cost, or energy savings. Those quantities depend on implementation and execution conditions that are not comprehensively benchmarked here.

Eliminating unwanted continuation also has an efficiency rationale: fewer useless output tokens need to be generated. Similarly, translating without demonstrations avoids processing their input tokens. The paper identifies these benefits without presenting a full latency or throughput study.

The direct full-update comparison is additionally limited to 7B. The authors discuss concurrent evidence concerning larger adaptation, but their own controlled experiment does not establish full-update equivalence at 13B.

Reader-inferred boundary: the explanation remains behavioral

The proposed intervention is convincing as an input-training comparison: expose the translator to demonstrations during specialization, then examine its response to them later.

What changes internally is not established. The improvement could involve better separation of context from the active request, more stable language control, or a more reliable interpretation of example-bearing instructions. The reported analyses do not isolate a single cause.

Similarly, matching reference-length distributions cannot demonstrate complete semantic fidelity. It supports a stopping claim. Domain examples support the possibility of terminology adaptation. Severe-failure diagnostics support improved robustness under a particular prompt change.

Keeping these conclusions distinct gives the paper its proper scope. It demonstrates several useful behavioral improvements while leaving the underlying mechanism and broader reliability problem open.

What came after

The citing works establish a research connection

Later citations place the paper alongside work on language adaptation, translation evaluation, contextual communication, and output repair. The available records identify these directions through titles, but do not describe the later experiments or their findings.

That evidence supports a limited account of continuation. The works cite Alves and colleagues and pursue related translation questions. It does not establish that they implement the same demonstration mixture, reproduce the original comparisons, or validate a particular explanation of contextual degradation.

The distinction matters because the original contribution is specific. It changes translation training inputs so that demonstrations remain useful afterwards. A later study can engage with translation adaptation or prompting without adopting that exact intervention.

Broader adaptation and constrained resources

MaLA-500 appears in 2024 with a stated focus on massive language adaptation. Its subject connects to the original paper’s question of how a pretrained system should be changed for multilingual use.

The citation alone does not show whether MaLA-500 uses translation demonstrations during fine-tuning. Nor does it establish whether the work studies the same loss of contextual responsiveness. The documented continuation is the broader adaptation problem.

Layer-aware Dual-directional Modulation, listed in 2026, specifically addresses low-resource machine translation. That places its stated setting beside a boundary the original authors explicitly leave unresolved.

It would be premature to treat the later title as evidence that the original recipe generalizes to low-resource conditions. No result or methodological description establishes that connection. What can be said is that a citing work takes up translation adaptation under a resource condition outside the main experiments.

These directions clarify why the original language limitation remains significant. Efficient specialization and contextual flexibility are not identical questions to expanding language coverage, although a practical multilingual translator may need all of them.

Preferences and the measurement of translation quality

Modeling User Preferences with Automatic Metrics is a 2024 citing work whose title describes construction of a translation preference dataset.

This connects to an unresolved issue in the original study: how to judge the quality changes produced by training and prompting. Alves and colleagues use learned metrics extensively and acknowledge the absence of systematic human assessment.

The later title places user preferences and automatic measurement together. It does not establish that the resulting dataset reassesses the translations in the earlier paper, confirms their rankings, or removes their evaluation limitations.

The relationship is therefore thematic and bibliographic. Both works concern evidence used to evaluate translation behavior, but the available record does not support a more detailed account of methodological inheritance.

Context in conversation and application settings

Context-aware Translation-mediated Conversations identifies conversation as the setting for a context-aware framework. This is adjacent to the original paper’s interest in additional input that helps shape a translation.

The original experiment primarily supplies completed translation examples. The later title does not specify whether its context consists of demonstrations, dialogue history, or another source of information. These forms of context should not be treated as interchangeable.

The connection that can be established is narrower: the citing framework makes contextual translation its subject. That continues the question of how surrounding information should influence the current output, without demonstrating reuse of the original training procedure.

Multilingual Communication in the Asylum Context names fuzzy-match augmentation and adaptive neural machine translation in its title. It also identifies varying resource conditions and limited data as part of the evaluation setting.

Those stated topics intersect with several boundaries of the earlier work: contextual support, adaptation, and resource availability. The application setting is more specific than the general translation-training comparison studied by Alves and colleagues.

The record contains no findings that establish which approach performs best there. It therefore cannot support claims that demonstration-bearing fine-tuning is sufficient for asylum communication, or that the later study solves the earlier hallucination problem.

Prompt quality and translation procedure

How Important is “Perfect” English for Translation Prompts? identifies the language quality of prompts as its question. This relates to the original prompt-format comparison while addressing a different dimension of the input.

Alves and colleagues compare arrangements of examples and instructions. Their similar validation scores do not establish how grammatical imperfections in the instruction affect translation. The later title marks that additional question, but the available record gives no answer to report.

Translation-CoT describes a human-inspired chain-of-thought framework for multilingual translation. Its stated intervention concerns the procedure used to elicit the translation.

That differs from the original paper’s controlled change to demonstration exposure during fine-tuning. The citing relationship does not establish that Translation-CoT adopts that exposure scheme, preserves contextual learning by the same mechanism, or improves the same failure rates.

The title is sufficient to identify another structured approach to translation generation. It is insufficient to describe its intermediate steps or numerical effectiveness.

Diagnosis and repair after generation

Diagnose, Then Repair presents itself as an MQM-guided post-editing framework for domain-specific translation. Its title separates diagnosis from subsequent repair.

This places its stated intervention after an initial translation has been produced. The original paper intervenes earlier, changing training so that the translator handles contextual examples more productively.

The distinction connects to a remaining weakness in the earlier results. Even after improved training, individual outputs can fail severely. A diagnosis-and-repair framework addresses reliability at a different stage, although the available record does not establish whether it targets the same errors.

No later performance figures are available in the citing list, so none can be attributed to this continuation. The supported historical connection is that adaptation, contextual guidance, evaluation, and repair remain subjects of citing work. The original experiment contributes a specific result within that landscape: translation fine-tuning can retain useful demonstration-based adaptation when its own training requests include demonstrations.

Cite

Cite as Duarte M. Alves, Nuno M. Guerreiro, João Alves, José Pombal, Ricardo Rei, José G. C. de Souza, Pierre Colombo and André F. T. Martins. 2023. Steering Large Language Models for Machine Translation with Finetuning and In-Context Learning. Findings of the Association for Computational Linguistics: EMNLP 2023.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2023.findings-emnlp.744

@inproceedings{alves2023steering,
  title = {{Steering Large Language Models for Machine Translation with Finetuning and In-Context Learning}},
  author = {Duarte M. Alves, Nuno M. Guerreiro, João Alves, José Pombal, Ricardo Rei, José G. C. {de Souza}, Pierre Colombo and André F. T. Martins},
  booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2023},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.744},
  url = {https://doi.org/10.18653/v1/2023.findings-emnlp.744}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/alves-2023-steering-large-language-models-machine/