Skip to main content
Case studya major operator in Oman

The Messy Middle of Phase 2: From Data-Quality Chaos to a Working Supervised Model

The middle of a project is where the case studies go quiet. This is the part they skip: Phase 2's descent into data-quality chaos on a major Oman operator's borehole image logs - a corrupt 0-15 pixel range, depth indices that disagreed with the log container, five wells rejected for missing apparent dip - and the climb back out through a dropped unsupervised detour to a first working supervised transformer, told through the dated running-log entries and the well-status ledger.

21 Jul 20268 min read
The Messy Middle of Phase 2: From Data-Quality Chaos to a Working Supervised Model

Most case studies about applied machine learning tell you the start and the end. A problem, then a model, then the accuracy numbers. The middle - the stretch where the data fought back and the first three ideas did not work - gets compressed into a sentence about "iteration." For our carbonate image-log work with a major operator in Oman, the middle was Phase 2, and it was the hardest part of the whole engagement. The running log for that phase has 288 dated blocks between February and December 2022. Read in order, they are not a smooth curve of progress. They are a descent into a data-quality trough, a floor where we stopped and admitted the approach was wrong, then a climb back out to a first supervised model that actually worked. This is that middle, kept honest.

What "clean data" turned out to mean

Phase 2 opened well. Ten wells arrived with their digital log containers, apparent dip and azimuth, well radius, and interpreted PDFs. We had agreed on two clustering techniques and drawn up a plan. Then we started reading the pixels.

One well's static image channel came in with values in a 0 to 15 range where a healthy microresistivity log should span roughly 0 to 255. That is not a scaling quirk you normalise away; it is a corrupted channel that carries almost no dynamic range, and a model trained on it learns noise. On another well the raw dip picks were indexed to depths that did not line up with the depth index inside the digital log container itself - the picks said one thing, the container said another, and across one stretch the image log was simply absent from the container over an interval the picks claimed to cover. And reaching back to the first delivery, Phase 1's opening five wells had already been rejected outright because they arrived with no apparent dip or azimuth at all, the exact fields a geometry-aware detector needs as ground truth.

None of these are exotic. Every one is the sort of defect a human catches by eye and a pipeline swallows silently. The lesson we carried out of it was blunt: on borehole image logs, "clean the data" is not a preprocessing footnote, it is a substantial fraction of the project, and it has to be enforced by automated checks rather than trust.

0-15
expected 0-255

corrupt pixel range on one static channel

10 → 8
two excluded outright

wells delivered vs wells usable

288
the honest middle

dated running-log blocks, Feb-Dec 2022

The floor: three unsupervised ideas, all dropped

With the inputs partly salvaged, we spent the middle of Phase 2 trying to detect sinusoids - the signature a planar fracture or bedding surface leaves on an unwrapped image log - without labels. This is the descent in the arc below, and it kept going down.

We ran a NaN-removal bake-off to make the inter-pad gaps continuous first, comparing 1D interpolation, KNN, and a GAN fill that broke feature continuity and was dropped; that comparison is its own story, covered in our note on why 1D interpolation lost to KNN at well scale. On the clean images we tried classical picking - Hough transform with Canny edges and thresholding - then unsupervised clustering: DBSCAN across more than ten thousand parameter combinations, and hierarchical clustering that ran out of memory even on a 50 GB machine. When those stalled we tried self-supervised segmentation with SCOPS at five, three, and two classes. It was unstable on this data and we dropped it. Why the clustering families could not cleanly separate one sinusoid from the next - and why a supervised transformer later could - is the subject of a separate piece; the short version is that unsupervised methods have no notion of "this is one fracture," so a badly chosen parameter splits a single feature into fragments or fuses two into one.

The honest entry in the log is not a breakthrough. It is a decision. Somewhere in the August blocks the running log stops proposing another unsupervised patch and states the thing plainly: feature and fault detection here needs supervised learning. That sentence is the floor of the project. Everything before it was a descent; it is also the pivot the whole arc turns on.

PHASE 2 RUNNING LOG · THE DESCENT AND THE CLIMB BACKFEB-DEC 2022The honest middle: data-quality chaos, then the turn to supervised learningLeft of the orange line is the trough most case studies skip. Right of it, the climb to a working transformer.WELL-STATUS LEDGER10delivered-2excluded8usableexcluded: one corrupt pixelrange, one on the compact toolLOG ENTRYAug · need supervised
Aug: the log records the turn - fault and feature detection needs supervised learning. The floor of the project.
project health (illustrative)FebMarAprMayJunJulAugSepOctNovDecneed supervised learning20 & 30 epochs overfitunsupervised floor: Hough, DBSCAN, SCOPS tried and droppedthe arc: usable signal over the running-log weeksthe turn to supervised learning (the argument)Click a month to read that running-log entry. DETR v1 -> v1.5 is the climb back to a working supervised model.
Phase 2 of the engagement plotted as a dated descent-and-recovery arc across the running-log months, February to December 2022. The teal curve is the usable signal over time: it falls as the data-quality problems surface - a corrupt 0-15 pixel range where 0-255 was expected, raw-dip depth indices that disagree with the DLIS depth index, and Phase 1's first five wells rejected for missing apparent dip and azimuth - and keeps falling through the unsupervised attempts (a NaN-removal bake-off of 1D interpolation, KNN and a failed GAN; Hough plus Canny sinusoid picking; DBSCAN and out-of-memory hierarchical clustering; SCOPS self-supervised segmentation dropped). The single orange element is the only one that argues: the week the log records the turn to supervised learning, the floor of the project. Right of it the curve climbs - two DETR runs overfit at 20 and 30 epochs, then DETR v1, then v1.5, a first working supervised transformer. The left panel carries the well-status ledger: 10 wells delivered, two excluded (one for the corrupt pixel range, one imaged on the compact tool), leaving 8 usable. Click any month to read that running-log entry. Every dated milestone, method, epoch count and well count is sourced from the monthly progress reports, the running-log timeline deck and the supervised-transition deck; the vertical project-health value is an illustrative ordinal for arc readability, not a measured metric.

