A heart-rate associated with a heartbeat signal is determined. A transform is selected based on the determined heart-rate associated with the heartbeat signal and a reference heart-rate associated with a dictionary of a sparse approximation model. The transform is selected independent of other factors associated with generation of the heartbeat signal. The selected transform is applied to the dictionary of the sparse approximation model, generating an adjusted dictionary of the sparse approximation model. Anomalous heartbeats in the heartbeat signal are detected using the adjusted dictionary of the sparse approximation model.