Following the guidelines of the Basel III agreement (2013), large financial institutions are forced to incorporate additional collateral, known as Initial Margin, in their transactions in OTC markets. Currently, the computation of such collateral is performed following the Standard Initial Margin Model (SIMM) methodology. Focusing on a portfolio consisting of an interest rate swap, we propose the use of Artificial Neural Networks (ANN) to approximate the Initial Margin value of the portfolio over its lifetime. The goal is to find an optimal configuration of structural hyperparameters, as well as to analyze the robustness of the network to variations in the model parameters and swap features.