Structure-Preserving Attention for Stable Seq2Seq Alignment

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing seq2seq neural models struggle with alignment matrix modification during inference, leading to instability and suboptimal output sequence generation, particularly in tasks like text-to-speech where preserving structural alignment is crucial.

Innovation Solution

A structure-preserving secondary attention mechanism is introduced, which generates secondary attention vectors that adhere to a desired alignment structure, using a trained soft-selection ANN to evaluate and combine attention vector candidates, ensuring accurate output sequence prediction.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a primary attention mechanism is used to generate attention vectors in seq2seq models, then the model can process input sequences and generate output sequences, but the alignment matrix structure becomes unstable during inference time

Engineering Contradiction:
Improvealignment stabilityVSAvoidattention mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces a secondary attention mechanism as an intermediary component that works alongside the primary attention mechanism. This secondary mechanism specifically enforces the desired monotonic structure on the alignment matrix, acting as a mediator that corrects structural deviations without completely replacing the primary attention computation. The soft-selection ANN combines outputs from both mechanisms, weighting their contributions to achieve stable alignment.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The attention mechanism is segmented into two distinct functional components: a primary attention mechanism that handles general attention computation and a secondary attention mechanism that specifically enforces structural constraints. This segmentation allows each component to specialize in its function, with the primary mechanism maintaining flexibility and the secondary mechanism ensuring structural stability.

Inventive Principle:
Principle #1Segmentation

2Manufacturing precision

If alignment matrix structure is not preserved during inference, then the model has flexibility in generating output sequences, but the convergence during learning deteriorates

Engineering Contradiction:
Improveoutput sequence precisionVSAvoidlearning convergence stability
Core Design Contradiction:
Manufacturing precisionVSStability of the object's composition

Solution Approach 1:

The secondary attention mechanism provides feedback to the primary attention mechanism by evaluating whether the generated alignment matrix satisfies the desired monotonic structure. The soft-selection ANN uses this structural information as feedback to adjust the weighting between primary and secondary attention outputs, ensuring that learning convergence is maintained while preserving output flexibility.

Inventive Principle:
Principle #23Feedback

3Reliability

If a secondary attention mechanism is added to preserve alignment structure, then alignment stability and convergence improve, but the device complexity increases

Engineering Contradiction:
Improvealignment stabilityVSAvoidattention mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent changes the parameter space by introducing a continuous weighting parameter in the soft-selection ANN that balances the contributions of primary and secondary attention mechanisms. This parameter can be adjusted during training and inference to optimize the trade-off between structural enforcement and computational efficiency, allowing the system to adapt to different operational requirements.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP4032027B1Structure-preserving attention mechanism in sequence-to-sequence neural models
Publication Date: 2026.03.11 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • EP4032027B1 patent drawingFigure 1
  • EP4032027B1 patent drawingFigure 2
  • EP4032027B1 patent drawingFigure 3

AI summary

In a trained attentive decoder of a trained Sequence-to-Sequence (seq2seq) Artificial Neural Network (ANN): obtaining an encoded input vector sequence; generating, using a trained primary attention mechanism of the trained attentive decoder, a primary attention vectors sequence; for each primary attention vector of the primary attention vectors sequence: (a) generating a set of attention vector candidates corresponding to the respective primary attention vector, (b) evaluating, for each attention vector candidate of the set of attention vector candidates, a structure fit measure that quantifies a similarity of the respective attention vector candidate to a desired attention vector structure, (c) generating, using a trained soft-selection ANN, a secondary attention vector based on said evaluation and on state variables of the trained attentive decoder; and generating, using the trained attentive decoder, an output sequence based on the encoded input vector sequence and the secondary attention vectors.