As explained in the section on sign convention for spring curves (click here), the extension of the spring generates a negative force and compression of the spring generates a positive force. However, for the convenience of the user the spring stiffness splines should be defined with a positive slope, as shown below:
Figure 1 Spline for a force curve