nucleus sampling: Nonlinear Function