We study rare events in systems of diffusive fields driven out of equilibrium by the boundaries. We present a numerical technique and use it to calculate the probabilities of rare events in one and two dimensions. Using this technique, we show that the probability density of a slowly varying configuration can be captured with a small number of long wave-length modes. For a configuration which varies rapidly in space this description can be complemented by a local equilibrium assumption.PACS numbers: 05.70.Ln In many cases the typical size of fluctuations in a physical system with N degrees of freedom is of order 1/ √ N . Larger fluctuations are rare, and their probability scales as, where φ is an intensive function of the state ρ. The function φ [ρ] is known as the large-deviation function (LDF) and is of fundamental interest in statistical mechanics. In equilibrium systems, φ is equal to the free-energy density. Away from equilibrium, a simple expression for φ is in general not known, and it may be affected by details of the system's dynamics. Besides its fundamental interest for non-equilibrium physics, the function φ is important in various applications, e.g. for calculating escape rates from metastable states, with applications ranging from chemistry and population dynamics to cosmology [1][2][3][4][5][6]9].In a non-equilibrium steady-state, to compute the probability of a rare-event, one must calculate the dynamics leading up to that event [10]. This is in general a difficult task, even more so for spatially extended systems, where only a handful of analytical solutions exist [11]. If a general understanding is to emerge, additional methods beyond exact solutions need to be considered. Indeed, recent years have seen a considerable effort to develop numerical techniques to calculate the LDF in a variety of systems [12][13][14][15][16].In this Letter, we study the LDF in bulk-conserving diffusive systems, which are driven out of equilibrium by the boundaries. These describe a broad range of transport phenomena, including electronic systems, ionic conductors, and heat conduction [17,18]. We show that the LDF in such systems can be efficiently evaluated numerically for a general interacting system in one and two dimensions, giving us access to previously unavailable information. This is done by searching for the most probable history ρ (x, t) of the conserved density function ρ leading to a rare state ρ f (x). Importantly, using the numerical technique we show that for many non-trivial cases, the LDF of a slowly varying configuration ρ f (x) can be calculated by considering only histories ρ (x, t) which are slowly varying in space, i.e. which are given by the sum of only a few long wave-length modes. This implies that the long wave-length structure of the LDF can be understood using an effective finite-dimensional theory, instead of the full infinite dimensional one. In addition, we find that a local equilibrium assumption can capture much of the short wave length structure. This could suggest a simple fram...