Topological subsystem codes proposed recently by Bombin are quantum error-correcting codes defined on a two-dimensional grid of qubits that permit reliable quantum information storage with a constant error threshold. These codes require only the measurement of two-qubit nearest-neighbor operators for error correction. In this paper, we demonstrate that topological subsystem codes (TSCs) can be viewed as generalizations of Kitaev's honeycomb model to 3-valent hypergraphs. This new connection provides a systematic way of constructing TSCs and analyzing their properties. We also derive a necessary and sufficient condition under which a syndrome measurement in a subsystem code can be reduced to measurements of the gauge group generators. Furthermore, we propose and implement some candidate decoding algorithms for one particular TSC assuming perfect error correction. Our Monte Carlo simulations indicate that this code, which we call the five-square code, has a threshold against depolarizing noise of at least 2%. © 2011 IOP Publishing Ltd.