We address the issue of hallucination in data-to-text generation, i.e.,\nreducing the generation of text that is unsupported by the source. We\nconjecture that hallucination can be caused by an encoder-decoder model\ngenerating content phrases without attending to the source; so we propose a\nconfidence score to ensure that the model attends to the source whenever\nnecessary, as well as a variational Bayes training framework that can learn the\nscore from data. Experiments on the WikiBio (Lebretet al., 2016) dataset show\nthat our approach is more faithful to the source than existing state-of-the-art\napproaches, according to both PARENT score (Dhingra et al., 2019) and human\nevaluation. We also report strong results on the WebNLG (Gardent et al., 2017)\ndataset.\n