The Fifth Elephant winter edition 2019

The Fifth Elephant winter edition 2019

Winter edition of India's most renowned conference on big data and data science

The Fifth Elephant is rated as India’s best conference on big data, data science and application of data to real-life use cases.

It is a conference for practitioners, by practitioners. The Fifth Elephant completed its seventh edition in Bangalore, on 26 and 27 July 2018. The Bangalore edition caters to data and ML engineers, architects, technologists, data scientists, product managers, researchers and business decision-makers.

Hosted by

The Fifth Elephant - known as one of the best data science and Machine Learning conference in Asia - has transitioned into a year-round forum for conversations about data and ML engineering; data science in production; data security and privacy practices. more

ajay unagar


Let's Solve Next Best Action in Marketing with Deep Learning and Genetic Algorithms

Submitted Oct 16, 2018

Customer centricity is a core business priority across industries today. The innumerable channels to reach the customer and associated data sources do complicate the problem, but also present a great opportunity to leverage Artificial Intelligence (AI) to drive significant business impact. The discussion will focus on how to drive a new customer marketing paradigm called Next Best Action. Deep learning algorithms combined with evolutionary genetic algorithms form the core of AI and help with recommendations to optimize every touchpoint with the right channel and content for each customer at the right time. Walk in to hear our experience on this exciting topic.


Healthcare Practitioners are being reached by varied marketing channels by Pharma companies. E.g., Traditional Media, Print Media, Personal Contact, Digital/ Online platforms. These lead to physicians being bombarded with too many marketing touchpoints every day. According to a survey, most valuable 30K HCPs are getting 2700+ Pharma contacts per year, that is equivalent to 1 contact per hour.

Apart from being bombarded with high volume marketing events, the messages broadcasted and channel by which they are broadcasted does not take into consideration physicians affinity to content or channel. A physician might be interested in knowing about the effectiveness of one drug by one channel but might be interested in the safety of another drug by completely different channels. Current marketing practice design marketing actions at a segment level, however, there is a great variation in preferences among the customers within these segments as well.

This led us to find a new solution such that each customer is treated differently to drive engagement which should demonstrably improve sales. The four pillars of Next Best Action marketing are:
(1) Personalize: Pick the channels and content the customer will have an affinity to
(2) Harmonize: Arrange them in the sequence and intensity that optimizes customer experience
(3) Adapt: Be prepared to change every few moves as the customer reacts
(4) Humanize: The human channel (Field) needs convincing; just a directive will not work – sending a reason for a suggestion along with suggested channel and content

We treated this problem as optimization problem – Design a sequence such that expected Sales generated by that is maximum.
To solve this problem, we first needed a function (or model) which can learn expected Sales from a given marketing channel sequence. In the Pharma industry, Sales are not just driven by marketing actions but also depends on physician attributes. We needed a model which can learn marketing channel interactions in relation to customer attributes.

The first deep learning model that comes into mind when implementing sequence learning is obviously LSTM. We have tried LSTM on our data – but LSTM works well if you want to learn long-term dependencies. According to our business understanding, only nearby 2-3 interactions have a combined effect of final sales. In addition, these couplets triplets can be present anywhere in the sequence but can drive the same impact on final sales volume. E.g., If triplet “Email-Call-InPersonContact” is present at the start of the sequence or at the end of the sequence, overall both triplets would have the same impacts. From literature, we learned that CNN works better in such cases (

(1)CNN filters learn interaction of nearby pixels in case of Image Recognition

  • We took an analogy from image recognition and implemented 1D-CNN for sequence evaluation. These filters are expected to learn the impacts of couplets-triplets rather than individual touchpoints or the whole sequence.
    (2) However, sequence alone does not contribute to Sales – the Estimated impact of sequencing is just 5-10%. All of the impacts are driven by total marketing exposure and inherent Physician attributes (Segment, Age, etc), rather than a sequence of exposure.
  • So, after applying 3 CNN layers, we make a fusion of CNN last layer with a Dense layer with Physician attributes. This way target variable is not just dependent of Sequence, but also on HCP for which that sequence is.
    (3) We achieved R2 of ~90% in the forward-looking validation set for the same Physician universe.

Once the model is built which can predict Sales of a sequence, this can work as an objective function for our optimization. We implemented a genetic algorithm for marketing channel sequence optimization with trained CNN model as a scoring function for the sequences. However, our optimization was constrained with multiple business constraints – Maximum allowed touchpoints for each physician in the universe, Business derived events (e.g., Brand Manager want to organize a Speaker Program on a particular day) and Minimum Gap allowed between two events. We have designed GA with constraint satisfaction module such that it these constraints are met, at the same time customer experience is enhanced.

We have implemented this solution with multiple clients and have seen a good impact on their businesses. Next Best Action is a good example of AI applied correctly in Customer-Centric Marketing.

Speaker bio

Mr. Ajay Unagar is Data Science Associate at ZS Associate. ZS is Pharmaceutical Sales and Marketing Consultancy, which specialize in leveraging AI and Machine Learning for client needs. Ajay has been working at ZS associates for past 15 months. He holds a Bachelor Degree from Indian Institute of Technology, Roorkee.


{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

The Fifth Elephant - known as one of the best data science and Machine Learning conference in Asia - has transitioned into a year-round forum for conversations about data and ML engineering; data science in production; data security and privacy practices. more