Inferring underground porosity and evaluating its spatial distribution is of great significance in a wide range of Earth sciences and engineering, including hydrocarbon reservoir characterization and geothermal energy exploitation. Popular methods are largely based on the analysis of lithological cores, well logs, and seismic inversion. These methods are reliable, but they are still time-consum…