Data & Analytics

Deep Learning and Its Applications in the Energy Industry

This article explains what deep learning is and how it works and presents an example use case from the energy industry.

Digital technology speed connect blue green background, cyber nano information, abstract communication, innovation future tech data, internet network connection, Ai big data, line dot illustration 3d
Source: Phongsak Sangkhamanee/Getty Images

Previous articles have provided a chain of learning that started with a general overview of artificial intelligence (AI) and machine learning (ML) (here and here), a concise description of the hybrid learning paradigm, and the interesting concept of ensemble learning. This article extends the learning chain by explaining, in simple terms, what deep learning is and how it works and the power of its utility, presenting an example use case in the energy industry domain, especially geosciences, which easily can be extended to petroleum engineering.

As we move further along the learning chain, the degree of complexity of the methodologies increases. While the traditional ML methods (such as artificial neural networks, support vector machines, and decision trees) involve only one instance of the respective algorithms, the hybrid ML combines two or more independent algorithms working cooperatively to achieve a common goal. Ensemble learning involves the creation of several instances of the respective independent algorithms to create a “forest,” “committee,” or “multiple classifiers” of hypotheses or decision-making instances. In addition to the increasing degree of complexity, the degree of accuracy also increases. Numerous studies have proved that ensemble methods “very often attain higher accuracy than single models” (Brown 2010). Hybrid ML methods have also been proven to perform better than individual algorithms (Machado and Karray 2022).

This article aims to show how deep learning algorithms exhibit the highest degree of complexity compared with the aforementioned learning methodologies while offering the highest degree of accuracy with its respective types of data and for its unique sets of applications.

What Makes Deep Learning ‘Deep?’
Similar to the traditional machine, hybrid, and ensemble learning paradigms, deep learning seeks to mimic the working of the human brain in its capability to learn from large amounts of data. It takes in raw data, analyses them, extracts features from them, and uses them to make predictions with an incredible degree of accuracy. Also similar to the traditional machine, hybrid, and ensemble learning paradigms, deep learning is a subset of ML (Fig. 1). It is typically a neural network with multiple hidden layers. The number of hidden layers determines the depth and degree of complexity of the network. The deep learning concept emerged from the need to analyze the massive volume of data that we now encounter in our daily personal and work lives. While the traditional neural network with a single layer would make appropriate predictions, adding more hidden layers can help to optimize the network and increase its accuracy.

Fig. 1—A depiction of deep learning as a subset of ML and, in turn, of AI.

Deep Learning and ML: What Are the Differences?
The major difference between deep learning and the traditional ML (now called “shallow” learning), apart from the degree of complexity, is the type of data required and the methods used in the learning process. While ML algorithms are programmed to use structured data (meaning that specific features are defined and organized in rows and columns to form the input data) to make predictions, deep learning algorithms are capable of handling unstructured data without the features being explicitly predefined by human experts. The features are automatically extracted through some preprocessing and analysis procedures before they are internally organized into a structured format.

As an example, let’s say we want to build a model to identify pets. The training data would consist of a set of photos of different pets in different color shades and orientation. Deep learning algorithms can determine which features (e.g., ears, nose, eyes, mouth, fangs, tail) are most important to distinguish each animal from the others. In a petrographic thin section image, such features could be the grain morphology, pore size, grain density, cement content, and grain orientation to identify the rock type. In a geological core image, such features could be bedding laminations, dip angles, image color, and image texture to identify the depositional environment. In the shallow learning paradigm, the features have to be identified, extracted, and organized manually by a human observer or expert. Deep learning, in essence, removes some of the data preprocessing steps that are typically required for ML. Examples of such unstructured data that deep learning algorithms are capable of handling are text, images, videos, audio, and signals. This difference is depicted in Fig. 2.

Fig. 2—The difference between ML and deep learning in terms of feature extraction.

Another major difference between deep learning and ML is in the effect of data size on their performance. While both require a substantial amount of data for sufficient learning and generalization, there is a limit for ML algorithms at which adding more data may not improve the accuracy. The accuracy of deep learning, however, continues to increase as more data are added. This is why deep learning algorithms are said to be scalable in terms of performance. This difference is depicted in Fig. 3.

Fig. 3—The difference between shallow and deep learning in terms of performance scaling with data size.

How Deep Learning Works
The most commonly used deep learning method is the one based on neural networks, called deep neural networks (DNN). DNN consists of multiple layers of interconnected nodes, each taking input from the output of the previous layer and producing an output that becomes input to the next layer to optimize the classification or prediction process. This chain of computations propagated through the network is called forward propagation. The input and output layers of a DNN are called visible layers. Between these two are the hidden layers. The input layer takes input from the data for processing, while the output layer produces the final prediction or classification for a task.

