A method for decoding an image signal, comprising: determining a non-separable transform set index indicating a non-separable transform set for a current block from among four predetermined non-separable transform sets based on an intra prediction mode of the current block, each of the four predetermined non-separable transform sets consists of two transform kernels; determining a transform kernel included in the non-separable transform set indicated by the non-separable transform set index as a non-separable transform matrix for the current block; and performing secondary inverse transform for the current block by applying the non-separable transform matrix to a top-left region of the current block, the top-left region of the current block is determined based on a width and a height of the current block, wherein the non-separable transform set index has an index value of 0, 1, 2 or 3 indicating each of the four predetermined non-separable transform sets, wherein the transform kernel is determined from among two transform kernels included in the non-separable transform set, wherein, when the intra prediction mode is 0 or 1, the non-separable transform set index is determined as 0, wherein, when the intra prediction mode is one of 2 to 12, or 56 to 66, the non-separable transform set index is determined as 1, wherein, when the intra prediction mode is one of 13 to 23, or 45 to 55, the non-separable transform set index is determined as 2, and wherein, when the intra prediction mode is one of 24 to 44, the non-separable transform set index is determined as 3. determining a non-separable transform set index indicating a non-separable transform set for a current block from among four predetermined non-separable transform sets based on an intra prediction mode of the current block, each of the four predetermined non-separable transform sets consists of two transform kernels; determining a transform kernel included in the non-separable transform set indicated by the non-separable transform set index as a non-separable transform matrix for the current block; and performing secondary inverse transform for the current block by applying the non-separable transform matrix to a top-left region of the current block, the top-left region of the current block is determined based on a width and a height of the current block, wherein the non-separable transform set index has an index value of 0, 1, 2 or 3 indicating each of the four predetermined non-separable transform sets, wherein the transform kernel is determined from among two transform kernels included in the non-separable transform set, wherein, when the intra prediction mode is 0 or 1, the non-separable transform set index is determined as 0, wherein, when the intra prediction mode is one of 2 to 12, or 56 to 66, the non-separable transform set index is determined as 1, wherein, when the intra prediction mode is one of 13 to 23, or 45 to 55, the non-separable transform set index is determined as 2, and wherein, when the intra prediction mode is 0 or 1, the non-separable transform set index is determined as 0, wherein, when the intra prediction mode is one of 2 to 12, or 56 to 66, the non-separable transform set index is determined as 1, wherein, when the intra prediction mode is one of 13 to 23, or 45 to 55, the non-separable transform set index is determined as 2, and wherein, when the intra prediction mode is one of 24 to 44, the non-separable transform set index is determined as 3.