Dynamic Bayesian networks (DBNs) have received increasing attention from the computational biology community as models of gene regulatory networks. However, conventional DBNs are based on the homogeneous Markov assumption and cannot deal with inhomogeneity and nonstationarity in temporal processes. The present chapter provides a detailed discussion of how the homogeneity assumption can be relaxed. The improved method is evaluated on simulated data, where the network structure is allowed to change with time, and on gene expression time series during morphogenesis in Drosophila melanogaster.