Cosmological solutions with a homogeneous Yang-Mills field which oscil
lates and passes between topologically distinct vacua are discussed. T
hese solutions are used to model the collapsing Bartnik-McKinnon gravi
tational sphaleron and the associated anomalous production of fermions
. The Dirac equation is analyzed in these backgrounds. It is shown exp
licitly that a fermion energy level crosses from the negative to posit
ive energy spectrum as the gauge field evolves between the topological
ly distinct vacua. The cosmological solutions are also generalized to
include an axion field.