Machine Translation Length Tokens for Exact Output Constraints
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing machine translation systems struggle to accurately control the length of translations, leading to issues such as exceeding length limits, especially in constrained environments like advertisements or user interfaces, and current methods like length normalization, verbosity tokens, and positional encoding are inadequate.
Innovation Solution
Incorporating length tokens into the source and target text during training and inference, using a hybrid approach with both unconstrained and length-constrained machine learning models to iteratively adjust the translation length until it meets the specified limit.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Length of moving object
If length normalization is used to control machine translation output length, then translation length can be controlled to some extent, but matching character number, display width, and spoken duration becomes difficult
Solution Approach 1:
The patent changes the parameter representation from abstract length normalization to concrete character-level tokens. Each character is represented as a separate token in the vocabulary, allowing the model to directly control and count characters during translation generation. This enables precise control over character number, display width, and spoken duration while maintaining translation quality.
2Ease of operation
If verbosity tokens are used to control translation length, then length control is simplified, but translation length cannot be controlled accurately due to the categorical nature of the tokens
Solution Approach 1:
The patent segments the translation output into individual character tokens rather than using coarse verbosity categories. Each character is a separate controllable unit, allowing fine-grained control over the exact length of the translation. This segmentation enables accurate length control while maintaining ease of operation through the token-based generation process.
3Extent of automation
If positional encoding is used to control translation length, then only the token number can be controlled, but character number or display width cannot be precisely controlled
Solution Approach 1:
The patent replaces positional encoding mechanisms with a character-level vocabulary approach. Instead of relying on positional information to infer length constraints, the system uses explicit character tokens that can be directly counted and controlled. This substitution enables precise control over character number and display width while maintaining automation through the token-based generation process.
4Manufacturing precision
If a character-level vocabulary is implemented to control translation length, then character number control is precise, but latency increases significantly
Solution Approach 1:
The patent makes the character-level vocabulary universal by integrating it into the existing translation model architecture. The character tokens are processed through the same neural network layers as regular words, allowing the model to handle both character-level precision and standard translation tasks. This multi-functionality enables precise character control without requiring a separate, specialized system that would increase latency.
5Manufacturing precision
If model output with positional encoding is used, then exact length constraint can be achieved, but translations with exactly the length constraint may not be optimal
Solution Approach 1:
The patent introduces dynamic length control through character-level tokens that can be generated in varying quantities based on the translation content. The model can adaptively determine when to stop generating characters based on the semantic completeness of the translation, rather than being forced to produce exactly a predetermined length. This dynamic approach maintains length constraint compliance while improving translation quality.
Data Source
AI summary
Aspects of the disclosure are directed to controlling machine translation length based on length tokens. The length tokens are included in the machine translation source text and target text during training and also included in the machine translation source text during inference. An output is generated from a machine learning model constrained by length if the output from a machine learning model unconstrained by length outputs a translation exceeding a length limit.


