  On highly oxygen deficient thin films of hafnium oxide (hafnia, HfO$_{2-x}$)
contaminated with adsorbates of carbon oxides, the formation of hafnium carbide
(HfC$_x$) at the surface during vacuum annealing at temperatures as low as 600
{\deg}C is reported. Using X-ray photoelectron spectroscopy the evolution of
the HfC$_x$ surface layer related to a transformation from insulating into
metallic state is monitored in situ. In contrast, for fully stoichiometric
HfO$_2$ thin films prepared and measured under identical conditions, the
formation of HfC$_x$ was not detectable suggesting that the enhanced adsorption
of carbon oxides on oxygen deficient films provides a carbon source for the
carbide formation. This shows that a high concentration of oxygen vacancies in
carbon contaminated hafnia lowers considerably the formation energy of hafnium
carbide. Thus, the presence of a sufficient amount of residual carbon in
resistive random access memory devices might lead to a similar carbide
formation within the conducting filaments due to Joule heating.
