# Sequence Modeling for Beginners

## Sequence Modeling for Beginners

01/04/2020 3

Sequence modeling plays a critical role in applications that require the analysis of input data as a continuous correlated stream instead of as discrete, unrelated entities.

Among the different types of artificial neural networks used in present-day AI applications, feedforward neural networks are the most common. These neural networks are primarily used for applications requiring pattern recognition, such as detecting the presence of cancer from radiology reports. By comparing input reports pertaining to a patient with training data that it is built on, the algorithm can estimate the likelihood of the patient developing cancer. However, what such algorithms cannot do is analyze multiple reports of a patient generated over time to understand if the cancer is progressing or regressing. That’s because it cannot analyze the reports belonging to the same patient as a series of inputs for the same problem. Instead, it only sees them as discrete inputs for different problems or cases. In order to overcome this limitation, Recurrent Neural Networks (RNN) can be used, which specializes in processing sequences of values through a technique called sequence modeling.

## Understanding Sequence Modeling

Sequence modeling, put simply, is the process of generating a sequence of values by analyzing a series of input values. These input values could be time series data where a specific variable, say the demand for a particular product, varies over a period of time. The output could be the prediction of demand for consequent periods. Another example could be text prediction, where based on the sequence of the last phrase and a set of pre-loaded conditions and rules, the sequence modeling algorithm predicts what the next word could be. By using sequence modeling, businesses can achieve more than just pattern generation and prediction.

## Leveraging Sequence Modeling in Enterprise Applications

By using sequence modeling as a part of RNNs, businesses can not only enhance their operations improve their decision-making through the following applications:

## Product Recommendations

Recommendation engines have become a standard component of all ecommerce portals, online marketplaces, and media streaming sites. These recommendation engines analyze an individual user’s browsing and purchase history to suggest products that are most likely to be clicked on and purchased by them. To achieve this, these recommendation engines need to remember more than just the most recent page or link they visited. Sequence modeling allows these recommendation engines to analyze the series of pages visited by individual users and determine the most suitable suggestion.

## Sentiment Analysis

Sentiment analysis from text sources like social media pages requires the analysis of sentences, or sequence of words in combination. Simply fishing for single words like ‘good’ or ‘bad’ won’t give a clear picture, as they can be preceded by a ‘not’ to convey the opposite meaning. To extract the true meaning from content in such cases, sequence modeling-enabled sentiment analysis algorithms can Thus, sequence modeling can be used to understand a brand or product’s popularity directly from their customers via social media and also other channels like review pages and customer care emails.

As most problems solved by AI require the analysis of non-singular data entities, the need for and ubiquity of sequence modeling will continue to increase. In order to make the sequence modeling more effective and applicable in more complex applications, however, it is critical to extend the memory of sequence modeling algorithms so that they can make decisions based on a larger input dataset. Doing so may involve using Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU), among other short-term memory enhancing solutions.

0

• ### Ryan Wills

Incredibly interesting post