  In this paper, we study the relative anti-canonical divisor $-K_{X/Y}$ of an
algebraic fiber space $\phi: X \to Y$, and we reveal relations among positivity
conditions of $-K_{X/Y}$, certain flatness of direct image sheaves, and
variants of the base loci including the stable (augmented, restricted) base
loci and upper level sets of Lelong numbers. This paper contains three main
results: The first result says that all the above base loci are located in the
horizontal direction unless they are empty. The second result is an algebraic
proof for Campana--Cao--Matsumura's equality on Hacon--$\rm{M^c}$Kernan's
question, whose original proof depends on analytics methods. The third result
partially solves the question which asks whether algebraic fiber spaces with
semi-ample relative anti-canonical divisor actually have a product structure
via the base change by an appropriate finite \'etale cover of $Y$. Our proof is
based on algebraic as well as analytic methods for positivity of direct image
sheaves.
