Understanding hydraulic conductivity is essential in porous media as it dictates the capacity of fluids to permeate through these substances. This research investigated the impact of chemical modification using fly ash on hydraulic conductivity. The coefficient of hydraulic conductivity along the bedding plane at different angles of orientations was predicted by employing machine learning techniques such as gene expression programming (GEP), artificial neural networks (ANNs), and regression tree (RT), considering various influencing parameters. As the amount of fly ash in the porous medium rises, the hydraulic conductivity decreases. The statistical results demonstrate that the proposed ANN model effectively forecasted the horizontal hydraulic conductivity. It achieved the highest R2 value (0.989), the lowest mean absolute percentage error value (5.772), the lowest scatter index value (0.040), and the lowest Akaike Information Criterion value (−2,359.914) compared to the GEP, RT, and previously established approaches. Moreover, a novel equation has been proposed for determining horizontal hydraulic conductivity, which can be used for any stratified medium, distinguishing this work from previous ones. These findings can inform global practices in mitigating groundwater contamination, enhancing irrigation efficiency, and improving the design of subsurface fluid flow systems, making it a valuable contribution to both academic and practical applications worldwide.