top of page

India InsurTech Thought Leadership



A crucial aspect of the machine learning pipeline is feature engineering, it encompasses the process of selecting, transforming, and creating features from raw data to facilitate the development of stable and high-performing machine learning (ML) models. Traditional feature engineering techniques have long been the foundation of building effective models, predating the rise of more automated approaches using deep neural networks. Deep learning (DL) models have emerged as game-changers, especially pushing the boundaries of what is achievable in terms of automatic feature generation. 

At its core, feature engineering involves the transformation of raw data into a format that machine learning algorithms can leverage. Traditional feature engineering, often driven by human expertise and domain knowledge, focuses on extracting meaningful information from raw input data to enhance the model's performance. Driven by the advent of DL models and the continuous need to extract useful information from diverse datasets, improving model performance has transformed feature engineering techniques. 

Feature Engineering Transformed in the Era of Deep Learning

Deep features, derived from deep neural networks, serve as high-level representations of data, enabling machines to grasp complex patterns and nuances. Deep features have become the backbone of many breakthroughs in DL applications, spanning image recognition, natural language processing, healthcare, and autonomous vehicles. The increased adaptation of DL models has emerged as a game-changer, pushing the boundaries of what is achievable in terms of automatic feature generation. 

Convolutional Neural Networks (CNNs) transformed image processing by automatically learning hierarchical features from raw pixel values. Word embeddings along with transfer learning revolutionized how solutions for Natural Language Processing (NLP) are developed. 

Sequential datasets, particularly in time series, commonly employ Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) models. These models efficiently capture temporal dependencies, enabling the extraction of deep features representing sequences of events. In this article, we present a case study that shows how deep learning architectures are leveraged to generate efficient features from raw sequential patient data for estimating health indicators. 

Case Study: Deep Features in Action

Problem Statement

Accurately estimating health risks is imperative for insurers. Develop an ML model for estimating a subject's cardiovascular health indicators based on demographic details, basic anthropometric measurements, and clinical parameters such as blood pressure. Additionally, incorporate time series datasets including ECG and pulse waveforms to accurately estimate risk.

Early Phase Solution

The ML pipeline focused on traditional feature engineering techniques for developing predictor variables. Static features like demographics and anthropometric measurements were transformed by leveraging domain-specific understanding, an example is BMI. 

Hand-crafted features for Time Series Data

In collaboration with domain experts, algorithms were designed to identify clinically significant markers within time series data. These identified markers were then utilized to formulate potential predictor variables, highlighting intensity, power, and variations at these specific time points. Numerous statistical estimates were derived from these pertinent markers. 

Developing these predictor variables demanded substantial coding and development endeavors, coupled with significant investments to amass domain knowledge. However, this approach introduced subjectivity and bias. Time series data, with its intricate temporal patterns and non-linear relationships, posed challenges for handcrafted features. The manual selection of lag features, critical to time series analysis, was challenging, with difficulties in determining the appropriate lag, often resulting in dimensionality issues and overfitting. Additionally, the process proved time-consuming, unwieldy, and lacked scalability.

Unleashing the Power of Deep Learning Architectures

In recent years, DL architectures have gained significant popularity in healthcare predictive models. Especially LSTMs in predicting conditions such as diabetes, cardiovascular diseases, and neurological disorders based on temporal patterns extracted from patient data. LSTMs are extensively used to analyze vital signs, electronic health records (EHR), and wearable device data for early identification of deteriorating health conditions or abnormalities. 

Why LSTM Models

Capture temporal trends: RRNs, especially LSTM models are particularly effective at capturing temporal features in sequential data due to their unique architecture with memory cells that can maintain information over extended sequences. This architecture along with gating mechanisms, enables LSTMs to selectively remember or forget information based on the context, making them adept at handling temporal dependencies. 

Ability to Learn Long-Term Dependencies: The capability of gating mechanisms to selectively update memory cells enables LSTM models to grasp dependencies across extended time intervals. To enhance this, an attention layer is introduced to ensure that only pertinent long-term dependencies.

Model Design

A multivariate LSTM model with attention layers was developed to learn complex and temporal trends from patient data and to estimate the risk for cardiovascular disease. 

  • Embedding Layer converts the input sequence into a dense vector representation. This layer helps the model to learn meaningful representations of the input.

  • The LSTM layers process the embedded sequence, capturing temporal dependencies and patterns. It has memory cells that store and retrieve information over time.

  • The attention mechanism is incorporated after the LSTM layer. It assigns weights to different parts of the input sequence based on their relevance to the current observation. This allows the model to focus on specific elements of the sequence during prediction.

  • The final output is generated considering both the LSTM's hidden states and the attention-weighted input sequence.

The model architecture was designed to handle static datasets and time series data points of varying lengths. This architecture provided the flexibility to directly apply time series data points along with other static parameters like demographics, basic anthropometric measurements, etc. The development process did not necessitate the generation or transformation of manually crafted features. Instead, the neural network architecture was used to generate intricate features within its layers, which were later used for making predictions. 

Major Accomplishments

A powerful predictive model, surpassing traditional feature engineering, was developed, by drastically reducing the feature generation time. This allowed for focused model architecture refinement and hyperparameter experimentation. By incorporating deep features, the model benefited from deep learning's data-driven capabilities, enhancing nuanced representations of temporal relationships, and improving predictive performance by more than 20%.


The new end-to-end learning architecture proved advantageous and scalable, especially for time series data and developing multiple solutions. Additionally, regularized deep learning models exhibited robustness to noisy medical time series data, filtering out irrelevant information for stable results on test datasets.

However, deep features, despite their advantages, pose challenges compared to traditional feature engineering, primarily due to the inherent complexity of deep learning models, resulting in limited interpretability and control over feature extraction. Furthermore, deep learning models often demand extensive computational resources and large amounts of data. Despite these limitations, deep features remain potent in machine learning, as evidenced by their performance in our case study. Thus, a thoughtful consideration of the trade-offs between deep learning and traditional techniques is essential based on the specific requirements and constraints of each problem.

Author: Paul Thottakkara, Sr. Data Scientist, Aureus Analytics

Disclaimer: The opinions expressed within this article are the personal opinions of the author. The facts and opinions appearing in the article do not reflect the views of IIA and IIA does not assume any responsibility or liability for the same.

bottom of page