---
title: "r-grams: Relational Grams"
authors:
  - "Niels Landwehr"
  - "Luc De Raedt"
doi: ""
url: "https://ijcai.org/proceedings/2007/146"
pdf: "https://ijcai.org/proceedings/2007/0146.pdf"
venue: "Proceedings of the Twentieth International Joint Conference on Artificial Intelligence"
year: 2007
pages: "907-911"
track: ""
keywords:
---

# r-grams: Relational Grams

Niels Landwehr, Luc De Raedt

*Proceedings of the Twentieth International Joint Conference on Artificial Intelligence*, pages 907-911.

## Abstract

We introduce relational grams (r-grams). They upgrade n-grams for modeling relational sequences of atoms. As n-grams, r-grams are based on smoothed n-th order Markov chains. Smoothed distributions can be obtained by decreasing the order of the Markov chain as well as by relational generalization of the r-gram. To avoid sampling object identifiers in sequences, r-grams are generative models at the level of variablized sequences with local object identity constraints. These sequences define equivalence classes of ground sequences, in which elements are identical up to local identifier renaming. The proposed technique is evaluated in several domains, including mobile phone communication logs, Unix shell user modeling, and protein fold prediction based on secondary protein structure.
