Simultaneous Translation Attention Mask for KV Cache Alignment

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for fine-tuning large language models (LLMs) for simultaneous translation face inefficiencies due to computational overhead from key-value caching and restrictive decision policies, leading to mismatches between fine-tuning and inference, and positional confusion during KV caching.

Innovation Solution

The introduction of an attention mask called SimulMask, which applies a read-write decision policy to mask selected attentions in the attention matrix, ensuring the LLM only attends to available source tokens during inference, and uses bias vectors to adjust attention behavior, enhancing computational efficiency and accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If current fine-tuning methods use data augmentation or prompt structure modifications, then translation performance may be improved, but computational efficiency deteriorates due to KV caching overhead and expanded training sets

Engineering Contradiction:
Improvetranslation performanceVSAvoidcomputational efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts and removes the harmful KV caching mechanism from the fine-tuning process. By identifying that KV caching causes computational overhead and mismatches between fine-tuning and inference, the invention eliminates this component during fine-tuning while retaining it only during inference, thereby improving computational efficiency without sacrificing translation performance

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces dynamic decision policies that adaptively determine when to read source tokens and when to write target tokens during translation. This dynamic approach allows the system to optimize the translation process in real-time, improving both translation quality and computational efficiency by avoiding rigid, pre-defined translation patterns

Inventive Principle:
Principle #15Dynamics

2Speed

If KV caching is used during inference, then translation speed may improve, but positional confusion occurs during the caching process

Engineering Contradiction:
Improvetranslation speedVSAvoidpositional accuracy
Core Design Contradiction:
SpeedVSMeasurement precision

Solution Approach 1:

The patent introduces an attention mask as an intermediary component that mediates between the KV caching mechanism and the translation process. The attention mask prevents positional confusion by selectively blocking certain attention connections while allowing others, thereby maintaining both the speed benefits of KV caching and the positional accuracy needed for correct translation

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent modifies the attention mechanism by changing the parameters of the attention matrix through masking. By dynamically adjusting which attention weights are active and which are suppressed, the system maintains positional accuracy while still benefiting from the computational efficiency of KV caching, thus resolving the contradiction between speed and precision

Inventive Principle:
Principle #35Parameter changes

3Reliability

If prompt size is increased to improve translation quality, then translation fidelity may improve, but device complexity increases

Engineering Contradiction:
Improvetranslation fidelityVSAvoidprompt structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the translation process into distinct phases: reading source tokens and writing target tokens. By dividing the translation task into these manageable segments controlled by decision policies, the system achieves high translation fidelity without requiring excessively complex or lengthy prompts, thereby reducing device complexity while maintaining quality

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20250356211A1Attention mask for simultaneous translation with positional reordering
Publication Date: 2025.11.20 THE STATE OF OREGON ACTING BY & THROUGH THE OREGON STATE BOARD OF HIGHER EDUCATION ON BEHALF OF OREGON STATE UNIV
  • US20250356211A1 patent drawing
  • US20250356211A1 patent drawing
  • US20250356211A1 patent drawing

AI summary

A computer-implemented method for fine-tuning an autoregressive large language model (LLM) for simultaneous translation is disclosed. The method can receive an input vector comprising a plurality of tokens including source tokens representing a source sequence, a prompt, and target tokens representing a target sequence. The method can train the LLM using the input vector based on a self-attention mechanism, including generating an attention matrix comprising attentions derived from the input vector, and applying an attention mask to the attention matrix. Some entries of the attention mask have a mask indicator indicating corresponding attentions are masked, while other entries of the attention mask have a no-mask indicator indicating corresponding attentions are not masked. The training also includes applying biases to attentions in the attention mask corresponding to no-mask indicators in the attention mask. For each row of the attention matrix, the applied biases increase linearly from left to right.