## 1 Introduction  
Shale gas has emerged as a pivotal transitional energy resource in the 21 st century, with global technically recoverable reserves reaching 2.1 \(\times\) 10\({}^{14}\) m\({}^{3}\), of which China holds 3.6 \(\times\) 10\({}^{13}\) m\({}^{3}\), ranking first worldwide. The Sichuan Basin, a core area for shale gas development in China, has witnessed successful commercialization of the Upper Ordovician Wufeng-Lower Silurian Longmaxi formations, with cumulative production exceeding 800 \(\times\) 10\({}^{8}\) m\({}^{3}\)[1]. Recently, exploration focus has shifted to the Lower Cambrian Qiongzhusi Formation, the oldest marine shale system in China. Well Wei-201 demonstrated a gas flow rate of 1.08 \(\times\) 10\({}^{4}\) m\({}^{3}\)/d (2021) in the Qiongzhusi shale, highlighting its production potential comparable to the Longmaxi Formation [2]. However, persistent TOC prediction errors (35.2% mean absolute percentage error (MAPE) calculated from 237 core-log pairs across 12 wells in the Sichuan Basin) remain a critical bottleneck for sweet-spot evaluation, attributed to extreme burial depths (2800-4200 m) and intense diagenetic alterations that amplify reservoir heterogeneity and geophysical response complexity, challenging conventional logging evaluation methods (\(\Delta\)logR method RMSE = 0.86 wt.% vs. core data [API RP 86]). Current TOC evaluation predominantly relies on core analysis and well-logging data, with logging-while-drilling (LWD) gaining prominence due to its vertical continuity. Established methods like the \(\Delta\)logR technique, which synergizes resistivity and porosity parameters, show limited applicability in reservoirs with subtle resistivity contrasts. Multi-attribute inversion approaches improve accuracy, but suffer from overfitting and pseudo-correlation artifacts. Recent advances in machine learning, particularly RFR, have demonstrated exceptional potential in handling nonlinear relationships (e.g., TOC vs. Gamma Ray/Resistivity crossplots with R\({}^{2}\) > 0.8 in high-maturity shales) and high-dimensional data (20+ petrophysical parameters processed with 89.3% cumulative variance retention). Empirical validation in the Ordos Basin demonstrates 23.7% RMSE reduction compared to \(\Delta\)logR methods when applying RFR with SHAP-optimized feature selection [3]. Nevertheless, systematic limitations persist: (1) cumulative errors (\(\pm\)0.18 m) from traditional linear depth calibration between core and logging data compromise input reliability [4; 5]; (2) feature selection strategies overly reliant on Pearson correlation coefficients fail to integrate PCA for dimensionality reduction and SHAP values for global feature space optimization [6]; and (3) poor model generalization under extreme thermobaric conditions in deep shales necessitates Bayesian optimization and cross-validation integration. To address the persistent limitations in TOC prediction accuracy under extreme burial conditions, this study introduces a Dynamic Weighting-Calibrated Random Forest Regression (DW-RFR) framework incorporating three principal innovations. First, Gamma-Ray-guided dynamic time warping is implemented to achieve \(\pm\)0.06 m depth alignment precision, representing a 66.7% improvement over conventional linear calibration methods through systematic analysis of 237 core-log calibration pairs [7; 8]. This advancement effectively mitigates cumulative errors induced by formation compaction and borehole instability. Second, a hybrid PCA-SHAP feature engineering strategy is developed to retain 89.3% cumulative variance while eliminating collinear features (VIF < 4), with 10-fold cross-validation identifying Gamma Ray (r = 0.82) and bulk density (r = -0.76) as dominant TOC predictors. Third, Bayesian-optimized ensemble learning coupled with Monte Carlo validation demonstrates robust performance in ultra-deep shales (2800-4200 m), reducing prediction errors from 35.2% to \(\lesssim\)20% MAPE and establishing the first sub-0.2 wt.% RMSE benchmark for Cambrian systems [9].