Mapping Probabilities to Additive Costs for Graph Optimization

38 concepts32 papers2 proposals

Computer science is fundamentally divided into two algorithmic landscapes: the additive world of paths and costs, and the multiplicative world of probabilities and uncertainties.

In the additive world, classical algorithms like Dijkstra’s, $A^*$, and Linear Programming find optimal sequences of actions by summing up edge weights ($\sum c_i$). In the multiplicative world, evaluating a sequence of independent events—such as a robot surviving a hazardous route, a packet successfully traversing a noisy network, or a plan succeeding without failure—requires multiplying probabilities ($\prod p_i$).

This mismatch creates a significant engineering challenge: how can we leverage highly optimized, classical optimization solvers to solve inherently probabilistic problems? The answer lies in a simple yet profound mathematical bridge: the logarithmic cost transformation.

The Mechanics of the Logarithmic Bridge

To understand why this transformation works, consider the goal of maximizing the joint probability of a sequence of independent, successful steps:

$$\max \prod_{i} p_i$$

Because the logarithm is a strictly monotonically increasing function, maximizing a value is mathematically equivalent to maximizing its logarithm. Applying a logarithm turns the product into a sum:

$$\max \log \left( \prod_{i} p_i \right) = \max \sum_{i} \log p_i$$

Since probabilities lie in the interval $[0, 1]$, their logarithms are negative numbers. To align this with standard minimization frameworks (which most shortest-path and linear programming solvers expect), we multiply the objective by $-1$ and flip the optimization direction:

$$\min \sum_{i} -\log p_i$$

By defining a new, virtual edge cost as $c_i = -\log p_i$, we map the multiplicative domain into an additive one. As demonstrated by Yisroel Mirsky et al. in Search Problems in the Domain of Multiplication: Case Study on Anomaly Detection Using Markov Chains, this mapping preserves the exact monotonicity of the search space. The optimal path in the cost-space remains the optimal path in the probability-space, allowing standard pathfinding infrastructure to operate seamlessly over probabilistic domains.


Unifying Graph Search and Pathfinding

In real-world networks, routing under uncertainty is a pervasive problem. By transforming probabilities into log-space, complex chance constraints are converted into standard travel budgets.

For instance, in quantum communication, links suffer from operational noise, and the goal is to find a route that maximizes the overall transmission fidelity. As shown by Xuchuang Wang et al. in Learning Best Paths in Quantum Networks, mapping multiplicative noise parameters to additive weights via negative logarithms allows standard graph search algorithms to efficiently discover the highest-fidelity route.

A similar challenge appears in risk-aware robotic routing. Stefan Jorgensen et al. convert multiplicative survival probabilities along a path into log-space additive weights in The Team Surviving Orienteers Problem: Routing Robots in Uncertain Environments with Survival Constraints. This transformation allows a minimum survival probability constraint to be treated as a standard travel budget, enabling the deployment of highly optimized orienteering solvers without rewriting their underlying optimization routines.

Multiplicative Space:  Path Success = p1 * p2 * p3 * p4  (Hard to optimize)
                             │
                     [ -log(p) Transformation ]
                             ▼
Additive Cost Space:   Total Cost   = c1 + c2 + c3 + c4  (Solvable via Dijkstra/A*)

This paradigm applies across a wide variety of network architectures:


From Probabilistic Inference to Linear Programming

The utility of the log-transformation extends beyond graph traversals; it serves as a foundational tool for structuring complex probabilistic inference as combinatorial optimization. A classic example is Maximum A Posteriori (MAP) estimation in Bayesian networks.

In seminal work, Eugene Charniak et al. provided a rigorous mathematical foundation for cost-based abduction in Probabilistic Semantics for Cost Based Abduction. The authors proved that minimizing heuristic costs is equivalent to finding a MAP assignment, provided those costs are defined as negative log-probabilities.

Building on this, Solomon Eyal Shimony et al. in A new algorithm for finding MAP assignments to belief networks transformed belief networks into weighted boolean-function directed acyclic graphs (WBFDAGs). By deriving edge costs from the negative logarithm of probabilities, the authors ensured that minimizing the total cost in the graph directly maximized the joint probability of an assignment in the belief network.

Once a probabilistic problem is mapped into an additive cost structure, it unlocks the power of mathematical programming. Eugene Charniak et al. accelerated abductive reasoning in Dynamic MAP Calculations for Abduction by compiling the log-transformed cost network into a 0-1 linear programming problem, converting an exponential-time search into a highly efficient polynomial-time Simplex optimization.

