## 1 Introduction
From a data visualization perspective, UMAP enables clearer clustering and differentiation of lithological units by integrating diverse LWD data sources. This capability is highly valuable for real-time lithology identification in strongly heterogeneous formations and supports improved geosteering accuracy in thin reservoirs encountered during horizontal drilling [45]. To satisfy the engineering requirements for the real-time and high-precision evaluation of strongly heterogeneous formations during directional drilling, this study develops an intelligent lithology identification framework leveraging Logging While Drilling (LWD) data and drilling engineering parameters. This approach effectively tackles critical challenges, including sparse lithology labels and the integration of multi-source data (Figure 1). In the proposed workflow, six logging parameters--including natural gamma ray, electrical resistivity, and neutron porosity--alongside four drilling engineering parameters, such as rate of penetration (ROP) and weight on bit (WOB), are first subjected to data cleaning and standardization. These inputs are then processed simultaneously through the Uniform Manifold Approximation and Projection (UMAP) algorithm, which performs nonlinear dimensionality reduction. This step enables fusion of the high-dimensional feature space, capturing the real-time dynamics of drilling parameters while preserving the lithological sensitivity inherent in the logging data. Next, the low-dimensional representations are subjected to unsupervised clustering using the K-means algorithm. This clustering step reveals correlations between log-derived petrophysical patterns and variations in drilling responses, capturing the characteristic co-occurrence of gamma-resistivity anomalies and abrupt changes in ROP and torque at interfaces of strongly heterogeneous formations. Finally, an optimized CatBoost (1.2.7) ensemble learning model is trained using the clustered data to establish a real-time lithology identification and precision drilling framework. This model integrates the complementary strengths of geological interpretation derived from logging curves with the engineering sensitivity of drilling dynamics, thereby enhancing classification accuracy and providing robust drilling guidance. The proposed methodology achieves efficient dimensionality reduction and semi-supervised clustering of multi-source LWD data by extracting latent lithological features from fused LWD-drilling parameters, thereby reducing dependency on labeled data. Combined with CatBoost's ordered boosting and categorical encoding, the framework enhances computational efficiency for real-time streaming, enabling accurate formation characterization under complex geological conditions. Comparative evaluations of various machine learning models are performed, and the optimal algorithm combination is determined. When applied to field data, the proposed method exhibits enhanced lithology identification accuracy in heterogeneous formations, offering valuable geological and engineering insights for precise horizontal well trajectory control. Figure 1: The workflow of real-time intelligent identification and precision drilling for strongly heterogeneous formations based on multi-parameters of LWD and drilling engineering.