Update README.md
Browse files
README.md
CHANGED
|
@@ -1,23 +1,242 @@
|
|
| 1 |
# Classical ML β Lithology Sequence Models
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
## Models
|
| 6 |
-
- `models/random_forest.joblib`
|
| 7 |
-
- `models/xgboost.joblib`
|
| 8 |
-
- `models/lightgbm.joblib`
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
```
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
```
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Classical ML β Lithology Sequence Models
|
| 2 |
|
| 3 |
+
Classical machine-learning baselines for automated lithological sequence identification from well-log data.
|
| 4 |
+
|
| 5 |
+
The models are trained on the **NoraResearchLab/Lithology-Training-Dataset** containing 400 wells and evaluated on the independent **NoraResearchLab/lithology-sequence-benchmark**.
|
| 6 |
+
|
| 7 |
+
The workflow performs pointwise lithology classification followed by minimum-thickness segmentation to produce geological sequences. Evaluation therefore considers both individual depth-point predictions and the resulting lithological sequences.
|
| 8 |
+
|
| 9 |
+
## Research Organization
|
| 10 |
+
|
| 11 |
+
Developed by **NORA Research Lab** β building intelligence for the real world.
|
| 12 |
+
|
| 13 |
+
[](https://github.com/Nora-Research-Lab)
|
| 14 |
+
[](https://huggingface.co/NoraResearchLab)
|
| 15 |
+
[](https://www.linkedin.com/company/nora-research-lab)
|
| 16 |
+
[](https://x.com/noraresearchlab)
|
| 17 |
+
[](https://noraresearchlab.site)
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## Datasets
|
| 22 |
+
|
| 23 |
+
### Training Dataset
|
| 24 |
+
|
| 25 |
+
The models were trained using:
|
| 26 |
+
|
| 27 |
+
**[NoraResearchLab/Lithology-Training-Dataset](https://huggingface.co/datasets/NoraResearchLab/Lithology-Training-Dataset)**
|
| 28 |
+
|
| 29 |
+
* 400 wells
|
| 30 |
+
* Well-log based lithology data
|
| 31 |
+
* Used exclusively for model development and training
|
| 32 |
+
|
| 33 |
+
### Independent Benchmark
|
| 34 |
+
|
| 35 |
+
The trained models were subsequently evaluated on:
|
| 36 |
+
|
| 37 |
+
**[NoraResearchLab/lithology-sequence-benchmark](https://huggingface.co/datasets/NoraResearchLab/lithology-sequence-benchmark)**
|
| 38 |
+
|
| 39 |
+
This benchmark provides an independent evaluation of lithology-sequence generalization to wells that were not used during model training.
|
| 40 |
+
|
| 41 |
+
This separation between the training dataset and benchmark is important because performance on previously unseen wells provides a more realistic indication of model generalization.
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
|
| 45 |
## Models
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
Three classical machine-learning models were trained:
|
| 48 |
+
|
| 49 |
+
* `models/random_forest.joblib`
|
| 50 |
+
* `models/xgboost.joblib`
|
| 51 |
+
* `models/lightgbm.joblib`
|
| 52 |
+
|
| 53 |
+
Corresponding hyperparameters are available in:
|
| 54 |
+
|
| 55 |
+
* `models/random_forest_params.json`
|
| 56 |
+
* `models/xgboost_params.json`
|
| 57 |
+
* `models/lightgbm_params.json`
|
| 58 |
+
|
| 59 |
+
---
|
| 60 |
+
|
| 61 |
+
## Input Features
|
| 62 |
+
|
| 63 |
+
The models use the following well-log features:
|
| 64 |
+
|
| 65 |
+
* Gamma Ray (`GR`)
|
| 66 |
+
* Bulk Density (`RHOB`)
|
| 67 |
+
* Neutron Porosity (`NPHI`)
|
| 68 |
+
* Photoelectric Factor (`PEF`)
|
| 69 |
+
* Compressional Sonic (`DT`)
|
| 70 |
+
* Log-transformed Resistivity (`log10(RT)`)
|
| 71 |
+
* Caliper (`CALI`)
|
| 72 |
+
* Missingness indicators
|
| 73 |
+
|
| 74 |
+
The workflow uses these measurements to perform pointwise lithology classification along the well depth axis.
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## Evaluation Pipeline
|
| 79 |
+
|
| 80 |
+
The evaluation consists of two main stages:
|
| 81 |
+
|
| 82 |
+
```text
|
| 83 |
+
Well Logs
|
| 84 |
+
β
|
| 85 |
+
Feature Preparation
|
| 86 |
+
β
|
| 87 |
+
Pointwise Lithology Classification
|
| 88 |
+
β
|
| 89 |
+
Minimum-Thickness Segmentation
|
| 90 |
+
β
|
| 91 |
+
Lithological Sequences
|
| 92 |
+
β
|
| 93 |
+
Depth-Level + Sequence-Level Evaluation
|
| 94 |
```
|
| 95 |
+
|
| 96 |
+
The minimum-thickness segmentation step converts individual depth predictions into continuous geological intervals, allowing the models to be evaluated not only on individual samples but also on the resulting lithological sequence.
|
| 97 |
+
|
| 98 |
+
---
|
| 99 |
+
|
| 100 |
+
# Benchmark Results
|
| 101 |
+
|
| 102 |
+
The models were evaluated on **66 independent wells** from the lithology sequence benchmark.
|
| 103 |
+
|
| 104 |
+
| Model | Depth Accuracy | Depth Macro F1 | Confident Macro F1 | Sequence Similarity | CV Macro F1 |
|
| 105 |
+
| ----------------- | -------------: | -------------: | -----------------: | ------------------: | ----------: |
|
| 106 |
+
| **Random Forest** | **0.7914** | **0.6279** | **0.5900** | **0.5927** | **0.7599** |
|
| 107 |
+
| **XGBoost** | 0.7271 | 0.5757 | 0.5293 | 0.5173 | 0.7571 |
|
| 108 |
+
| **LightGBM** | 0.6936 | 0.5321 | 0.4834 | 0.4818 | 0.7266 |
|
| 109 |
+
|
| 110 |
+
### Interpretation
|
| 111 |
+
|
| 112 |
+
On the independent 66-well benchmark, Random Forest achieved the highest depth-level accuracy, macro F1, confident macro F1, and sequence similarity among the three evaluated models.
|
| 113 |
+
|
| 114 |
+
The results show that strong cross-validation performance does not necessarily translate directly into equivalent performance on independent wells. This is particularly relevant for subsurface machine learning, where geological setting, depositional environment, logging conditions, and formation properties can vary substantially between wells.
|
| 115 |
+
|
| 116 |
+
---
|
| 117 |
+
|
| 118 |
+
# Blind-Well Generalization Test
|
| 119 |
+
|
| 120 |
+
In addition to the 66-well benchmark, the models were evaluated on a completely unseen blind well (`16_2-7.csv`).
|
| 121 |
+
|
| 122 |
+
| Model | Original Training Benchmark | Blind Test Well Accuracy | Approx. Performance Gap |
|
| 123 |
+
| ----------------- | --------------------------: | -----------------------: | -----------------------: |
|
| 124 |
+
| **Random Forest** | ~85β90% | **60.17%** | ~25β30 percentage points |
|
| 125 |
+
| **XGBoost** | ~88β91% | **44.95%** | ~43β46 percentage points |
|
| 126 |
+
| **LightGBM** | ~89β92% | **40.65%** | ~48β51 percentage points |
|
| 127 |
+
|
| 128 |
+
These values represent a separate blind-well experiment and should not be directly substituted for the 66-well benchmark metrics above.
|
| 129 |
+
|
| 130 |
+
The blind-well experiment demonstrates the importance of testing lithology models on genuinely unseen geological conditions rather than relying exclusively on conventional validation splits.
|
| 131 |
+
|
| 132 |
+
---
|
| 133 |
+
|
| 134 |
+
# Key Research Findings
|
| 135 |
+
|
| 136 |
+
### 1. Generalization is substantially harder than within-dataset validation
|
| 137 |
+
|
| 138 |
+
The difference between validation performance and performance on independent wells indicates that the models learn relationships that do not necessarily transfer perfectly across geological settings.
|
| 139 |
+
|
| 140 |
+
For lithology prediction, this can arise from differences in formation properties, depositional environments, logging tools, acquisition conditions, depth distributions, and the statistical distribution of log responses between wells.
|
| 141 |
+
|
| 142 |
+
### 2. Random Forest showed stronger independent-well performance
|
| 143 |
+
|
| 144 |
+
Random Forest produced the strongest results across the principal metrics in the 66-well benchmark:
|
| 145 |
+
|
| 146 |
+
* **79.14% depth accuracy**
|
| 147 |
+
* **0.628 depth macro F1**
|
| 148 |
+
* **0.590 confident macro F1**
|
| 149 |
+
* **0.593 sequence similarity**
|
| 150 |
+
|
| 151 |
+
It also achieved the highest accuracy in the separate blind-well experiment at **60.17%**.
|
| 152 |
+
|
| 153 |
+
This does not establish that Random Forest will universally outperform boosting methods, but it indicates that it was the most robust of the three models under these particular evaluation conditions.
|
| 154 |
+
|
| 155 |
+
### 3. Boosting models showed larger degradation on the blind well
|
| 156 |
+
|
| 157 |
+
XGBoost and LightGBM achieved strong cross-validation results but experienced substantial degradation on the independent blind well.
|
| 158 |
+
|
| 159 |
+
This suggests that the relationships learned from the training wells may not transfer consistently to the feature distributions encountered in the blind well.
|
| 160 |
+
|
| 161 |
+
### 4. Sandstone remains a significant classification challenge
|
| 162 |
+
|
| 163 |
+
The blind-well analysis showed particularly weak sandstone recall across the evaluated models despite substantially stronger performance during training/validation.
|
| 164 |
+
|
| 165 |
+
This suggests that the petrophysical signature of sandstone in the blind well differs from the patterns represented in the training wells.
|
| 166 |
+
|
| 167 |
+
Potential contributing factors include differences in:
|
| 168 |
+
|
| 169 |
+
* Gamma Ray response
|
| 170 |
+
* Density
|
| 171 |
+
* Neutron porosity
|
| 172 |
+
* Resistivity
|
| 173 |
+
* Compaction
|
| 174 |
+
* Depositional environment
|
| 175 |
+
* Formation composition
|
| 176 |
+
* Logging/acquisition conditions
|
| 177 |
+
|
| 178 |
+
This makes sandstone generalization an important area for further investigation.
|
| 179 |
+
|
| 180 |
+
---
|
| 181 |
+
|
| 182 |
+
# Research Implications
|
| 183 |
+
|
| 184 |
+
These experiments highlight an important issue in automated lithology prediction:
|
| 185 |
+
|
| 186 |
+
> **High validation performance does not necessarily imply strong geological generalization.**
|
| 187 |
+
|
| 188 |
+
A model can perform well when evaluated on data statistically similar to its training wells while experiencing substantial performance degradation when exposed to a genuinely independent well.
|
| 189 |
+
|
| 190 |
+
For this reason, future versions of the benchmark should emphasize:
|
| 191 |
+
|
| 192 |
+
* Well-level separation between training and evaluation data
|
| 193 |
+
* Geographic and geological diversity
|
| 194 |
+
* Cross-basin evaluation
|
| 195 |
+
* Completely held-out wells
|
| 196 |
+
* Class-specific performance
|
| 197 |
+
* Sequence-level similarity
|
| 198 |
+
* Robustness to missing logs
|
| 199 |
+
* Distribution-shift analysis
|
| 200 |
+
* Calibration and uncertainty estimation
|
| 201 |
+
|
| 202 |
+
The benchmark is therefore intended not simply to measure classification accuracy, but to investigate how well lithology models transfer across independent subsurface environments.
|
| 203 |
+
|
| 204 |
+
---
|
| 205 |
+
|
| 206 |
+
# Reproducibility
|
| 207 |
+
|
| 208 |
+
The trained model artifacts are provided in the `models/` directory.
|
| 209 |
+
|
| 210 |
+
```text
|
| 211 |
+
models/
|
| 212 |
+
βββ random_forest.joblib
|
| 213 |
+
βββ random_forest_params.json
|
| 214 |
+
βββ xgboost.joblib
|
| 215 |
+
βββ xgboost_params.json
|
| 216 |
+
βββ lightgbm.joblib
|
| 217 |
+
βββ lightgbm_params.json
|
| 218 |
```
|
| 219 |
|
| 220 |
+
The training data and independent benchmark are publicly available through the NORA Research Lab Hugging Face organization.
|
| 221 |
+
|
| 222 |
+
**Training dataset:**
|
| 223 |
+
https://huggingface.co/datasets/NoraResearchLab/Lithology-Training-Dataset
|
| 224 |
+
|
| 225 |
+
**Evaluation benchmark:**
|
| 226 |
+
https://huggingface.co/datasets/NoraResearchLab/lithology-sequence-benchmark
|
| 227 |
+
|
| 228 |
+
---
|
| 229 |
+
|
| 230 |
+
# Citation
|
| 231 |
+
|
| 232 |
+
If you use these models, datasets, or benchmark results in research, please cite the corresponding NORA Research Lab resources.
|
| 233 |
+
|
| 234 |
+
## NORA Research Lab
|
| 235 |
+
|
| 236 |
+
**Building intelligence for the real world.**
|
| 237 |
|
| 238 |
+
GitHub: https://github.com/Nora-Research-Lab
|
| 239 |
+
Hugging Face: https://huggingface.co/NoraResearchLab
|
| 240 |
+
LinkedIn: https://www.linkedin.com/company/nora-research-lab
|
| 241 |
+
X: https://x.com/noraresearchlab
|
| 242 |
+
Website: https://noraresearchlab.site
|