In this paper, we study the relative anti-canonical divisor
−
K
X
/
Y
-K_{X/Y}
of an algebraic fiber space
ϕ
:
X
→
Y
\phi \colon X\to Y
, and we reveal relations among positivity conditions of
−
K
X
/
Y
-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–McKernan’s question, whose original proof depends on analytics methods. The third result proves that algebraic fiber spaces with semi-ample relative anti-canonical divisor actually have a product structure via the base change by an appropriate finite étale cover of
Y
Y
. Our proof is based on algebraic as well as analytic methods for positivity of direct image sheaves.