The climb: two overfit runs, then a model that held

Committing to supervised learning did not hand us a working model. It handed us a new failure mode. Our first two detection-transformer experiments overfit - one trained to 20 epochs, one to 30 - because a handful of wells is very little data for a transformer, and the network memorised them instead of generalising. That is the first up-tick in the arc that is still shaky.

The recovery was incremental and unglamorous, which is the point. We normalised the regression targets - location, dip, azimuth - into a common range so no single output dominated the loss, leaned on heavy augmentation to manufacture variety the eight usable wells could not supply on their own, and iterated. The choice of a detection transformer was itself deliberate: it predicts each feature's depth, dip, and azimuth directly as a set, with no anchor boxes and no post-hoc matching, which for a sparse scatter of sinusoids on an image log is a better fit than a region-proposal detector. The mechanics of how that set prediction works are covered elsewhere; here it is enough that it gave us a single model that reads a patch and emits a fracture's geometry.

The geometry itself is a correction, not a raw read. What the tool reports is an apparent dip relative to the borehole; the true dip and azimuth follow from the well and tool angles:

apparent-to-true dip and azimuth correction
Diptrue=Dipapp+θwell180Aztrue=Azapp+θtool180\mathrm{Dip}_{\text{true}} = \mathrm{Dip}_{\text{app}} + \theta_{\text{well}} - 180^{\circ} \qquad \mathrm{Az}_{\text{true}} = \mathrm{Az}_{\text{app}} + \theta_{\text{tool}} - 180^{\circ}

Two versioned checkpoints came out of that stretch: DETR v1, the first supervised transformer that picked sinusoids end to end, and DETR v1.5, the refinement that we were willing to call a working model on the 8 usable wells. That is the top-right of the arc - not a triumphant plateau, just a curve that has climbed back above where it started, on cleaner data and a fundamentally different method.

Why the middle is worth publishing

The reason to write the middle down is that the shape of Phase 2 is the shape of most honest applied-ML projects, and pretending otherwise sets the wrong expectation for the next one.

Three things transfer. Data quality is not a gate you pass once; two of ten delivered wells were unusable for reasons that had nothing to do with the model, and finding that early - by automated range and depth-index checks rather than by a model that quietly underperforms - saved the phase. Unsupervised is a reasonable thing to try and a reasonable thing to abandon; the value of the DBSCAN and SCOPS detour was not a result, it was the evidence that let us commit to supervised learning with conviction instead of hope. And the first supervised runs overfitting is not a setback, it is the expected first draft on small subsurface datasets, with a fix that is boring and real: normalise, augment, iterate.

Limitations

The dated arc is drawn from a single confidential carbonate engagement; the specific defects (the 0-15 pixel range, the depth-index mismatch, the five rejected wells) are this operator's data, not a general failure rate for image logs. The running log's 288 blocks span February to December 2022, but a running log is a work diary, not an audit trail - the dates order the milestones reliably while the exact day a given experiment "failed" is fuzzier than a single block implies. The vertical "project health" axis in the exhibit is an illustrative ordinal built to make the descent-and-recovery shape readable; it is not a measured metric, and only the dated milestones, methods, epoch counts, and well counts on it are sourced. DETR v1 and v1.5 were working models on 8 wells, not the final production system - later phases added wells, horizontal-well validation, and the ablations that turned them into a publishable result.

References

  1. Phase 2 running log and dated milestone timeline (February to December 2022, 288 blocks), the well-status ledger (10 wells delivered, 2 excluded for a corrupt pixel range and a compact-tool image, 8 usable), the data-quality defects (0-15 pixel range vs expected 0-255; raw-dip depth indices mismatched against the digital log container depth index; five Phase 1 wells rejected for missing apparent dip and azimuth), the unsupervised detour (Hough plus Canny sinusoid picking; DBSCAN across >10,000 parameter combinations; hierarchical clustering out of memory on a 50 GB machine; SCOPS self-supervised segmentation at 5/3/2 classes, dropped), the explicit turn to supervised learning, and the two overfit detection-transformer runs (20 and 30 epochs) leading to DETR v1 and v1.5, all derived from internal monthly progress reports, the running-log timeline deck, and the supervised-transition deck for a confidential Oman carbonate engagement; data and code withheld under operator confidentiality.

  2. The apparent-to-true dip and azimuth correction (true dip = apparent dip + well angle - 180 degrees; true azimuth = apparent azimuth + tool angle - 180 degrees) from the engagement's geometry-correction notes.

E
EarthScan Research Team
Discuss a programme
Stay ahead

EarthScan insights, in your inbox.

Field-tested research on subsurface and energy-transition AI. About twice a month. No noise.

We use your email only for this newsletter. Unsubscribe anytime Privacy.