## 2 Materials and Methods
### A Method for Inferring Chemical Graphs  
This section reviews the framework that solves the inverse QSAR/QSPR by using MILPs [18]. For a specified chemical property \(\pi\) such as boiling point, we denote by \(a(G)\) the observed value of the property \(\pi\) for a chemical compound \(G\). As the Phase 1, we solve (I) Prediction Problem with the following three steps. **Phase 1. **  
**Step 1:** Let DB be a set of chemical graphs. For a specified chemical property \(\pi\), choose a class \(\mathcal{G}\) of graphs such as acyclic graphs or monocyclic graphs. Prepare a data set \(D_{\pi}=\{G_{i}\mid i=1,2,\ldots,m\}\subseteq\mathcal{G}\cap\mathrm{DB}\) such that the value \(a(G_{i})\) of each chemical graph \(G_{i}\), \(i=1,2,\ldots,m\) is available. Set reals \(\underline{a},\overline{a}\in\mathbb{R}\) so that \(\underline{a}\leq a(G_{i})\leq\overline{a}\), \(i=1,2,\ldots,m\). See Figure 3 for an illustration of Step 1. **Step 2:** Introduce a feature function \(f:\mathcal{G}\to\mathbb{R}^{k}\) for a positive integer \(k\). We call \(f(G)\) the _feature vector_ of \(G\in\mathcal{G}\), and call each entry of a vector \(f(G)\) a _descriptor_ of \(G\). See Figure 4 for an illustration of Step 2. Figure 3: An illustration of Step 1: A data set \(D_{\pi}\) of chemical graphs \(G_{i}\), \(i=1,2,\ldots,m\) in a class \(\mathcal{G}\) of graphs whose values \(a(G_{i})\in[\underline{a},\overline{a}]\) of a chemical property \(\pi\) are available. **Step 3:** Construct a prediction function \(\psi_{\mathcal{N}}\) with an ANN \(\mathcal{N}\) that, given a vector in \(\mathbb{R}^{k}\), returns a real in the range \([\underline{a},\overline{a}]\) so that \(\psi_{\mathcal{N}}(f(G))\) takes a value nearly equal to \(a(G)\) for many chemical graphs in \(D\). See Figure 5 for an illustration of Step 3. Next we explain how to solve the inverse problem to the prediction in Phase 1 using an MILP formulation. A vector \(x\in\mathbb{R}^{k}\) is called _admissible_ if there is a graph \(G\in\mathcal{G}\) such that \(f(G)=x\)[18]. Let \(\mathcal{A}\) denote the set of admissible vectors \(x\in\mathbb{R}^{k}\). In this paper, we use the range-based method to define an applicability domain (AD) [24] to our inverse QSAR/QSPR. Set \(x_{j}\) and \(\overline{x_{j}}\) to be the minimum and maximum values of the \(j\)-th descriptor \(x_{j}\) in \(f(G_{i})\) over all graphs \(G_{i}\), \(i=1,2,\ldots,m\) (where we possibly normalize some descriptors such as \(\mathrm{ce}^{\infty}_{\mathbf{a}}(G)\), which is normalized with \(\mathrm{ce}^{\infty}_{\mathbf{a}}(G)/n(H)\)). Define our AD \(\mathcal{D}\) to be the set of vectors \(x\in\mathbb{R}^{k}\) such that \(x_{j}\leq x_{j}\leq\overline{x_{j}}\) for the variable \(x_{j}\) of each \(j\)-th descriptor, \(j=1,2,\ldots,k\). As the second phase, we solve (II) Inverse Problem for the inverse QSAR/QSPR by treating the following inference problems. (II-a) Inference of Vectors  
**Input:** A real \(y^{*}\in[\underline{a},\overline{a}]\). **Output:** Vectors \(x^{*}\in\mathcal{A}\cap\mathcal{D}\) and \(g^{*}\in\mathbb{R}^{h}\) such that \(\psi_{\mathcal{N}}(x^{*})=y^{*}\) and \(g^{*}\) forms a chemical graph \(G^{*}\in\mathcal{G}\) with \(f(G^{*})=x^{*}\). (II-b) Inference of Graphs  
**Input:** A vector \(x^{*}\in\mathcal{A}\cap\mathcal{D}\). **Output:** All graphs \(G^{*}\in\mathcal{G}\) such that \(f(G^{*})=x^{*}\). Figure 4: An illustration of Step 2: Each chemical graph \(G\in\mathcal{G}\) is mapped to a vector \(f(G)\) in a feature vector space \(\mathbb{R}^{k}\) for some positive integer \(k\). Figure 5: An illustration of Step 3: A prediction function \(\psi_{\mathcal{N}}\) from the feature vector space \(\mathbb{R}^{k}\) to the range \([\underline{a},\overline{a}]\) is constructed based on an ANN \(\mathcal{N}\). To treat Problem (II-a), we use MILPs for inferring vectors in ANNs [17]. In MILPs, we can easily impose additional linear constraints or fix some variables to specified constants. We include into the MILP a linear constraint such that \(x\in\mathcal{D}\) to obtain the next result.