This exact paradigm remains vital in modern cybersecurity. Mingyu Guo et al. apply logarithmic transformations to the success probabilities of multi-step cyberattack paths in Scalable Edge Blocking Algorithms for Defending Active Directory Style Attack Graphs. This converts a highly non-linear security optimization problem into linear sums, allowing defenders to use standard mixed-integer programming to implement probabilistic edge blocking at scale.


Bridging Learning and Classical Planning

Modern artificial intelligence frequently leverages this transformation to combine the statistical power of machine learning with the rigorous guarantees of classical planners. When a neural network or a statistical model outputs a probability distribution over actions, a symbolic planner can evaluate a sequence of choices by summing their log-transformed costs.

In chemical synthesis planning, Akihiro Kishimoto et al. develop this approach in Depth-First Proof-Number Search with Heuristic Edge Cost and Application to Chemical Synthesis Planning. By converting the probabilistic outputs of a neural network into additive search costs via a negative logarithmic transformation, their search algorithm evaluates the cumulative likelihood of a multi-step chemical reaction pathway simply by summing individual edge costs, prioritizing reaction sequences with the highest joint probability.

Similarly, in vehicle routing problems where human preferences are implicit, Rocsildes Canoy et al. extract transition probabilities from historical data and convert them into a cost matrix using negative log-likelihoods in Learn and route: learning implicit preferences for vehicle routing. This solver-agnostic approach allows standard optimization infrastructure to natively optimize for subjective expert behavior.

┌────────────────────────┐      Probabilities      ┌────────────────────────┐
│  Statistical Model /   │────────────────────────>│  Logarithmic Mapping   │
│     Neural Network     │                         │    c = -log(p)         │
└────────────────────────┘                         └────────────────────────┘
                                                               │
                                                               │ Additive Costs
                                                               ▼
                                                   ┌────────────────────────┐
                                                   │   Classical Planner /  │
                                                   │   Optimization Solver  │
                                                   └────────────────────────┘

In reinforcement learning and control, this mapping simplifies complex stochastic objectives across several domains:

  • Compositional Tasks: In Compositional Reinforcement Learning from Logical Specifications, Kishor Jothimurugan et al. set the transition costs between high-level subgoals as the negative log-probability of low-level policy success, enabling a Dijkstra-style search to find the path that maximizes the overall likelihood of satisfying a complex logical specification.
  • Covert Communication: Han-Bae Kong et al. convert multiplicative detection error probabilities into additive costs in Decentralized Covert Routing in Heterogeneous Networks Using Reinforcement Learning, allowing decentralized reinforcement learning agents to minimize cumulative detection risks using standard summation-based cost functions.
  • Stochastic Termination: In Adaptive Cascade Submodular Maximization, Shaojie Tang et al. map continuation probabilities to a virtual cost using a negative logarithmic transformation. This converts a sequential probability problem into a budget-constrained optimization that balances the immediate gains of an item against the risk of premature session termination.

Why the Transformation Works

The enduring relevance of the logarithmic cost transformation across decades of research stems from three core advantages:

  1. Preservation of Order (Monotonicity): Because the logarithm is strictly increasing, if path $A$ is more probable than path $B$, the log-transformed cost of path $A$ will always be lower than that of path $B$. The underlying physics of the problem remain unchanged; only the representation shifts.
  2. Numerical Stability: Multiplying thousands of small probabilities quickly leads to arithmetic underflow, where numbers become too small for computers to accurately represent. Summing their logarithms converts these tiny fractions into manageable negative numbers, preserving numerical precision over long sequences.
  3. Algorithmic Reuse: The computer science community has spent over half a century optimizing algorithms that sum costs (such as Dijkstra, $A^*$, Mixed-Integer Linear Programming, and Value Iteration). Rewriting the representation of a probabilistic problem to match these tools is vastly more efficient than inventing entirely new, multiplicative optimization subroutines from scratch.

Key Foundational Work

A new algorithm for finding MAP assignments to belief networks (1990) — contributed 2 concept elements to this direction.
Probabilistic Semantics for Cost Based Abduction (1990) — contributed 1 concept elements to this direction.
Dynamic MAP Calculations for Abduction (1992) — contributed 1 concept elements to this direction.
History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 29 papers
  2. Version 1 · 2026-10-04 · 39 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_logarithmic_cost_transformation_5c7296f8,
  title = {logarithmic cost transformation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/logarithmic-cost-transformation/rdr_5c7296f8097a417e930d853d69bb3aca},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 2, frozen text):

@misc{lacuna_logarithmic_cost_transformation_5c7296f8_v2,
  title = {logarithmic cost transformation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/logarithmic-cost-transformation/rdr_5c7296f8097a417e930d853d69bb3aca/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-23},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake