Kelley and Meka recently proved strong bounds on the size of subsets of $\mathbb{Z}_N$ or $\mathbb{F}_q^n$ that do not contain 3-term arithmetic progression. We use their techniques to prove similar bounds for subsets of $\mathbb{F}_q^n$ that do not contain non-degenerate instances of affine binary linear systems whose underlying graph is 2-degenerate. We show that if a subset of $\mathbb{F}_q^n$ contains an atypical number of instances of an affine binary linear 2-degenerate system, then it has a constant density increment inside an affine subspace of polylogarithmic codimension. We give a counterexample showing that this kind of result does not hold for linear systems whose true complexity exceeds 1. Using the same techniques, we obtain a counting lemma for sparse quasirandom graphs, improving on the classical result of Chung, Graham, and Wilson (Combinatorica 1989), which is only nontrivial for dense graphs.