From bosonic topological transition to symmetric fermion mass generation