Skip to content

Use of "lagrange multiplier" terminology #1009

Open
@mcfarljm

Description

@mcfarljm

The term Lagrange multiplier is used throughout the code, documentation, and API's. Suggest reviewing whether this is the most appropriate terminology. My understanding is that when we encode constraints in the BQM, we are using a penalty formulation, which is not the same as formulating the Lagrangian function (which is a function of both the decision variables and the Lagrange parameter, lambda). If so, "penalty strength" or simply "strength" may be more appropriate terminology for code and documentation.

Good overview of the differences here: https://math.stackexchange.com/questions/2585712/merit-function-vs-largrange-functions-vs-penalty-funcitons.

See also https://arxiv.org/ftp/arxiv/papers/1811/1811.11538.pdf, page 34:

The general procedure of Transformation #1 [standard approach for encoding constraints] has similarities to the Lagrange Multiplier approach of classical optimization. The key difference is that our scalar penalties (P) are not “dual” variables to be determined by the optimization. Rather, they are parameters set a priori to encourage the search process to avoid candidate solutions that are infeasible.

The Lagrange multiplier usage currently appears in a variety of places in the dimod source, including in some public-facing API functions, e.g.:

def add_linear_equality_constraint(
self, terms: Iterable[Tuple[Variable, Bias]],
lagrange_multiplier: Bias, constant: Bias):

dimod/dimod/constrained.py

Lines 1167 to 1168 in 96928a6

def cqm_to_bqm(cqm: ConstrainedQuadraticModel, lagrange_multiplier: Optional[Bias] = None,
) -> Tuple[BinaryQuadraticModel, CQMToBQMInverter]:

By contrast, there are also a couple of places where strength is used instead of lagrange_multiplier, e.g.:
def make_quadratic(poly, strength, vartype=None, bqm=None):

Use of the Lagrange multiplier terminology is also prevalent in dwave-networkx (I'm happy to create a separate issue there as well, if desired), and I think some of the dwave-examples as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion or general discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions