Generalized dualities and higher derivatives