Added guard against unauthorized tampering with relation weights