A computer-implemented image compression method comprising: receiving a request to generate a compressed representation of an input image; and generating the compressed representation of the input image, wherein the compressed representation includes a respective set of binary codes at each of a plurality of iterations, wherein each set of binary codes includes a respective subset of binary codes for each of a plurality of tiles in the input image, and wherein the generating comprises, for each of the plurality of iterations: processing an encoder input for the iteration using an encoder neural network, wherein the encoder neural network is configured to process the encoder input to generate an initial set of binary codes for the iteration, the initial set of binary codes including a respective subset of initial binary codes for each of the plurality of tiles; and generating the set of binary codes for the iteration from the initial set of binary codes, comprising: for any tiles that have already been masked off during any previous iteration of the plurality of iterations: masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero; for any tiles that have not yet been masked off during any of the previous iterations of the plurality of iterations: determining whether a reconstruction error of the tile when reconstructed from binary codes at the previous iterations satisfies an error threshold; and when the reconstruction error satisfies the error threshold, masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero. receiving a request to generate a compressed representation of an input image; and generating the compressed representation of the input image, wherein the compressed representation includes a respective set of binary codes at each of a plurality of iterations, wherein each set of binary codes includes a respective subset of binary codes for each of a plurality of tiles in the input image, and wherein the generating comprises, for each of the plurality of iterations: processing an encoder input for the iteration using an encoder neural network, wherein the encoder neural network is configured to process the encoder input to generate an initial set of binary codes for the iteration, the initial set of binary codes including a respective subset of initial binary codes for each of the plurality of tiles; and generating the set of binary codes for the iteration from the initial set of binary codes, comprising: for any tiles that have already been masked off during any previous iteration of the plurality of iterations: masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero; for any tiles that have not yet been masked off during any of the previous iterations of the plurality of iterations: determining whether a reconstruction error of the tile when reconstructed from binary codes at the previous iterations satisfies an error threshold; and when the reconstruction error satisfies the error threshold, masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero. processing an encoder input for the iteration using an encoder neural network, wherein the encoder neural network is configured to process the encoder input to generate an initial set of binary codes for the iteration, the initial set of binary codes including a respective subset of initial binary codes for each of the plurality of tiles; and generating the set of binary codes for the iteration from the initial set of binary codes, comprising: for any tiles that have already been masked off during any previous iteration of the plurality of iterations: masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero; for any tiles that have not yet been masked off during any of the previous iterations of the plurality of iterations: determining whether a reconstruction error of the tile when reconstructed from binary codes at the previous iterations satisfies an error threshold; and when the reconstruction error satisfies the error threshold, masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero. for any tiles that have already been masked off during any previous iteration of the plurality of iterations: masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero; for any tiles that have not yet been masked off during any of the previous iterations of the plurality of iterations: determining whether a reconstruction error of the tile when reconstructed from binary codes at the previous iterations satisfies an error threshold; and when the reconstruction error satisfies the error threshold, masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero. determining whether a reconstruction error of the tile when reconstructed from binary codes at the previous iterations satisfies an error threshold; and when the reconstruction error satisfies the error threshold, masking off the tile by setting each of the binary codes for the tile in the set of binary codes to zero.