An Intuition Worth Millions

Every experienced geologist has a maxim like this: “Potassic alteration strengthens toward the intrusion center, and grade extends along structure.” Is that judgment valuable? Absolutely. A deep validation hole in a porphyry copper–molybdenum deposit can cost millions of yuan; choose the wrong direction and the money is spent on barren ground while the licence term keeps running.

But the statement lacks reproducible test conditions. How close is “closer”? How strong is “stronger”? Along which direction? Change the person or the viewing window and the conclusion may reverse. When geological experience cannot be tested with data, it is one step away from unsupported empiricism.

Naturally coloured strata and regional landforms: visible spatial differences offer exploration clues, but still require independent testing
Naturally coloured strata and regional landforms: visible spatial differences offer exploration clues, but still require independent testing

This article presents a complete exercise in translating such intuition into falsifiable propositions. Using a fixed-seed simulated porphyry deposit with 42 drill holes and 1,722 samples, we follow seven steps—QA/QC, compositional data, alteration indices, spatial statistics, coupling tests, three-dimensional modelling and machine-learning target prediction—to turn every qualitative geological statement into a quantitative claim that independent data can support or overturn.

The original teaching record reported 16 computational self-checks and 10 classes of analytical figures. This article retains the original numerical interpretation while replacing the figures with conceptual diagrams and real mining photographs for readability.

The boundary must be explicit: this is a methodological exercise. All data are simulated for teaching and demonstrate that the workflow can run, not that nature must behave this way. Every number illustrates a method; none is a conclusion about a real property.

The Foundation of the Data—QA/QC

First understand this: assay values can enter one analysis only when location, sample length and detection conditions are comparable.

A geologist begins with core description; a statistician begins with QA/QC, or quality assurance and quality control. This step is easiest to skip and most dangerous to omit.

Censored data: <LOD is not zero

When a certificate reports “<0.0200,” it means the instrument did not detect the analyte, not that none exists. In the simulated data, 31.7% of Cu values are censored—almost one third of samples fall below the detection limit.

A common mechanical practice replaces <LOD with LOD/√2 or LOD/2. The code compares both substitutions, with means of 0.109% and 0.107%, and states clearly that a high censoring rate calls for censored-likelihood estimation or validated multiple imputation (Helsel, 2012). Mechanical substitution systematically distorts the low-value distribution, precisely where background is separated from anomaly.

Duplicates: report RPD by concentration range

For 172 duplicate pairs, relative percent difference RPD = 200|a−b|/(a+b) has a median of 2.53% away from the detection limit. The qualification matters: RPD becomes explosively unstable near the limit. Applying one pass/fail threshold to every sample is among the most common injustices in laboratory review.

Sample length is measurement support, not a detail that can be erased

The sample length defined by From/To determines the volume represented by a measurement. Only adjacent intervals of the same lithology and domain may be composited by length: c̄ = ΣLᵢcᵢ/ΣLᵢ. This dataset uses a uniform 20 m teaching support. If unequal lengths are supplied, the code stops and requires a compositing rule rather than silently treating unequal samples as equally weighted. Smoothing across faults or alteration boundaries discards geological information deliberately (Rossi & Deutsch, 2014).

One more rule is absolute: many duplicate samples cannot repair coordinate errors. A collar coordinate is not a sample coordinate, and real deviated holes require downhole-survey desurveying first. A valid spectral peak position does not automatically make its mineral interpretation valid. QA/QC makes measurement bias traceable; it is not a licence to delete inconvenient outliers.

Pit walls and strata: assays become comparable only with sampling position, interval length and quality control
Pit walls and strata: assays become comparable only with sampling position, interval length and quality control

The Geometry of Compositional Data

After quality control, the constraints inherent in compositional data must be addressed. Think of whole-rock composition as a bill with a fixed total: when one proportion rises, others may fall even if their absolute amounts did not.

Changes in rock colour and proportions may indicate alteration, but appearance alone cannot prove origin
Changes in rock colour and proportions may indicate alteration, but appearance alone cannot prove origin

