Input Prediction Using Cached RNN State Parameters
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current input prediction methods using recurrent neural networks are time-consuming due to the need to recalculate state parameters for each input text, which increases the time required to determine predicted text.
Innovation Solution
The method involves obtaining a state parameter from a cache for a previous text and using it to determine the state parameter of the current text, allowing the recurrent neural network to predict the next text without recalculating the previous text's state parameter, thereby reducing processing time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If recurrent neural network calculates state parameters for each previous text to determine predicted text, then prediction accuracy is improved, but time required for determination increases
Solution Approach 1:
The patent applies preliminary action by pre-calculating and caching state parameters for previous texts during the training phase. When prediction is needed, these pre-computed state parameters are directly retrieved from cache rather than recalculated, significantly reducing the time required for determination while maintaining prediction accuracy.
Solution Approach 2:
The patent uses copying by creating and storing copies of state parameters in a cache structure. Instead of performing full recurrent neural network calculations during prediction, the system retrieves copied state parameter values from cache, which dramatically speeds up the prediction process while preserving the accuracy that would result from full calculations.
2Reliability
If recurrent neural network processes complete previous texts to determine predicted text, then prediction reliability is improved, but processing complexity increases
Solution Approach 1:
The patent extracts only the essential state parameters from previous texts and stores them in cache. This extraction approach maintains prediction reliability by preserving the critical information needed for accurate prediction, while significantly reducing processing complexity by avoiding the need to handle complete previous texts during prediction operations.
Solution Approach 2:
The patent transforms the complex problem of processing complete previous texts into a simpler parameter-based approach. By changing from text-based processing to state parameter-based processing, the system maintains prediction reliability through accurate state representation while reducing processing complexity through efficient parameter retrieval and manipulation.
3Loss of time
If state parameters are cached for previous texts, then time required for prediction is reduced, but memory storage requirements increase
Solution Approach 1:
The patent employs cheap short-living objects by using compact, efficient data structures for caching state parameters. The cached state parameters are designed to be space-efficient and are selectively retained or discarded based on their utility for prediction, allowing the system to reduce prediction time while minimizing memory storage requirements through pragmatic resource management.
Data Source
AI summary
A method and apparatus for input prediction. The method includes: obtaining an input current text; obtaining a first state parameter of a first text from a cache; inputting the current text and the first state parameter into the recurrent neural network, determining a state parameter of the current text through the recurrent neural network according to the first state parameter; and determining a predicted text of the current text from the word library according to the state parameter of the current text. The first text is a previous text of the current text; the first state parameter is determined through a preset recurrent neural network according to the first text and a state parameter of a previous text of the first text; the recurrent neural network is trained with a preset word library; the word library is used to store words. Through the method and apparatus, time for determining a predicted text is reduced.


