This paper advances a novel architectural schema anchored upon the Transformer paradigm and innovatively amalgamates the K-means categorization algorithm to augment the contextual apprehension capabilities of the schema. The transformer model performs well in machine translation tasks due to its parallel computing power and multi-head attention mechanism. However, it may encounter contextual ambiguity or ignore local features when dealing with highly complex language structures. To circumvent this constraint, this exposition incorporates the K-Means algorithm, which is used to stratify the lexis and idioms of the input textual matter, thereby facilitating superior identification and preservation of the local structure and contextual intelligence of the language. The advantage of this combination is that K-Means can automatically discover the topic or concept regions in the text, which may be directly related to translation quality. Consequently, the schema contrived herein enlists K-Means as a preparatory phase antecedent to the Transformer and recalibrates the multi-head attention weights to assist in the discrimination of lexis and idioms bearing analogous semantics or functionalities. This ensures the schema accords heightened regard to the contextual intelligence embodied by these clusters during the training phase, rather than merely focusing on locational intelligence.
翻译:本文提出了一种基于Transformer架构的新型体系方案,并创新性地融合了K-means分类算法以增强该方案的上下文理解能力。Transformer模型凭借其并行计算能力和多头注意力机制,在机器翻译任务中表现优异。然而,在处理高度复杂的语言结构时,该模型可能遭遇上下文歧义或忽略局部特征。为突破此限制,本方案引入K-Means算法对输入文本的词汇与习语进行分层处理,从而更有效地识别并保留语言的局部结构与上下文信息。这种组合的优势在于K-Means能自动发现文本中可能与翻译质量直接相关的主题或概念区域。因此,本文设计的方案将K-Means作为Transformer的前置预处理阶段,并重新校准多头注意力权重,以辅助识别具有相似语义或功能的词汇与习语。这确保了该方案在训练阶段能更充分地关注这些聚类所承载的上下文信息,而非仅聚焦于位置信息。