Efficient simulation of conditional random fields by Karhunen–Loève expansion | Synapse