We present a new method, Non-Stationary Forward Flux Sampling, that allows
efficient simulation of rare events in both stationary and non-stationary
stochastic systems. The method uses stochastic branching and pruning to achieve
uniform sampling of trajectories in phase space and time, leading to accurate
estimates for time-dependent switching propensities and time-dependent phase
space probability densities. The method is suitable for equilibrium or
non-equilibrium systems, in or out of stationary state, including non-Markovian
or externally driven systems. We demonstrate the validity of the technique by
applying it to a one-dimensional barrier crossing problem that can be solved
exactly, and show its usefulness by applying it to the time-dependent switching
of a genetic toggle switch.Comment: 18 pages, 10 figure