Science and engineering
Machine learning for geoscience
Geoscientists use machine learning to predict rock type from well logs, to map soils and minerals from spatial data, and to detect and catalogue earthquakes. Models combine measurements taken at very different scales, from boreholes to satellites.
How machine learning is used in geoscience
Predicting rock type from well logs
Classifiers learn the relationship between log curves such as gamma ray, resistivity and density and the facies described in cored wells. They then label uncored wells quickly and consistently, leaving geologists to check difficult intervals.
Real exampleSEG 2016 machine learning contestA public contest from The Leading Edge in which teams trained facies classifiers on well-log data, with submissions and code published on GitHub.
Mapping soils and surface properties
Models relate point samples to environmental covariates such as terrain, climate, vegetation and geology, then predict a continuous map with an uncertainty for each cell. This is called digital soil mapping.
Real exampleSoilGrids 2.0 (Poggio et al., SOIL, 2021)Produces global maps of soil properties at 250 m resolution with machine learning, using about 240,000 soil observations and over 400 environmental covariates, with quantified spatial uncertainty.
Detecting and cataloguing earthquakes
Deep learning models scan continuous seismic records, detect earthquakes and pick P and S wave arrivals. The resulting catalogues include many more small events than manual review can produce.
Real exampleEQTransformer (Mousavi et al., Nature Communications, 2020)An attention-based deep learning model for simultaneous earthquake detection and phase picking in seismic records.
Can geoscientists learn machine learning?
Yes. Geoscientists who are comfortable with data and statistics can add machine learning step by step: Python, spatial and tabular data handling, classical models with spatially aware validation, then deep learning for images and waveforms.
- PythonRead well logs, rasters and seismic files with Python libraries such as lasio, rasterio and ObsPy.Learn it in Python
- Data handlingClean and join tables of samples, logs and coordinates with pandas.Learn it in Data Tools
- Statistics and geostatisticsSpatial correlation, kriging and uncertainty are the baselines every machine learning map is compared with.Learn it in Statistics
- Classical models with spatial validationRandom forests and gradient boosting, validated by holding out whole wells or regions.Learn it in Machine Learning
- Deep learning for images and waveformsConvolutional networks and transformers for imagery, seismic sections and earthquake records.Learn it in Deep Learning
Moving into machine learning for geoscience
If you already work in the field
Geoscientists know what the measurements mean, where they are unreliable and what a geologically sensible map looks like. Add Python and classical machine learning, then rework a project you know, such as a facies or soil map, and compare the result with your existing interpretation. Geological surveys, energy and mining companies and research institutes all hire for this mix.
If you come from data science or ML
Data scientists should learn the basics of the relevant subfield, such as stratigraphy, soils or seismology, plus coordinate systems and why spatial correlation breaks random train-test splits. Working through an open geoscience dataset with a domain partner is the fastest way to learn which errors matter.
Roles that do this workGeoscience data scientistGeostatisticianPetrophysicistDigital soil mapping scientistSeismologist
Tools you will use
| Tool | What you use it for |
|---|---|
| Xarray | Handle gridded geoscience data such as climate, seismic and satellite cubes. |
| GeoPandas | Join samples, wells and mapped units by location. |
| Verde | Grid and interpolate scattered spatial measurements with cross-validation. |
| lasio | Read well-log LAS files into tables for modelling. |
| scikit-learn | Train lithology classifiers and spatial regression models. |
Public data to practise on
- FORCE 2020 well-log lithology: Well logs from the Norwegian North Sea with interpreted lithology labels for supervised classification.
- USGS Earthquake Catalog: Searchable global earthquake locations, depths and magnitudes for spatial and temporal analysis.
Your first project
Download the FORCE 2020 well-log data, predict lithology from gamma-ray, density, neutron and sonic logs with gradient boosting, and compare it with a majority-class baseline using balanced accuracy on held-out wells.
Common questions
Is machine learning used in geoscience?
Yes, widely: for well-log interpretation, mineral and soil mapping, seismic interpretation, earthquake detection and remote sensing. Results are usually checked against field observations and expert interpretation.
Why is spatial cross-validation important in geoscience?
Nearby samples are similar, so random splits put near-copies of test points in the training set and inflate accuracy. Holding out whole wells, regions or blocks gives a realistic estimate of performance where you have no data.
Which Python libraries do geoscientists use for machine learning?
scikit-learn and PyTorch for models, pandas and GeoPandas for tables, rasterio and xarray for gridded data, lasio for well logs and ObsPy for seismology are common choices.
Do I need a geoscience degree to work in this area?
For most geoscience roles, yes or equivalent experience, because interpretation is the core of the job. Data scientists without the degree usually work in mixed teams and learn the domain on the job.
Courses for these skills
- Deep Learning with PyTorchBuild learned reconstruction foundations.Syllabus available · lessons open as produced
- Data Tools: NumPy, pandas, Matplotlib and scikit-learnKeep reference maps and image coordinates aligned.23 published lessons · all planned lessons open
- Practical Machine Learning in PythonCompare classification baselines and feature effects.51 published lessons · more lessons in production
- Maths for Machine LearningUnderstand inverse mappings, derivatives and optimisation.26 published lessons · all planned lessons open
New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.