A compound of formula II: or a pharmaceutically acceptable salt thereof, wherein: R 1 is hydrogen or C 1-4 aliphatic, optionally substituted with one or more halogen, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; R 2 is Hy, where Hy is selected from 4-8 membered saturated or partially unsaturated monocyclic heterocyclic ring having 1-2 heteroatoms independently selected from nitrogen, oxygen, or sulfur, a 5-6 membered monocyclic heteroaromatic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or an 8-10 membered bicyclic heteroaromatic ring having 1-5 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each R is independently hydrogen or an optionally substituted group selected from C 1-6 aliphatic, a 3-8 membered saturated or partially unsaturated monocyclic carbocyclic ring, phenyl, an 8-10 membered bicyclic aromatic carbocyclic ring; a 4-8 membered saturated or partially unsaturated monocyclic heterocyclic ring having 1-2 heteroatoms independently selected from nitrogen, oxygen, or sulfur, a 5-6 membered monocyclic heteroaromatic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or an 8-10 membered bicyclic heteroaromatic ring having 1-5 heteroatoms independently selected from nitrogen, oxygen, or sulfur; R 3 is hydrogen, halogen, -CN, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, -SO 2 R, -B 2, or an optionally substituted ring selected from phenyl or 5-6 membered heteroaryl having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; R 4 is an optionally substituted phenyl or naphthyl ring; each of R 5 and R 5 ' is independently -R, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; or R 5 and R 5 are taken together to form a cyclopropylenyl, cyclobutylenyl, or oxetanyl group; and each of R 7 and R 7' is independently hydrogen, -R, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; or R 7 and R 7' are taken together to form a 3-8 membered saturated or partially unsaturated monocyclic carbocyclic ring, or a 4-8 membered saturated or partially unsaturated monocyclic heterocyclic ring having 1-2 heteroatoms independently selected from nitrogen, oxygen, or sulfur. R 1 is hydrogen or C 1-4 aliphatic, optionally substituted with one or more halogen, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; R 2 is Hy, where Hy is selected from 4-8 membered saturated or partially unsaturated monocyclic heterocyclic ring having 1-2 heteroatoms independently selected from nitrogen, oxygen, or sulfur, a 5-6 membered monocyclic heteroaromatic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or an 8-10 membered bicyclic heteroaromatic ring having 1-5 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each R is independently hydrogen or an optionally substituted group selected from C 1-6 aliphatic, a 3-8 membered saturated or partially unsaturated monocyclic carbocyclic ring, phenyl, an 8-10 membered bicyclic aromatic carbocyclic ring; a 4-8 membered saturated or partially unsaturated monocyclic heterocyclic ring having 1-2 heteroatoms independently selected from nitrogen, oxygen, or sulfur, a 5-6 membered monocyclic heteroaromatic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or an 8-10 membered bicyclic heteroaromatic ring having 1-5 heteroatoms independently selected from nitrogen, oxygen, or sulfur; R 3 is hydrogen, halogen, -CN, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, -SO 2 R, -B 2, or an optionally substituted ring selected from phenyl or 5-6 membered heteroaryl having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; R 4 is an optionally substituted phenyl or naphthyl ring; each of R 5 and R 5 ' is independently -R, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; or R 5 and R 5 are taken together to form a cyclopropylenyl, cyclobutylenyl, or oxetanyl group; and each of R 7 and R 7' is independently hydrogen, -R, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; or R 7 and R 7' are taken together to form a 3-8 membered saturated or partially unsaturated monocyclic carbocyclic ring, or a 4-8 membered saturated or partially unsaturated monocyclic heterocyclic ring having 1-2 heteroatoms independently selected from nitrogen, oxygen, or sulfur.