Case Study

Debugging a Translation Decoder

Situation: You are building a machine translation system. For one input sentence, the reference translation is "The parcel arrived on Tuesday" (SS^*), but your system produces "The parcel arrived on Monday" (SoutS_{out}). The model assigns each candidate sentence a value with ScoreAScore_A, and a separate approximate search procedure tries to find the sentence with the best value.

Task: Apply the optimization verification test to determine why the system returned "The parcel arrived on Monday." What values would you compare, and how would those comparisons tell you whether the problem is in the search procedure or in the scoring rule?

Sample answer: First, I would evaluate ScoreA("TheparcelarrivedonTuesday")Score_A("The parcel arrived on Tuesday") and ScoreA("TheparcelarrivedonMonday")Score_A("The parcel arrived on Monday"). Next, I would compare them.

  • If ScoreA("TheparcelarrivedonTuesday")Score_A("The parcel arrived on Tuesday") is greater than ScoreA("TheparcelarrivedonMonday")Score_A("The parcel arrived on Monday"), then the scoring rule is favoring the correct translation. In that case, the approximate search procedure is likely at fault because it failed to return the highest-scoring candidate.
  • If ScoreA("TheparcelarrivedonTuesday")Score_A("The parcel arrived on Tuesday") is not greater than ScoreA("TheparcelarrivedonMonday")Score_A("The parcel arrived on Monday"), then the scoring rule is giving the wrong answer a score that is too high, so the scoring rule should be corrected.

Key points:

  • Measure ScoreA(S)Score_A(S^*) and ScoreA(Sout)Score_A(S_{out}).
  • Compare ScoreA(S)Score_A(S^*) with ScoreA(Sout)Score_A(S_{out}).
  • If the correct sentence scores higher, investigate the search procedure.
  • If it does not, investigate the scoring rule.

Rubric: A strong answer will name the two candidate sentences, state that both scores should be computed, and explain how the comparison identifies whether the fault lies in search or in scoring.

0

1

Updated 2026-08-12

Contributors are:

Who are from:

Tags

Machine Learning

Deep Learning

Supervised Learning

Dive into Deep Learning @ D2L

Data Science

Machine Learning Strategy

Machine Learning Yearning @ DeepLearning.AI