Whole-rock geochemistry contains a hidden trap: closure. Oxide weight percentages must sum to 100%. That mathematical constraint means one component's relative increase forces the others to decrease relatively. An observed negative correlation between SiO₂ and K₂O may be nothing more than fixed-sum geometry rather than fluid metasomatism (Aitchison, 1982).

Log-ratio transformations move compositional data from the simplex to ordinary Euclidean space. The centred log-ratio is clr(x)ⱼ = ln[xⱼ/g(x)], where g(x) is the geometric mean. A clr vector sums to zero and its covariance rank is at most D−1. The isometric log-ratio uses an orthogonal Helmert basis H, with HHᵀ = I and H1 = 0: ilr(x) = H·ln(x). It provides D−1 non-redundant coordinates and is invertible: x = C[exp(Hᵀ·ilr(x))], where C is the closure operator.

The code rejects zero and negative inputs and strictly distinguishes three kinds of zero: rounding zeros, below-detection-limit zeros and structural zeros where the mineral is absent. Adding the same pseudocount to every zero is one of the most common errors in compositional analysis. After clr/ilr and PCA, the first two coordinates explain 66.9% and 29.1% of variance in the simulated data.

But a clr correlation plot is not a causal graph. Log ratios solve a geometry problem; they do not remove lithological differences, spatial autocorrelation, censoring bias or overprinting by multiple events. Can compositional clusters be named alteration zones directly? No—independent geological evidence must still test them.

Distinguish compositional proportions from material transfer
Distinguish compositional proportions from material transfer

A Scale for Alteration

After accounting for compositional proportions, the next task is to define what “alteration intensity” actually measures. Three questions must be separated: how the mineral assemblage changes, how elemental ratios change, and how much material a rock truly gained or lost.

“Alteration intensity” sounds like one number but refers to at least three fundamentally different kinds of numbers.

First type: relative assemblage indices

Alteration indices

AI = 100·(K₂O+MgO)/(K₂O+MgO+Na₂O+CaO) and CCPI = 100·(MgO+FeOₜ)/(MgO+FeOₜ+Na₂O+K₂O) (Large et al., 2001) are calculated from oxide weight percentages.

Their conditions of use must be explicit. FeOt must be total iron expressed as FeO equivalent, not mixed with mole percentages. The principal context for AI is volcanic-hosted massive sulfide (VMS) deposits; it is not a universal temperature scale for porphyry deposits. The code also reports K₂O/Na₂O, Rb/Sr and Ba/Rb, but these are not universal distance gauges either.

There is also methodological honesty in defining SI* = 100·K₂O/(K₂O+Na₂O), which expresses only the relative K–Na relationship. The literature uses multiple definitions of “sericite index,” and no single authoritative formula was found. SI* therefore borrows no false authority and remains on the verification list. A formal project should replace it with an explicitly defined and calibrated index.

Different mountain strata and landforms: surface features require interpretation with composition, mass balance and background geology
Different mountain strata and landforms: surface features require interpretation with composition, mass balance and background geology

Second type: mass balance

An isocon diagram asks a different question: relative to protolith, what did altered rock gain or lose, and did total mass change? Using immobile components as anchors, slope s = Cᵢᵃ/Cᵢ⁰ = M₀/Mₐ, mass change μ = Mₐ/M₀ = 1/s, and component change Δⱼ = μCⱼᵃ − Cⱼ⁰. The direction matters: s > 1 corresponds to total mass loss, not gain.

The simulated dataset estimates s = 0.847 and a mass change of +18%. The code also recovers the synthetic truth of +18%, and this self-check specifically confirms that the sign of mass loss was not reversed.

Ti, Zr and Al can only be candidate immobile components. The protolith must be matched, zircon sorting and strong acidic leaching excluded, and consistency across several elemental ratios checked. No single element can be assumed immobile in advance (Grant, 1986).

The most dangerous step

Renormalizing strongly altered samples and protolith separately to 100% before mass-balance analysis hides real mass change. A higher AI also does not necessarily mean closer to ore. Indices, ratios and mass balance answer different questions; mixing them produces incorrect geological interpretation.

