Attribute-controlled translation (ACT) is a subtask of machine translation that involves controlling stylistic or linguistic attributes (like formality and gender) of translation outputs. While ACT has garnered attention in recent years due to its usefulness in real-world applications, progress in the task is currently limited by dataset availability, since most prior approaches rely on supervised methods. To address this limitation, we propose Retrieval and Attribute-Marking enhanced Prompting (RAMP), which leverages large multilingual language models to perform ACT in few-shot and zero-shot settings. RAMP improves generation accuracy over the standard prompting approach by (1) incorporating a semantic similarity retrieval component for selecting similar in-context examples, and (2) marking in-context examples with attribute annotations. Our comprehensive experiments show that RAMP is a viable approach in both zero-shot and few-shot settings.
翻译:属性可控翻译(ACT)是机器翻译的一个子任务,涉及控制译文输出中的文体或语言属性(如正式程度和性别)。尽管ACT因其在实际应用中的实用性近年来受到关注,但由于大多数先前方法依赖监督学习,该任务的进展目前受限于数据集的可获得性。为解决这一局限,我们提出基于检索与属性标注增强的提示方法(RAMP),该方法利用大规模多语言语言模型在少样本和零样本场景下执行ACT。RAMP通过以下两点提升标准提示方法的生成准确性:(1)引入语义相似性检索组件以选择相似的上下文示例,(2)用属性标注标记上下文示例。我们的综合实验表明,RAMP在零样本和少样本场景中均是一种可行的方法。