Inverse Language Modeling towards Robust and Grounded LLMs