1. A device for filtering/tracking a real-time behavior of a system, comprising: a processor; and a memory connected to the processor for storing a dynamic relational Bayesian network (DRBN); wherein the processor is configured to perform the steps of: identifying variables in a DRBN to be filtered, the DRBN including a plurality of submodels; assigning a characterization to the variables to be filtered; creating a reduced graph for each submodel of the DRBN by reducing each observed variable to a singleton domain; compiling on a computer each reduced graph to create compiled inference structures; creating a mapping between data instances and the compiled inference structures by constructing an inference cache for each variable of the reduced graph for each data instance to which the reduced graph applies; and performing on a computer exact inference over each data instance using a generalized loopy inference method to communicate estimate changes between instances for each loopy pass, wherein the data instances are time ordered and the order of instance application is reversed for each loopy pass.