Border Basis Theory and Implementation¶
The border_basis.py module provides tools for computing border bases of
quotient algebras \(\mathbb{R}[x_1, \dots, x_n] / I\) at a fixed degree.
Border bases offer numerical advantages over Gröbner bases for polynomial
optimization, particularly for moment matrix constructions in SDP hierarchies.
Theory¶
Border Bases vs Gröbner Bases¶
A Gröbner basis of an ideal \(I\) depends on a monomial ordering and produces a unique standard monomial set (the normal form basis). However, the choice of ordering can severely affect numerical conditioning: lexicographic orderings tend to produce large coefficients, while graded reverse lexicographic orderings may include high-degree monomials that inflate matrix dimensions.
A border basis at degree \(d\) works with the vector space \(V_d = \text{span}\{x^\alpha : |\alpha| \leq d\}\) and computes a basis for the quotient \(V_d / (I \cap V_d)\) without fixing a monomial ordering. The key insight is that multiplication by variables maps \(V_d\) into a larger space, and the border \(\partial V_d = \{x_i x^\alpha : |\alpha| = d\}\) encodes how the quotient algebra extends to degree \(d+1\).
Admissible Term Orders and QR Pivot Selection¶
The numerical QR column-pivoting scheme in BorderBasis._compute_basis selects
a monomial basis for the quotient ring \(\mathbb{R}[x_1,\dots,x_n]/I\) by
eliminating monomials whose coefficient columns are linearly dependent on the
ideal generators. To guarantee that this numerical selection recovers the
standard monomial basis of the quotient, the column norm selection rule is
perturbed by a graded term-order weight.
Let \(\prec\) be an admissible term order on the exponent vectors \(\alpha \in \mathbb{N}^n\) (e.g., degree-lexicographic \(\prec_{\text{deglex}}\) or degree-reverse-lexicographic \(\prec_{\text{degrevlex}}\)). Let \(\operatorname{rank}_\prec(\alpha)\) be the position of \(\alpha\) in the ascending enumeration of exponent vectors under \(\prec\) (smaller monomials have lower rank).
Each column in the relation matrix \(R\) is scaled by the weight
where \(\varepsilon \ll 1\) (e.g., \(10^{-12}\)) and \(\|\alpha\|_1 = \sum_i \alpha_i\) is the total degree. The primary factor \(10^{2\|\alpha\|_1}\) ensures that higher-degree monomials pivot first (respecting the graded structure required by border basis theory). The secondary perturbation \(1 + \varepsilon \cdot \operatorname{rank}_\prec(\alpha)\) breaks ties among monomials of the same total degree: the lex-larger monomial (higher \(\operatorname{rank}_\prec\)) receives a slightly larger weight and is selected as a pivot column, eliminating it from the quotient basis. This guarantees that the QR pivoting uniquely recovers the standard monomial basis of \(\mathbb{R}[x_1,\dots,x_n]/I\).
Conditioning Benefits¶
Border bases are known to be better conditioned than Gröbner bases for degrees \(d \\geq 6\) in multivariate settings. This is because:
No monomial ordering bias in the basis itself: The basis adapts to the numerical structure of the generators; the ordering only affects pivot tie-breaking.
Compact representation: Only monomials up to degree \(d\) are considered, avoiding the high-degree terms that Gröbner bases may introduce.
Orthogonalization-friendly: The border basis algorithm uses QR factorization, which preserves numerical stability under perturbation.
For SDP hierarchies in polynomial optimization, this translates to better-conditioned moment matrices and more reliable semidefinite programming solves at higher orders.
Multiplication Tables¶
The border basis representation includes multiplication tables \(M_{x_i}\) that describe how multiplication by each variable acts on the quotient algebra basis. These tables are symmetric when the ideal is zero-dimensional and the quotient admits an inner product structure (as in the moment problem setting).
Specifically, if \(\{b_1, \dots, b_k\}\) is a border basis of \(V_d / (I \cap V_d)\), then for each variable \(x_i\):
The multiplication tables encode the algebra structure of the quotient and can be used to recover roots via joint eigenvalue methods when \(I\) is zero-dimensional.
API Reference¶
BorderBasis Class¶
from Irene.border_basis import BorderBasis
# Construct border basis at degree d for ideal generated by polys g1, ..., gm
bb = BorderBasis(variables=['x', 'y'], generators=[g1, g2], degree=4)
# Access the computed basis
basis = bb.basis # List of monomials in quotient
mult_tables = bb.tables # Multiplication tables M_xi for each variable
The constructor takes:
variables (list[str]): Variable names defining the polynomial ring
generators (list): Polynomial generators of the ideal \(I\) (as SymPy/SymEngine expressions or semigroup algebra elements)
degree (int): The degree bound \(d\) for the border basis computation
The border basis is computed via QR factorization of the generator coefficient matrix restricted to monomials of degree up to \(d\). The resulting basis spans a complement of \(I \cap V_d\) in \(V_d\).
Integration with SDP Hierarchies¶
In the Irene relaxation pipeline, border bases are used to replace the full monomial basis with a numerically stable quotient basis at each order. This reduces moment matrix dimension while preserving the algebraic structure needed for positive semidefinite constraints.
The RelaxationEngine automatically uses border basis reduction when configured:
from Irene.relaxations import RelaxationConfig
from Irene.relaxation_api import RelaxationEngine
config = RelaxationConfig(
reduction_method="border_basis",
monomial_pruning=True,
)
engine = RelaxationEngine(prog, order=3, config=config)
result = engine.solve("sos")
Selecting the Quotient-Basis Reduction Engine¶
The quotient-basis option (added 2026-08-09) lets users choose which engine
performs the quotient-ring reduction inside SDPRelaxations:
quotient_basis="groebner"(default) — classical SymPy Groebner-basis reduction viasp.reduced, matching original Irene.quotient_basis="border"— Irene’sBorderBasisquotient-algebra reduction via multiplication tables (ReduceExpandReducedMonomialBaseboth use it).
config = RelaxationConfig(quotient_basis="border") # or "groebner"
rlx = SDPRelaxations([x, y], relations=[x**2 + y**2 - 1], config=config)
The environment variable IRENE_QUOTIENT_BASIS=groebner|border sets the
default when no config is passed (useful for benchmark matrices).
Numerical fix (2026-08-09): the QR column-pivot selection used in
BorderBasis._compute_basis previously resolved same-degree ties by column
order, which could keep the generator’s own leading monomial in the basis
(e.g. \(y^2\) instead of \(x^2\) for \(\\langle x^2+y^2-1\\rangle\),
whose lex leading monomial is \(x^2\)), producing a wrong quotient basis.
Column weights now carry a tiny ascending-lex tie-break so the lex-larger
monomial pivots first, consistent with the monomial order used during
reduction. All test ideals verify against the theoretical standard monomials.
Practical Notes¶
Border bases are most beneficial for multivariate problems at degree $geqslant 6$, where Gröbner basis conditioning degrades significantly.
The multiplication tables can be used to extract moment vectors from the dual SDP solution via eigenvalue methods.
For zero-dimensional ideals, the border basis size equals the number of complex roots (counting multiplicity), providing a dimension check.
The border basis is computed numerically (QR + floating-point reduction);
reduce()returns float coefficients. Usequotient_basis="groebner"when exact rational arithmetic is required.
References¶
Möller, H. M. & Trager, B. M. (1987). “A new approach to polynomial system solution.” ISSAC ‘87.
Kehrein, A., Kreuzer, M., & Robbiano, L. (2005). “An algebraist’s view on border bases.” In Solving Polynomial Equations: Foundations, Algorithms, and Applications, Algorithms and Computation in Mathematics 14, Springer, 169–202. DOI: 10.1007/3-540-27357-3_4.
Kehrein, A. & Kreuzer, M. (2006). “Computing border bases.” Journal of Pure and Applied Algebra, 205(2), 279–295. DOI: 10.1016/j.jpaa.2005.07.006.
A consolidated bibliography, including the moment-SOS and SONC literature the other chapters rest on, is in References.