  Let $\lambda$ denote the Liouville function. We show that, as $X \rightarrow
\infty$, $$\int_{X}^{2X} \sup_{\substack{P(Y)\in \mathbb{R}[Y]\\ deg(P)\leq k}}
\Big | \sum_{x \leq n \leq x + H} \lambda(n) e(-P(n)) \Big |\ dx = o ( X H)$$
for all fixed $k$ and $X^{\theta} \leq H \leq X$ with $0 < \theta < 1$ fixed
but arbitrarily small. Previously this was only established for $k \leq 1$. We
obtain this result as a special case of the corresponding statement for
(non-pretentious) $1$-bounded multiplicative functions that we prove. In fact,
we are able to replace the polynomial phases $e(-P(n))$ by degree $k$
nilsequences $\overline{F}(g(n) \Gamma)$. By the inverse theory for the Gowers
norms this implies the higher order asymptotic uniformity result
$$\int_{X}^{2X} \| \lambda \|_{U^{k+1}([x,x+H])}\ dx = o ( X )$$ in the same
range of $H$. We present applications of this result to patterns of various
types in the Liouville sequence. Firstly, we show that the number of sign
patterns of the Liouville function is superpolynomial, making progress on a
conjecture of Sarnak about the Liouville sequence having positive entropy.
Secondly, we obtain cancellation in averages of $\lambda$ over short polynomial
progressions $(n+P_1(m),\ldots, n+P_k(m))$, which in the case of linear
polynomials yields a new averaged version of Chowla's conjecture. We are in
fact able to prove our results on polynomial phases in the wider range $H\geq
\exp((\log X)^{5/8+\varepsilon})$, thus strengthening also previous work on the
Fourier uniformity of the Liouville function.
