Time2Vec Embedding Layer for Machine Learning Temporal Data

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing machine learning architectures struggle to effectively utilize time as a feature, leading to issues such as exploding and vanishing gradients, and require hand-crafted time features which are costly and require domain expertise.

Innovation Solution

The introduction of a new data structure representation called Time2Vec, which decomposes time into a learnable vector representation, allowing for improved exploitation of temporal information and adaptation to periodicity in data without the need for explicit periodicity definition.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional time-based inputs are used in machine learning architectures, then the model can process temporal data, but the model suffers from exploding and vanishing gradients and requires hand-crafted time features

Engineering Contradiction:
Improvemodel training stabilityVSAvoidfeature engineering complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the time feature from conventional inputs and represents it separately using a vector embedding layer. This extracted time representation is then concatenated with other features, allowing the model to handle temporal information without the complexity of hand-crafted features while maintaining training stability through learned embeddings rather than raw time values

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces a vector embedding layer as an intermediary between raw time inputs and the model processing. This intermediary transforms time into learned vector representations that are more suitable for neural network processing, eliminating the need for hand-crafted features and improving gradient flow stability

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If hand-crafted time features are used, then domain expertise can be incorporated, but the feature engineering process is costly and requires significant domain expertise

Engineering Contradiction:
Improvedomain knowledge integrationVSAvoidfeature engineering time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent enables the model to automatically learn time feature representations through the vector embedding layer during training. Instead of requiring external domain expertise to craft features, the model self-learns optimal time representations from the data, significantly reducing feature engineering time while maintaining adaptability to domain-specific temporal patterns

Inventive Principle:
Principle #25Self-service

3Measurement precision

If more training epochs are used to improve accuracy, then model performance increases, but computational resource requirements increase

Engineering Contradiction:
Improveprediction accuracyVSAvoidcomputational resource consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary transformations to time inputs using vector embeddings before they enter the main model processing. This preprocessing step creates more informative features that accelerate convergence, allowing the model to achieve high accuracy with fewer training epochs and thus reducing overall computational resource consumption

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12236335B2System and method for time-dependent machine learning architecture
Publication Date: 2025.02.25 ROYAL BANK OF CANADA
  • US12236335B2 patent drawing
  • US12236335B2 patent drawing
  • US12236335B2 patent drawing

AI summary

Described in various embodiments herein is a technical solution directed to decomposition of time as an input for machine learning, and various related mechanisms and data structures. In particular, specific machines, computer-readable media, computer processes, and methods are described that are utilized to improve machine learning outcomes, including, improving accuracy, convergence speed (e.g., reduced epochs for training), and reduced overall computational resource requirements. A vector representation of continuous time containing a periodic function with frequency and phase-shift learnable parameters is used to decompose time into output dimensions for improved tracking of periodic behavior of a feature. The vector representation is used to modify time inputs in machine learning architectures.