In gravel-bed rivers, monitoring porosity is vital for fluvial geomorphology assessment as well as in river ecosystem management. Conventional porosity prediction methods are restricting in terms of the number of considered factors and are also time-consuming. We present a framework, the combination of the Discrete Element Method (DEM) and Artificial Neural Network (ANN), to study the relationship between porosity and the grain size distribution. DEM was applied to simulate the 3D structure of the packing gravel-bed and fine sediment infiltration processes under various forces. The results of the DEM simulations were verified with the experimental data of porosity and fine sediment distribution. Further, an algorithm was developed for calculating high-resolution results of porosity and grain size distribution in vertical and horizontal directions from the DEM results, which were applied to develop a Feed Forward Neural Network (FNN) to predict bed porosity based on grain size distribution. The reliable results of DEM simulation and FNN prediction confirm that our framework is successful in predicting porosity change of gravel-bed.