Field-induced valence fluctuations in YbB12