Indices, ratios and mass balance answer different questions
Indices, ratios and mass balance answer different questions

The Grammar of Space

Only after indices are defined can their spatial variation be discussed. “Closer” must identify the reference center, direction and depth interval being compared.

Now comes the technical core: turn “near” and “strong” into reproducible measurements. All distances are first transformed into one metric coordinate system. Calculating Euclidean distance directly from longitude and latitude is a classic beginner's error because one degree has a different length at different latitudes.

A center is not a constant of nature

The code reports three centers side by side: an independent prior center at (0, 0, −400 m), set before simulation; a Cu-weighted centroid at (90.3, −55.1, −419.2 m); and a high-value KDE center at (−1.2, 92.1, −410 m). The displacement between the prior and the centroid is 90.3 m.

The methodological discipline is that a grade-weighted centroid and KDE center describe the distribution of sampled highs; they cannot then serve as “independent evidence” validating the same Cu data. When centers disagree, report the displacement vector, drilling coverage, depth window and uncertainty interval, and test competing explanations—intrusion-center offset, pathway offset and multiple overprinting—instead of averaging an artificial compromise center.

Radial statistics

Annular binning with 300 m rings and a vertical window of ±250 m shows Cu declining from 0.58% at 150 m from the center, to 0.25% at 450 m and 0.11% at 750 m. AI rises from 54.5 to 57.8 before declining; the muscovite Al–OH absorption position Pos2200 shifts inward from 2202.1 nm to 2199.9 nm. A reproducible distance gradient emerges.

Error bars must use block bootstrap

Resampling is performed on spatial blocks, not individual samples. Samples within a block are correlated, so individual resampling would shrink the standard error unrealistically. A bin with fewer than three independent blocks receives no interval and triggers a warning. Three blocks are only a teaching minimum, not precision. The interval includes sampling uncertainty but not uncertainty in center, assay or model selection (Roberts et al., 2017; Valavi et al., 2019).

Directional structure belongs to the semivariogram

γ(h, θ) = 1/(2N(h,θ))·Σ[Z(rᵢ) − Z(rⱼ)]² is estimated by direction and distance bins. For LogCu in this dataset, northward γ is 0.97 at a 300 m lag, 1.85 at 500 m and 3.04 at 900 m, revealing clear anisotropy.

The same section immediately cautions that directional differences may reflect a fault or intrusion axis, but may also come from sampling geometry or a non-stationary trend. Anisotropy is not proof of structural control; independent structural and lithological boundaries must be overlaid.

Spatial continuity in a mine wall: a distance gradient still requires a common scale and independent geological evidence
Spatial continuity in a mine wall: a distance gradient still requires a common scale and independent geological evidence

Correlation Is Not Causation

Even if a distance gradient is observed, it does not establish that alteration controls mineralization. Two indicators can vary together because they share a spatial trend. The next test is whether alteration information still improves grade prediction after the background trend is removed.

Can a distance gradient support the statement that alteration controls mineralization? Not yet. This section has the highest statistical demands in the workflow.

Alteration and ore grade may share a spatial trend without alteration directly controlling mineralization
Alteration and ore grade may share a spatial trend without alteration directly controlling mineralization

Model comparison

Four models compete: linear plus alteration variables, segmented regression plus alteration variables, a purely additive spline baseline, and additive spline plus alteration variables. Out-of-fold RMSE values are 0.534, 0.538, 0.780 and 0.555. Adding alteration variables reduces RMSE by about 31% relative to baseline. The criterion is out-of-fold error; training-set goodness of fit is worthless here.

Block-level permutation testing

Out-of-fold residuals from the base model and each indicator model are averaged by spatial block and permuted at block level 999 times, preserving within-block sampling structure. BH-FDR correction is applied to four prespecified hypotheses (Benjamini & Hochberg, 1995).

Results show significant block-level residual correlations for AI, r = 0.868 (q = 0.002), and SI*, r = 0.853 (q = 0.002); CCPI (q = 0.17) and Pos2200 (q = 0.068) are not significant. Why not shuffle individual samples? Samples are not independent: intervals from the same hole and adjacent sections are correlated, and sample-level permutation produces implausibly small p-values—false significance.

