Diverse M-Best Solutions by Dynamic Programming

  • Carsten Haubold
  • Virginie Uhlmann
  • Michael Unser
  • Fred A. HamprechtEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10496)


Many computer vision pipelines involve dynamic programming primitives such as finding a shortest path or the minimum energy solution in a tree-shaped probabilistic graphical model. In such cases, extracting not merely the best, but the set of M-best solutions is useful to generate a rich collection of candidate proposals that can be used in downstream processing. In this work, we show how M-best solutions of tree-shaped graphical models can be obtained by dynamic programming on a special graph with M layers. The proposed multi-layer concept is optimal for searching M-best solutions, and so flexible that it can also approximate M-best diverse solutions. We illustrate the usefulness with applications to object detection, panorama stitching and centerline extraction.



This work was partially supported by the HGS MathComp Graduate School, DFG grant HA 4364/9-1, SFB 1129 for integrative analysis of pathogen replication and spread, and the Swiss National Science Foundation under Grant 200020_162343/1.

Supplementary material

440987_1_En_21_MOESM1_ESM.pdf (2.7 mb)
Supplementary material 1 (pdf 2778 KB)


  1. 1.
    Arteta, C., Lempitsky, V., Noble, J.A., Zisserman, A.: Learning to detect partially overlapping instances. In: Proceedings of the IEEE Conference on Computer Vision And Pattern Recognition (CVPR 2013), Portland, OR, USA, 25–27 June 2013, pp. 3230–3237 (2013)Google Scholar
  2. 2.
    Batra, D., Yadollahpour, P., Guzman-Rivera, A., Shakhnarovich, G.: Diverse M-best solutions in Markov random fields. In: Fitzgibbon, A., Lazebnik, S., Perona, P., Sato, Y., Schmid, C. (eds.) ECCV 2012. LNCS, vol. 7576, pp. 1–16. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-33715-4_1 CrossRefGoogle Scholar
  3. 3.
    Batra, D.: An efficient message-passing algorithm for the M-best map problem. In: Proceedings of the 28th Conference on Uncertainty in Artificial Intelligence (UAI 2012) (2012)Google Scholar
  4. 4.
    Bellman, R.: On the theory of dynamic programming. Proc. Nat. Acad. Sci. 38(8), 716–719 (1952)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Chen, C., Liu, H., Metaxas, D., Zhao, T.: Mode estimation for high dimensional discrete tree graphical models. In: Advances in Neural Information Processing Systems (NIPS 2014), Montréal, Canada, 8–13 December 2014, pp. 1323–1331 (2014)Google Scholar
  6. 6.
    Chen, C., Kolmogorov, V., Zhu, Y., Metaxas, D.N., Lampert, C.H.: Computing the M most probable modes of a graphical model. In: AISTATS, pp. 161–169 (2013)Google Scholar
  7. 7.
    Dijkstra, E.: A note on two problems in connexion with graphs. Numer. Math. 1(1), 269–271 (1959)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Eppstein, D.: Finding the k shortest paths. SIAM J. Comput. 28(2), 652–673 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Flerova, N., Rollon, E., Dechter, R.: Bucket and mini-bucket schemes for M Best solutions over graphical models. In: Croitoru, M., Rudolph, S., Wilson, N., Howse, J., Corby, O. (eds.) GKR 2011. LNCS, vol. 7205, pp. 91–118. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-29449-5_4 CrossRefGoogle Scholar
  10. 10.
    Fromer, M., Globerson, A.: An LP view of the M-best MAP problem. In: Advances in Neural Information Processing Systems, pp. 567–575 (2009)Google Scholar
  11. 11.
    Fujita, Y., Nakamura, Y., Shiller, Z.: Dual Dijkstra search for paths with different topologies. In: Proceedings of the IEEE International Conference on Robotics and Automation (ICRA 2003), vol. 3, Taipei, Taiwan, 14–19 September 2003, pp. 3359–3364 (2003)Google Scholar
  12. 12.
    Held, M., Schmitz, M., Fischer, B., Walter, T., Neumann, B., Olma, M., Peter, M., Ellenberg, J., Gerlich, D.: Cellcognition: time-resolved phenotype annotation in high-throughput live cell imaging. Nat. Methods 7(9), 747–754 (2010)CrossRefGoogle Scholar
  13. 13.
    Jug, F., Pietzsch, T., Kainmüller, D., Funke, J., Kaiser, M., van Nimwegen, E., Rother, C., Myers, G.: Optimal joint segmentation and tracking of Escherichia coli in the mother machine. In: Proceedings of the First International Workshop on Bayesian and grAphical Models for Biomedical Imaging (BAMBI 2014), Cambridge, MA, USA, 18 September 2014, pp. 25–36 (2014)Google Scholar
  14. 14.
    Kirillov, A., Savchynskyy, B., Schlesinger, D., Vetrov, D., Rother, C.: Inferring M-best diverse labelings in a single one. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV 2015), Santiago, Chile, 13–16 December 2015, pp. 1814–1822 (2015)Google Scholar
  15. 15.
    Koller, D., Friedman, N.: Probabilistic Graphical Models: Principles and Techniques. MIT Press, Cambridge (2009)zbMATHGoogle Scholar
  16. 16.
    Lampert, C.H.: Maximum margin multi-label structured prediction. In: Advances in Neural Information Processing Systems, pp. 289–297 (2011)Google Scholar
  17. 17.
    Lawler, E.: A procedure for computing the k best solutions to discrete optimization problems and its application to the shortest path problem. Manag. Sci. 18(7), 401–405 (1972)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Milan, A., Schindler, K., Roth, S.: Detection-and trajectory-level exclusion in multiple object tracking. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3682–3689 (2013)Google Scholar
  19. 19.
    Nilsson, D.: An efficient algorithm for finding the m most probable configurationsin probabilistic expert systems. Stat. Comput. 8(2), 159–173 (1998)MathSciNetCrossRefGoogle Scholar
  20. 20.
    Papandreou, G., Yuille, A.L.: Perturb-and-map random fields: using discrete optimization to learn and sample from energy models. In: 2011 International Conference on Computer Vision, pp. 193–200. IEEE (2011)Google Scholar
  21. 21.
    Pearl, J.: Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann, Burlington (1988)zbMATHGoogle Scholar
  22. 22.
    Prasad, A., Jegelka, S., Batra, D.: Submodular meets structured: finding diverse subsets in exponentially-large structured item sets. In: Advances in Neural Information Processing Systems (NIPS 2014), Montréal, Canada, 8–13 December 2014, pp. 2645–2653 (2014)Google Scholar
  23. 23.
    Rollon, E., Flerova, N., Dechter, R.: Inference schemes for M best solutions for soft CSPs. In: Proceedings of the Seventh International Workshop on Preferences and Soft Constraints, vol. 2. Sitges, Spain, 1 October 2011Google Scholar
  24. 24.
    Schiegg, M., Hanslovsky, P., Haubold, C., Koethe, U., Hufnagel, L., Hamprecht, F.: Graphical model for joint segmentation and tracking of multiple dividing cells. Bioinformatics 31(6), 948–956 (2015)CrossRefGoogle Scholar
  25. 25.
    Schlesinger, M.I., Hlavác, V.: Ten Lectures on Statistical and Structural Pattern Recognition, vol. 24. Springer Science & Business Media, New York (2013)zbMATHGoogle Scholar
  26. 26.
    Seroussi, B., Golmard, J.L.: An algorithm directly finding the k most probable configurations in Bayesian networks. Int. J. Approx. Reason. 11(3), 205–233 (1994)CrossRefGoogle Scholar
  27. 27.
    Summa, B., Tierny, J., Pascucci, V.: Panorama weaving: fast and flexible seam processing. ACM Trans. Graph. 31(4), 83:1–83:11 (2012)CrossRefGoogle Scholar
  28. 28.
    Yadollahpour, P., Batra, D., Shakhnarovich, G.: Discriminative re-ranking of diverse segmentations. In: The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2013Google Scholar
  29. 29.
    Yanover, C., Weiss, Y.: Finding the m most probable configurations using loopy belief propagation. In: Advances in Neural Information Processing Systems, vol. 16, p. 289 (2004)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Carsten Haubold
    • 1
  • Virginie Uhlmann
    • 2
  • Michael Unser
    • 2
  • Fred A. Hamprecht
    • 1
    Email author
  1. 1.IWR/HCIUniversity of HeidelbergHeidelbergGermany
  2. 2.BIGÉcole Polytechnique Fédérale de Lausanne (EPFL)LausanneSwitzerland

Personalised recommendations