  Entanglement, a critical resource for quantum information processing, needs
to be witnessed in many practical scenarios. Theoretically, witnessing
entanglement is by measuring a special Hermitian observable, called
entanglement witness (EW), which has non-negative expected outcomes for all
separable states but can have negative expectations for certain entangled
states. In practice, an EW implementation may suffer from two problems. The
first one is \emph{reliability}. Due to unreliable realization devices, a
separable state could be falsely identified as an entangled one. The second
problem relates to \emph{robustness}. A witness may not to optimal for a target
state and fail to identify its entanglement. To overcome the reliability
problem, we employ a recently proposed measurement-device-independent
entanglement witness, in which the correctness of the conclusion is independent
of the implemented measurement devices. In order to overcome the robustness
problem, we optimize the EW to draw a better conclusion given certain
experimental data. With the proposed EW scheme, where only data postprocessing
needs to be modified comparing to the original measurement-device-independent
scheme, one can efficiently take advantage of the measurement results to
maximally draw reliable conclusions.