Even when AI is significant, the conclusion can only be phrased as “incremental information exists for this prediction task.” Statistical coupling is not a genetic explanation. To claim that alteration caused precipitation requires agreement among timing, mineralogy and mass balance. Conversely, “not significant” cannot be written as “no effect”; the test may lack power, use the wrong scale, rely on invalid peaks or be obscured by later geological events.

From co-variation to independent validation
From co-variation to independent validation

Give the Earth a Three-Dimensional CT Scan

Statistical relationships must return to spatial geometry for testing. A three-dimensional model connects discrete drill holes into a spatial interpretation, but uncertainty remains between holes and beyond them.

After two-dimensional sections comes three dimensions. This section asks: how does distance to a “mineralized shell” differ fundamentally from distance to one point?

Three-dimensional modelling cannot infer mineralization from one point alone; boundaries in unsampled areas still require testing
Three-dimensional modelling cannot infer mineralization from one point alone; boundaries in unsampled areas still require testing

Voxelization

Inverse-distance weighting, f̂(q) = Σdᵢ⁻²fᵢ/Σdᵢ⁻², interpolates Cu and a potassic-alteration indicator on a teaching grid with 39,775 nodes and 36,288 cells. Indicator values ≥0.5 define a teaching alteration domain; again, 0.5 is not a calibrated probability. Nodes more than 300 m from the nearest sample are set to missing. That is a teaching support limit, not a validated range, and unsampled space is not automatically labelled barren.

Mineralized shell and signed distance

An isosurface at Cu = 0.2%, a teaching threshold, produces a closed shell with 18,364 triangles. Distance to the shell must be the nearest-triangle distance, not nearest-vertex distance. VTK/PyVista compute_implicit_distance calculates it, with negative values inside and positive outside when the surface is closed and consistently oriented. Open, non-manifold or self-intersecting surfaces cannot reliably define inside and outside, so the code stops on an open surface. Both the “closed manifold” and “signed-distance calibration” checks pass.

Another rule prevents circular reasoning: because the shell is derived from the same Cu data, shell distance cannot be used as a Cu-prediction feature. Tautological features make AUC look falsely strong. A real test builds the shell from training holes and validates it on independent holes.

Support range and interpretation boundary in three-dimensional interpolation
Support range and interpretation boundary in three-dimensional interpolation

AI Enters the Workflow

With a spatial model in place, the AI prediction target must be defined. Here the task ranks samples that already have core, spectral and chemical information; it cannot be interpreted directly as prospectivity across an undrilled area.

A Random Forest performs target prediction, but the first discipline matters more than the algorithm: define the task. This is screening within the support domain of existing core, spectra and chemistry, not an areal mineral probability for undrilled ground. Positive cases are measured intervals with Cu at or above the teaching threshold; unsampled space is not a negative example. The positive rate is 16.9%. Class weights handle imbalance inside each training fold; oversampling is never performed on the full dataset in advance.

AI can analyse and rank measured samples, but unsampled areas remain unknown and cannot be labelled barren
AI can analyse and rank measured samples, but unsampled areas remain unknown and cannot be labelled barren

The negative list for feature engineering

Allowed features are within-lithology chemical indices, log(K/Na), log(Rb/Sr), quality-controlled peak position and width, distance to the independent prior center, and elevation. Explicitly forbidden are Cu, Au or Mo grade itself, distance to the mineralized shell, any center inferred from grade, and Truth* fields planted by the simulator. Those are target leakage. Including them can push AUC to 0.999, but that is self-deception.

Compare two cross-validation designs

Ordinary random stratified cross-validation puts samples from the same hole and neighbouring intervals on opposite sides of training and testing. Spatial autocorrelation then lets the model peek at the answer and inflates AUC.

