We have recently proposed novel kernel functions, called base-pairing profile local alignment (BPLA) kernels for discrimination and detection of functional RNA sequences using SVMs. We employ STRAL’s scoring function which takes into account sequence similarities as well as upstream and downstream base-pairing probabilities, which enables us to model secondary structures of RNA sequences. In this paper, we develop a method for optimizing hyperparameters of BPLA kernels with respect to discrimination accuracy using a gradient-based optimization technique. Our experiments show that the proposed method can find a nearly optimal set of parameters much faster than the grid search on all parameter combinations.