An optimization-based network inference approach was developed and applied to in silico metabolome data of Escherichia coli and Saccharomyces cerevisiae. The steady-state metabolome data used were generated in silico by simulating kinetic models belonging to the investigated microorganisms. Lyapunov equation, which puts a link between Jacobian matrix of the system and the covariance matrix is the basis for the optimization based approach. Data-derived covariance matrix is the input to the underdetermined Lyapunov equation, which is used for the prediction of Jacobian matrix based on an objective function. Taking into account the sparsity of biological networks as cellular objective, a consistent mathematical objective function was chosen. Inference of the underlying metabolic network was performed based on a genetic-algorithm formulation. The approach results in promising inference of the metabolic networks in question. Sensitivity of the results to the approach is also investigated.