The code therefore reports both approaches. Random stratified CV produces ROC-AUC of 0.991–0.994 and AP of 0.942–0.978. Whole-hole, whole-spatial-block CV with a 120 m buffer and minimum planar train–test separation of 248–274 m produces ROC-AUC of 0.974–0.995 and AP of 0.897–0.969. The results are close, so neighbouring leakage does not materially inflate performance in this dataset.

Wording must remain precise: it is not a theorem that random splitting always inflates every dataset. Spatial blocking also changes the task into extrapolation and is not a unique ground truth; the appropriate design depends on the deployment setting (Roberts et al., 2017; Valavi et al., 2019).

Metric definitions

ROC-AUC measures ranking between positive and negative samples. AP, average precision, is more sensitive to a minority positive class and must not be confused with trapezoidal PR-AUC. The success curve S(q) is the fraction of positives captured in the top q fraction of ranked samples, and lift(q) = S(q)/q. Here it is a sample-support-domain success rate, not “how much ore occurs in the top q% of area.” Areal success requires an equal-area grid and independent mineral occurrences.

One final honesty list: XGBoost and weights of evidence were not run in this workflow, and the code explicitly states that they were not presented as executed. Weights of evidence also require tests of independence and prior odds; highly correlated AI, K/Na and SI* cannot be multiplied as independent evidence.

Random splitting versus whole-hole spatial validation
Random splitting versus whole-hole spatial validation

Falsification Conditions and Minimum Requirements Before Deployment

Predictive metrics are only part of the checks. A testable interpretation must state in advance what new evidence would make us revise or abandon it.

The original teaching record reports that ten analytical figures were generated. Complete figures do not make the model correct. The following interpretations can be overturned, which is what a scientific deliverable should provide:

If a reproducible distance gradient exists within the same contemporaneous lithology, holdout holes, independent sections and comparable elevation windows should show the same direction. If they reverse after quality control, the single-center model should be rejected;

If geochronology or cross-cutting relationships show that high grade and the interpreted alteration occurred at different times, contemporaneous coupling should be rejected;

If radial trends disappear when opposite sides of a fault are modelled separately, while structural distance still provides repeated out-of-fold gain, the explanation of simple thermal-gradient control should be abandoned;

If small movement within the external center's uncertainty interval reverses the conclusion, the current vector is not robust and should not independently drive drilling.

Folds and contacts record a complex geological evolution
Folds and contacts record a complex geological evolution

Minimum deployment requirements are equally explicit: preserve independent validation by hole; place validation sections both along and perpendicular to the interpreted trend; and build a sensitivity matrix for prior-center movement, half and double bin width, half and double block width, buffer distance, same-lithology-only analysis and censoring model. This workflow executes only the stated baseline setting, censoring comparison and simulated-error sensitivity. It does not claim that unperformed robustness analyses passed.

The run log records 16 passed computational checks: unique sample IDs, equal support, clr sum zero and ilr dimension, isocon mass recovery, correct sign for mass loss, rejection of zero input, rejection of a single-class success curve, buffered whole-hole blocking, no target-derived features, complete out-of-fold predictions, closed-manifold shell, signed-distance calibration, ten nonblank figures, a success curve reaching 1, and sensitivity to censor labels.

The log also always states geological_validation: NOT PERFORMED. Passing computational checks cannot upgrade a conditional statistical interpretation into geological fact.

Conclusion: From Teaching Exercise to Real Deposit

The real purpose of this workflow is to put a statistical bridle on geological intuition.

The experienced geologist's “stronger when closer” remains a starting point, but it must pass eight gates: can the data be traced through QA/QC; are compositional relationships mathematical artifacts under clr/ilr; which kind of quantity does alteration measure—index, ratio or mass balance; who defines the center and can it be independently validated through spatial statistics; does correlation survive block-level permutation in coupling analysis; is the three-dimensional shell closed and excluded from circular inference; is AUC an illusion caused by leakage under spatial CV; and, most importantly, what evidence would overturn the interpretation?

Feeding real drill, spectral and assay data into this workflow under a defined field schema is the only path from teaching exercise to production tool. Coordinate reference, downhole trajectory, lithology, sample length, detection limit, total-iron convention and spectral quality all appear on the checklist, awaiting the first real dataset.