A complementary process to the forward propagation is the backpropagation. This process uses algorithms, such as gradient descent, to estimate the training errors (the residual between the actual training output values and the model predictions) and then adjusts the weights and biases of the network to reduce the errors by going back to the beginning of the hidden layers. The forward propagation and backpropagation processes complementarily allow a neural network to make more accurate predictions with the least error possible. After several iterations (usually called epochs), the algorithm becomes gradually more accurate. This is a description of the simplest architecture of DNN. Deep learning algorithms, however, are incredibly complex. Because of their complexity, they require a tremendous amount of computing power. High-performance graphical processing units are ideal for implementing deep learning algorithms because they can handle a large volume of calculations in multiple cores with copious memory available.

There are different types of DNNs to address specific problems or data sets. Examples include the following:

  • Multilayer perceptrons—These are the most basic DNNs built on top of a feedforward backpropagation artificial neural network (ANN). They are composed of a series of fully connected layers. Each new layer is a set of nonlinear functions of a weighted sum of all outputs (fully connected) from the previous one. It improves on the traditional ANN by using multiple layers to be capable of handling highly nonlinear and complex problems.
  • Convolutional neural networks (CNNs)—These are used primarily in computer vision and image classification applications. They are capable of extracting features and patterns within an image to perform tasks such as object detection or recognition. In 2015, a CNN model outperformed a human in an object recognition challenge for the first time. Common architectures of CNN include AlexNet, GoogleNet, VGGNet, ResNet, DenseNet, InceptionNet, and Xception Net. It is enough to note in this article that these architectures differ in terms of the depth of the hidden layers, width of each hidden layer, and the sequences of the convolution, maxpooling, and dropout processes. A deep dive into the details of these architectures is beyond the scope of this article.
  • Recurrent neural network (RNNs)—These are typically used in natural language, speech recognition, language translation, and image captioning applications. They leverage sequential or time series data. They are incorporated into popular applications such as Siri, Alexa, voice search, and Google Translate. They are unique in their “memory” possession because they take information from previous inputs to determine the current input and output. While traditional DNN paradigms assume that data points in a training data set (inputs and outputs) are independent of one another, RNNs assume that the current data point is an event that depends on the prior ones to form a sequence. Popular architectures include bidirectional RNN, long short-term memory, and gated recurrent units. Details about these architectures are also beyond the scope of this article.
  • Generative adversarial networks (GANs)—These are a type of deep learning algorithms that create new data instances from the pattern embedded in the original data (training data). GANs have two components: a generator, which learns to generate fake data, and a discriminator, which learns from the generated fake information. The use of GANs has increased recently. They have been used to augment limited data to improve model performance for training and generalization in various applications such as thin section, core, and cuttings image classification tasks. GANs have also been used to upscale low-resolution images (thin section, core, and cuttings) as well as videos by recreating them in higher resolutions through image training.
  • Autoencoders—These are a specific type of feedforward neural network that produces an output that is similar to the input. They were designed to solve unsupervised learning problems such as training a neural network model to replicate the same data from the input layer to the output layer. They consist of three main components: the encoder, the code, and the decoder. They can be used to reconstruct an input image or signal as accurately as possible by removing noise. An example application is to improve the quality of thin section, core, or cuttings images by feeding them to an autoencoder neural network model. The model first encodes the image, then reduces the size of the input into a smaller representation, and then decodes the image to generate a reconstructed image with better quality.

Applications of Deep Learning
Deep learning drives many AI applications and services that improve automation and perform analytical and physical tasks without (or with much less) human intervention. The deep learning technology underlies everyday products and services (such as digital assistants, voice-enabled TV remotes, and credit card fraud detection), as well as emerging technologies (such as self-driving cars). It is typically applied in the following scenarios:

  • When faced with huge and complex data sets, deep learning would be the choice. It has outperformed the traditional ML methods in cases of large amounts of data. When faced with tasks with smaller amounts of data, the traditional ML algorithms are preferable.
  • When there is access to high-end computing infrastructure in addition to a large data sets, a deep learning algorithm would be the choice.
  • When there is lack of domain understanding for feature extraction/engineering in application areas that use images, videos, and text, deep learning techniques would be the choice because they completely remove the need for manual feature identification, extraction, and engineering.
  • Deep learning is the method of choice when a complex task involves image classification, audio/video analysis, natural language processing, and speech synthesis and recognition.

The next section presents an example of petrographic thin section analysis to identify rock type based on the Dunham classification scheme.

Automating the Petrographic Thin Section Analysis for Rock Type Identification
Background. A thin section is a thin slice (usually of a width at the micrometer scale) of a rock sample, prepared in a laboratory and ground optically onto a flat glass plate to be examined with any type of microscope. Petrographic thin section analysis is an important geological exploration process to understand the earth’s composition for oil and gas exploration and development. It can be used to identify reservoir rock properties such as diagenesis, sedimentary environment, pore structure, and grain morphology.

