Sentiment Analysis for Investor Profiles

Published: 10/22/2019  

Last Updated: 10/22/2019


Investors who want to put their savings into financial assets are faced with a wide variety of product offerings. These assets vary in complexity and investment profile. Two fundamental aspects of a financial asset investment must be considered: risk and profitability. The investor should consider the fact that assets with lower risk may have lower profitability, and assets with higher risk may have higher profitability. When investors are not fully aware of an investment profile, they are more apt to make decisions that can result in financial loss. 

Used in a broad range of applications such as marketing, sales, and social media, sentiment analysis has been achieving impressive results for several years. Another use case for sentiment analysis is to analyze customer answers when building an investor profile based on a standard new-account questionnaire. Today, most sentiment analysis tasks are done by humans, which can be labor intensive and inconsistent. 

This paper discusses sentiment analysis using Intel® Optimization for TensorFlow* to help classify investment profiles. It also compares two different environments and the speed at which the analysis is done in each environment.

Solution Architecture and Design

This sentiment analysis solution was developed to identify sentiments in the customer-provided answers to specific investment-related questions. The block diagram below illustrates a simple analysis scenario. 

Sentiment questions for analysis

Hardware Configuration

Table 1 lists the hardware configurations used for the comparison in this paper.

Table 1. Hardware configurations

Platform x86_64
Number of nodes 1
Number of sockets 2
CPU Intel® Xeon® Platinum 8153 processor at 2.00 GHz
Cores per socket, Threads per core 16, 2
Ucode 0x200004d
Hyperthreading (HT) On
Turbo On
BIOS version (including microcode version) SE5C620.86B.00.01.0015.110720180833
System DDR memory configuration 1 slot, 394 GB
Total memory per node (DDR + DCPMM) 394 GB
OS CentOS* Linux* 7 (Core)
Kernel Linux kernel 3.10.0-693.11.6.el7.x86_64
Mitigation variants (1, 2, 3, 3a, 4, L1TF) 3, L1TF
Compiler GCC 6.4.0
Libraries Intel® Optimization for TensorFlow*
Framework version TensorFlow* 1.12
Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN) version Intel MKL-DNN 2018
Dataset ISV data and customer data
Topology  Custom CNN
Batch size 50

Software Configurations

The software configurations used in the analysis and comparison are below.

Optimized Environment

Intel® Distribution for Python* version Python 3.6.1
Intel® Optimization for TensorFlow* version 1.12
Anaconda* version 4.3.25

Default Environment

Python  version Python 3.6.1
TensorFlow version (from pip) 1.12
Anaconda version 4.3.25

Setting up the Environments

The optimized environment, which uses Intel® Math Kernel Library for Deep Neural Neworks (Intel® MKL-DNN) in the back-end, consists of the Intel® Distribution for Python* and the Intel Optimization for TensorFlow.

  1. Install the Intel Distribution for Python.
  2. Install Intel Optimization for TensorFlow.

To install the default environment ( with Eigen* in the back-end), execute:

pip install tensorflow --user

Comparison Results

We used the samples-per-second (SPS) metric while comparing the performance between Intel Optimization for TensorFlow and the default TensorFlow version from pip. 

Sentiment Inference Time on Intel Xeon processor

Cloud Architecture Inference Time (samples per second)
Intel® AI Builders DevCloud CPU optimized 32469.85
CPU non-optimized 37937.99

The chart above shows that Intel Optimization for TensorFlow on the Intel® Xeon® Platinum 8153 processor delivered a performance 1.17x faster than the non-optimized version of TensorFlow with Eigen.


This paper describes how to optimize deep learning inference on an Intel® Xeon® processor for sentiment analysis. A 1.17x speedup was achieved when using the Intel Optimization for TensorFlow on the Intel Xeon Platinum 8153 processor. The solution also took advantage of Intel MKL-DNN optimization to achieve the expected performance.

This solution can help improve a company’s ability to offer more personalized investment options to customers because it helps them more efficiently process investor profiles and it reduces analysis costs using existing hardware solutions.


Using Intel® Distribution for Python* with Anaconda*

Installing Intel Optimization for TensorFlow

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at