as well as作为准并列连词,既可以并列主语,也可以并列宾语或状语。所以有的时候可能会产生歧义。例如:
I like football as well as John.
1 = I as well as John like football. = Not only does John like football, but I like it as well.
2 = I not only like John but also like football.
所以,你的句子如果在deaths前不加with,则deaths这个名词短语就可能被误读为是并列的主语,即Not only deaths,,, are positively correlated with smoking and obesity, but the percentage... is positively correlated with smoking and obesity as well. 而有了with,则并列的成分只能是with介词短语,不可能产生误读。这和不定式省略to没有任何关,不应该相提并论。