It was shown by Matomäki, Radziwiłł and Tao that the exponential sums of the Möbius function with linear phase functions exhibit cancellation in almost all short intervals. I will discuss joint work where we generalize this result to "higher order phase functions", so as a special case we can handle short sums of the Möbius function twisted by a polynomial phase function. This has applications to patterns in the Möbius and Liouville sequences, and in particular we show that the number of sign patterns that the Liouville function takes grows superpolynomially.