US confectioner Hershey has insisted that it will continue to improve its gross margins in the face of rising commodity costs.