Author: Laura Lima
Illustrative image. Source: [1].
As a geologist applying data science to geological classification for five years, I have seen the good, the bad, and the ugly of Machine Learning in geology, particularly with facies prediction. This process has been both immensely challenging and rewarding, so I would like to offer you guidance on how to achieve success while avoiding some of the headaches I faced.
For those unfamiliar, facies prediction is the process of using Machine Learning (ML) for geological interpretation on well logs. As geologists, our final goal is to build the most representative 3D geological model of the reservoir. For that, we usually consider different types of data with various coverage and resolution. We have seismic data that covers dozens of kilometers with overall metric resolution in 3D; we have well logs that elucidate vertical stacking of patterns over dozens of meters with an overall centimetric resolution; and we have the core, which can provide data with resolution from nanometers to centimeters, of very limited samples extracted from the reservoir.
Facies prediction workflows usually aim to bridge the gap between the core description and the well log data. The standard workflow is to take cored intervals’ description, teach the model how each facies is represented in the well log, and then expect the model to be able to predict the facies where there is no core description.
As a geologist working with facies classification in carbonate rocks, facies prediction seemed like a great excuse for me to first dive into data science and coding. At times, it could be a painful learning experience, but we learn from challenges, right? So, let’s look at what gave me the biggest headaches and how you can avoid them now.
Following all the tips and advice I could find on Machine Learning workflows, my first impulse was to throw all data and classification into the most disruptive algorithms available. I tried several models and architectures, from Bayesian, to tree-based and Neural Networks. I then got back to data management and tested different strategies for data sampling, normalization, augmentation, and balancing. I finally experimented with several Deep Learning architectures, searched hyperparameters, tried even more complex models so I could finally increase the accuracy just a few points.
I wasn’t wrong in trying all that. That’s actually how it is supposed to be done. In one example I was able to increase the accuracy from 44% to 67%.
But how can we actually do better than that with our data, especially for a challenging classification? Why can’t we get accuracies we see in other ML applications, like detecting email spams or driving automated cars? How can we ultimately improve workflows from 60% accuracy to 90%? Simply put, we must understand what is causing this gap.
Let’s first step back and think of a famous image classification problem: distinguishing cats from dogs. Unless someone gives us a really bizarre photo, we can differentiate the two animals very easily. Human performance will be near 100%. How do we train a computer to tell a cat from a dog, though? We need a large dataset of pictures labeled as cats or dogs. The machine tries to guess if each picture is a cat or a dog. Based on how wrong these guesses were, the algorithm will calibrate some intrinsic parameters to give a better guess. Throughout several iterations, the machine will learn better how to distinguish both animals based on the examples that you provided.
There are two points I want to highlight here: the classification was done by the interpreter based on the data we will use to predict. Also, they should be very simple for those interpreters to distinguish cats and dogs, therefore we expect a strong agreement among interpretations (human performance).
Facies prediction follows essentially the same logic. The machine will learn how to interpret logs from the classification you provided.
As mentioned above, a common approach to facies prediction is to correlate core descriptions to well logs. The standard workflow is to take cored intervals’ description, teach the model how each facies is represented in the well log, and then expect the model to be able to predict the facies where there is no core description. With that, the classification is not usually done using our model’s input – the well logs. The classification is done in a different input—the core samples—causing some inherent challenges:
·Depth match. The uncertainty around measured depth is sometimes larger than some layer’s thickness. Depth match using gamma ray logs is also limited to the sampling rate and sensitivity of the tool. The best-case scenario is to depth-match using core pictures and borehole images — which is not always immediately available.
Different scales. Details seen in core that may be used as criteria for the classification are sometimes not seen at log scale.
Different measurements. If we use a classification that was based on different data, we cannot be sure the features that were distinct in the reference dataset are actually distinguishable in the data that we desire.
Besides, we must be honest. Depositional geological classification is at best a holistic task, involving various kinds and scales of data and usually subject to interpreters’ experiences and, yes, biases. Machine-learning challenges aside, geological classification is difficult for humans. And that comes back to a basic question: what is the human performance of a geological classification problem?
My point is that you must be fair with your dataset and clear with your objectives. What advantage do you actually hope to achieve with Machine Learning? Which features can you really see in your data? Is there a way to describe that data, a way that—although maybe not solving all your problems—could at least be more objective and consistent across different human interpreters?
With that, I leave these pieces of advice for those who may be interested in exploring this challenging, yet very exciting, career path:
- Understand and be honest with your data. For classification, try using a descriptive approach. Conceptual descriptions (such as depositional facies) can be subject to the interpreter’s experience and bias. Also, try using classes described on the data you are using, this way you can make sure the classes are distinguishable on that very dataset.
- Break your problem up into smaller realistic goals. Instead of jumping straight into solving everything and getting frustrated, think small—what is one step in the process that would be helpful to automate? Classifying and quantifying specific features can be a good start. It is better to have a reliable solution for a simple problem, than no solution at all.
- Divide data into train, validation, and test sets accordingly. Make sure all classes are well represented in all sets and be careful not to have duplicity across them. For example, continuous well logs with high sampling rates may have similar points next to each other. If two of these similar neighboring points are in the training and test sets, you can get abnormally high accuracies on your test data that do not reflect your model’s true capabilities.
- Define your metrics and benchmark. It is important to establish a realistic goal when you start trying to solve a problem. Ask yourself what is the current practice and how well does it perform? In particular, ask yourself: how good is the human performance?
- Don’t be scared of learning python, statistics, and data science. As geologists, we do have a solid foundation to dive into math and coding. Believe me, we’ve been through worse. It is incredibly rewarding to write your own code and create your own solutions. Basic python routines can already reduce repetitive work and accelerate your processes, regardless of whether it be basic data management, detecting anomalies, reconstructing a missing well log, predicting a petrophysical property or predicting facies.
A few links and courses that can get you going:
Python: https://www.learnpython.org/
Courses and Materials: https://www.deeplearning.ai/programs/
Facies Prediction: https://github.com/seg/tutorials-2016/blob/master/1610_Facies_classification/manuscript/facies_classification.md
References
Comments