To address the issue that conventional inversion outcomes in underground space microgravity detection are ambiguous and detrimental to target localization,the microgravity anomaly compact inversion approach was investigated.With the precondition that the target size be minimun,the density contrast between the target and the host rock is incorporated as prior information,and the weighted damping optimization algorithm was employed to achieve the compact inversion of microgravity anomalies.In contrast to conventional results,the compact inversion can delineate the target boundary,which enhances the inversion quality.The impacts of key parameters such as model resolution,signal-to-noise ratio and prior density contrast on the inversion were analyzed,and specific setting methods and suggestions were provided.The synthetic test results indicated that the model resolution matrix determined the sensitivity of the corresponding inversion mesh to the observed data.If the diagonal element of the cell is overly small,the settings should be adjusted.The signal-to-noise ratio exerts a significant influence on the compact performance of the inversion,which can be estimated by means of the power spectrum curve.The prior density contrast has a considerable influence on the accuracy of the inversion results,and an obvious incorrect density difference will lead to the inversion being unable to fit or focus;thus,a reasonable value should be assigned based on physical property statistics.The overall magnitude of the Bouguer gravity anomaly is of the order of micro gal,and the maximum anomaly is approximately 5 times the detection accuracy.It can indicate the planar position of the target,but its cross-sectional area and burial depth are difficult to estimate.The microgravity compact inversion method was utilized to process the measured anomalies,and the cross-sectional area and burial depth of the tunnel were obtained.Consequently,compact inversion can enhance the efficacy of the microgravity method in detecting underground space and possesses favorable application value.