Consider a graph with a set of vertices and oriented edges connecting pairs of vertices. Each vertex is associated with a random variable and these are assumed to be independent. In this setting, suppose we wish to solve the following hypothesis testing problem: under the null, the random variables have common distribution N (0, 1) while under the alternative, there is an unknown path along which random variables have distribution N (., 1), . > 0, and distribution N (0, 1) away from it. For which values of the mean shift . can one reliably detect and for which values is this impossible? Consider, for example, the usual regular lattice with vertices of the form {(i, j): 0 . i, -i . j . i and j has the parity of i} and oriented edges (i, j) . (i + 1, j + s), where s = ±1. We show that for paths of length m starting at the origin, the hypotheses become distinguishable (in a minimax sense) if $\mu _{m}\gg 1/\sqrt{{\rm log}\ m}$, while they are not if $\mu _{m}\ll 1/{\rm log}\ m$. We derive equivalent results in a Bayesian setting where one assumes that all paths are equally likely; there, the asymptotic threshold is $\mu _{m}\approx m^{-1/4}$. We obtain corresponding results for trees (where the threshold is of order 1 and independent of the size of the tree), for distributions other than the Gaussian and for other graphs. The concept of the predictability profile, first introduced by Benjamini, Pemantle and Peres, plays a crucial role in our analysis.