Challenges. The traditional thin section analysis work flow is known to depend heavily on the geologists’ level of expertise and personal sense of judgement. As a result, the work flow suffers from subjectivity, high dependence on experience, inconsistent results, heavy human workload, long identification cycle, and incapability to achieve complete and accurate quantification.

Objective. This section reviews a typical application of deep learning methodology to automate thin section analysis for carbonate mineralogical rock type identification.

Benefit. Once this automated work flow has been trained using a geoscience domain expert’s labeled data, both experts and nonexpert geoscientists can use the models to generate consistent, repeatable, efficient, intuitive, and accurate results.

A good example to demonstrate this application is the work of Mosser et al. (2022), which used a CNN-based algorithm, pretrained on ImageNet and fine-tuned on a data set of thin section images from Early to Late Miocene cores acquired during Ocean Drilling Program Leg 194 from the Marion Plateau, northeastern Australia. The ImageNet data set (Deng et al. 2009) contains more than 14 million annotated images according to the WordNet hierarchy. Since 2010, the data set has been used as a benchmark in image classification and object detection tasks. The thin section images are labeled by classifying them into six Dunham rock types: mudstone, wackestone, packstone, grainstone, boundstone, and crystalline (Fig. 4).

Fig. 4—The six Dunham rock types.
Source: Dunham 1962

As depicted in Fig. 2, the feature extraction part of the algorithm produces a lower-dimensional representation of the thin section image features while the classifier transforms the representations into a predicted class probability. The work flow includes labeling, masking/cropping, splitting, image augmentation, image segmentation, model training and optimization, and prediction.

Image labeling involves assigning the right rock type based on human expertise.

Image masking/cropping involves extracting a rectangular representative portion of the original circular image (Fig. 5).

Fig. 5—Stages in the image cropping process.

Data set splitting involves dividing the image data sets into training and testing subsets, usually in the ratio 70:30 or 80:20.

Image augmentation involves creating flipped versions of each image in different angles to ensure orientational representation (Fig. 6).

Fig. 6—Example of image augmentation. (a) Original and the same image rotated by (b) 45°, (c) 90°, and (d) 180°.

Image segmentation involves identifying the boundaries of each grain in the image (Fig. 7).

Fig. 7—Example of image segmentation.

Model training involves using the training data set split to optimize the parameters of the CNN model.

Prediction involves using the patterns embedded in the optimized model to predict the rock type of a new test image (Fig. 8). The output could be mudstone, wackestone, packstone, grainstone, boundstone, or crystalline.

Fig. 8—The trained model, represented by the blocks between the input and output, is presented with a test image (left) to produce the rock type class (right).

This article explains the concept of deep learning and presents an example of classifying thin section images into the right rock type according to the Dunham classification scheme. More detailed and comprehensive examples can be found in Liu et al. (2022) and Liu et al. (2023). Another example involving the application of deep learning for seismic data analysis can be found in Zhang et al. (2022).

Recommended Further Reading
Liu, W. et al. 2017. A Survey of Deep Neural Network Architectures and Their Applications, Neurocomputing 234, pp. 11–26.

Brown, G. 2010. Ensemble Learning. In Encyclopedia of Machine Learning, C. Sammut and G.I. Webb, Springer Press.

Deng, J. et al. 2009. ImageNet: A Large-Scale Hierarchical Image Database. Paper presented at the IEEE Conference on Computer Vision and Pattern Recognition, Miami, Florida, USA.

Dunham, R.J. 1962. Classification of Carbonate Rocks According to Depositional Texture. In Classification of Carbonate Rocks, W.E. Ham, American Association of Petroleum Geologists.

Liu, H. et al. 2022. Rock Thin-Section Analysis and Identification Based on Artificial Intelligent Technique, Petroleum Science 19 (4): 1,605–1,621.

Liu, X. et al. 2023. Using Deep Learning To Predict Dunham Textures and Depositional Facies of Carbonate Rocks From Thin Sections, Geoenergy Science and Engineering 227.

Machado, M.R., and Karray, S. 2022. Applying Hybrid Machine Learning Algorithms To Assess Customer Risk-Adjusted Revenue in the Financial Industry, Electronic Commerce Research and Applications, Vol. 56.

Mahapatra, S. 2018. Why Deep Learning Over Traditional Machine Learning? Towards Data Science (accessed 7 September 2023).

Mosser, L., Ghon, G., and Baechle, G. 2022. Interpretation of Deep Neural Networks for Carbonate Thin Section Classification. Paper presented at the SEG/AAPG International Meeting for Applied Geoscience and Energy, Houston, Texas, USA, August.

Zhang et al., 2022. A Comparison of Deep Learning Methods for Seismic Impedance Inversion, Petroleum Science 19 (3), 1,019–1,030.