In this paper, a tunable metasurface filter based on electrochemical metallization is proposed. The finite element method (FEM) is used to simulate the formation and rupture of the conductive filament (CF). The geometric structure of the metasurfaces filter is reconstructed by CF to achieve the purpose of tuning the transmission characteristics of the metasurface. Due to the formation of CF in the gap of separated rectangular gold patches, the proposed metasurface simultaneously exhibits the resonance characteristics of two separated rectangular gold patches and unseparated rectangular gold patches. Numerical calculations show that when the radius of the CF increases from 5 nm to 25 nm, the metasurface shows good tunable filtering characteristics, and its quality factor gradually increases. Finally, in order to solve the problem of consuming a lot of time to design metasurface, a deep neural network (DNN) is used to predict the transmission curves corresponding to different metasurface structures. The results show that the Mean Square Error (MSE) of the training model is less than 1×10-3, which shows superior robustness and generalization, and greatly shortens the time required for design. This design paves a new way to develop optoelectronic devices, such as modulators, sensors and optical switches.