A compound of formula ( II-A) or ( II-B): or a pharmaceutically acceptable salt thereof; wherein: G is -V 1 -R 3, -V 1 -L 1 -R 3, -L 1 -V 2 -R 3, -L 1 -R 3, or -L 1 -V 2 -L 2 -R 3; L 1 and L 2 are each independently unsubstituted C 1-3 alkylene chain, where one carbon atom may be replaced with -CR A =CR A -; V 1 is -S 2 -; V 2 is -C -, -C -, -N(R 4a)-, -C -N(R 4a)-, -N(R 4a)-C -, -SO 2 -N(R 4a)-, -N(R 4a)-SO 2 -, -C -O-, -O-C -, -O-, -S-, -S -, -S 2 -, -N(R 4a)-C -N(R 4a)-, -N(R 4a)-C -O-, -O-C -N(R 4a)-, or -N(R 4a)-SO 2 -N(R 4a)-; R 3 is unsubstituted or substituted C 1-6 aliphatic, unsubstituted or substituted 3-10-membered cycloaliphatic, unsubstituted or substituted 4-10-membered heterocyclyl having 1-4 heteroatoms independently selected from nitrogen, oxygen, and sulfur, unsubstituted or substituted 6-10-membered aryl, or unsubstituted or substituted 5-10-membered heteroaryl having 1-5 heteroatoms independently selected from nitrogen, oxygen, and sulfur; each occurrence of R A is independently hydrogen, halo, or an optionally substituted C 1-4 aliphatic group; each occurrence of R 4a is independently hydrogen, or an optionally substituted C 1-4 aliphatic group; ring B is optionally further substituted with m occurrences of R 1; each occurrence of R 1 is independently halo, C 1-3 alkyl, C 1-3 haloalkyl, -O-C 1-3 alkyl, -O-C 1-3 haloalkyl, -CN, -NHC C 1-3 alkyl, -NHC NHC 1-3 alkyl, or NHS 2 C 1-3 alkyl; ring A is optionally further substituted with n occurrences of R 2; each occurrence of R 2 is independently halo, C 1-3 alkyl, C 1-3 haloalkyl, -O-C 1-3 alkyl, -O-C 1-3 haloalkyl, -NHC C 1-3 alkyl, -NHC NHC 1-3 alkyl, or NHS 2 C 1-3 alkyl; m is 0-2; and n is 0-4; or wherein: G is -R 3; R 3 is unsubstituted or substituted 3-10-membered cycloaliphatic, unsubstituted or substituted 4-10-membered heterocyclyl having 1-4 heteroatoms independently selected from nitrogen, oxygen, and sulfur, unsubstituted or substituted 6-10-membered aryl, or unsubstituted or substituted 5-10-membered heteroaryl having 1-5 heteroatoms independently selected from nitrogen, oxygen, and sulfur; ring B is optionally further substituted with m occurrences of R 1; each occurrence of R 1 is independently halo, C 1-3 alkyl, C 1-3 haloalkyl, -O-C 1-3 alkyl, -O-C 1-3 haloalkyl, -CN, -NHC C 1-3 alkyl, -NHC NHC 1-3 alkyl, or NHS 2 C 1-3 alkyl; ring A is optionally further substituted with n occurrences of R 2; each occurrence of R 2 is independently halo, C 1-3 alkyl, C 1-3 haloalkyl, -O-C 1-3 alkyl, -O-C 1-3 haloalkyl, -NHC C 1-3 alkyl, -NHC NHC 1-3 alkyl, or NHS 2 C 1-3 alkyl; m is 0-2; and n is 0-4. G is -V 1 -R 3, -V 1 -L 1 -R 3, -L 1 -V 2 -R 3, -L 1 -R 3, or -L 1 -V 2 -L 2 -R 3; L 1 and L 2 are each independently unsubstituted C 1-3 alkylene chain, where one carbon atom may be replaced with -CR A =CR A -; V 1 is -S 2 -; V 2 is -C -, -C -, -N(R 4a)-, -C -N(R 4a)-, -N(R 4a)-C -, -SO 2 -N(R 4a)-, -N(R 4a)-SO 2 -, -C -O-, -O-C -, -O-, -S-, -S -, -S 2 -, -N(R 4a)-C -N(R 4a)-, -N(R 4a)-C -O-, -O-C -N(R 4a)-, or -N(R 4a)-SO 2 -N(R 4a)-; R 3 is unsubstituted or substituted C 1-6 aliphatic, unsubstituted or substituted 3-10-membered cycloaliphatic, unsubstituted or substituted 4-10-membered heterocyclyl having 1-4 heteroatoms independently selected from nitrogen, oxygen, and sulfur, unsubstituted or substituted 6-10-membered aryl, or unsubstituted or substituted 5-10-membered heteroaryl having 1-5 heteroatoms independently selected from nitrogen, oxygen, and sulfur; each occurrence of R A is independently hydrogen, halo, or an optionally substituted C 1-4 aliphatic group; each occurrence of R 4a is independently hydrogen, or an optionally substituted C 1-4 aliphatic group; ring B is optionally further substituted with m occurrences of R 1; each occurrence of R 1 is independently halo, C 1-3 alkyl, C 1-3 haloalkyl, -O-C 1-3 alkyl, -O-C 1-3 haloalkyl, -CN, -NHC C 1-3 alkyl, -NHC NHC 1-3 alkyl, or NHS 2 C 1-3 alkyl; ring A is optionally further substituted with n occurrences of R 2; each occurrence of R 2 is independently halo, C 1-3 alkyl, C 1-3 haloalkyl, -O-C 1-3 alkyl, -O-C 1-3 haloalkyl, -NHC C 1-3 alkyl, -NHC NHC 1-3 alkyl, or NHS 2 C 1-3 alkyl; m is 0-2; and n is 0-4; or wherein: G is -R 3; R 3 is unsubstituted or substituted 3-10-membered cycloaliphatic, unsubstituted or substituted 4-10-membered heterocyclyl having 1-4 heteroatoms independently selected from nitrogen, oxygen, and sulfur, unsubstituted or substituted 6-10-membered aryl, or unsubstituted or substituted 5-10-membered heteroaryl having 1-5 heteroatoms independently selected from nitrogen, oxygen, and sulfur; ring B is optionally further substituted with m occurrences of R 1; each occurrence of R 1 is independently halo, C 1-3 alkyl, C 1-3 haloalkyl, -O-C 1-3 alkyl, -O-C 1-3 haloalkyl, -CN, -NHC C 1-3 alkyl, -NHC NHC 1-3 alkyl, or NHS 2 C 1-3 alkyl; ring A is optionally further substituted with n occurrences of R 2; each occurrence of R 2 is independently halo, C 1-3 alkyl, C 1-3 haloalkyl, -O-C 1-3 alkyl, -O-C 1-3 haloalkyl, -NHC C 1-3 alkyl, -NHC NHC 1-3 alkyl, or NHS 2 C 1-3 alkyl; m is 0-2; and n is 0-4.