The fundamental nature of dark matter (DM) so far eludes direct detection experiments, but it has left its imprint in the large-scale structure (LSS) of the Universe. I will present new results demonstrating how the S_8 cosmological parameter tension (the discrepancy in the amplitude of density fluctuations as inferred from cosmic microwave background and galaxy surveys) could be a signature of ultra-light DM particle candidates called axions that are well motivated from high energy theory. I will then present complementary searches for ultra-light and light (sub-GeV) DM using a LSS probe called the Lyman-alpha forest. By combining complementary large- and small-scale structure probes, I will demonstrate how current and forthcoming cosmological data will systematically test the nature of DM. In order to model novel DM physics accurately and efficiently in CMB and LSS probes, I will present new machine learning approaches using neural network "emulators" to accelerate DM parameter inference from days to seconds and active learning to reduce massively the computational expense.