Conditional mutual information is a useful measure for detecting the association between variables that are also affected by other variables. Though permutation tests are used to check whether the conditional mutual information is zero to indicate mutual independence, permutations are difficult to perform because the other variables in a dataset may be associated with the variables in question. This problem is particularly acute when working with datasets of small sample size. This study aims to propose a computational method for approximating conditional mutual information based on the distribution of residuals in regression models. The proposed method can implement the permutation tests for statistical significance by translating the problem of measuring conditional independence into the problem of estimating simple independence. Additionally, a reliability of p-value in permutation test is defined to omit unreliably detected associations. We tested our proposed method's performance in inferring the network structure of an artificial gene network against comparable methods submitted to the Dream4 challenge.