Deep curable polymers having heterocyclic ring systems such as isoindoloquinazolinedione ring systems prepared from novel cyanoimide polymers, most desirably 2'-cyanoimide polymers. Preferably the cyanoimide polymers are prepared from a diamine having at least one nitrile group in the two position to an amine group and a dianhydride having at least two cyclic anhydride groups. Copolymers may be prepared having other linkages, notably imide linkages, in addition to isoindoloquinazolinedione ring systems and/or other similar heterocyclic ring systems. The copolymers can be prepared by use of diamines containing one or more cyanoimide groupings and/or imide groups in their structure.