An input signal, in the form of a sequence of feature vectors, is transformed to an output signal by first storing parameters of a model of the input signal in a memory. Using the vectors and the parameters, a sequence of vectors of hidden variables is inferred. There is at least one vector hn of hidden variables hi,n for each feature vector xn, and each hidden variable is nonnegative. The output signal is generated using the feature vectors, the vectors of hidden variables, and the parameters. Each feature vector xn is dependent on at least one of the hidden variables hi,n for the same n. The hidden variables are related according to
where j and l are summation indices. The parameters include non-negative weights ci,j,l, and εl,n are independent non-negative random variables.