# Canonical Tropical Segment State

- ID: 152
- Canonical URL: https://synthcore.org/idea/152/canonical-tropical-segment-state
- API JSON: https://synthcore.org/api/idea/152.json
- API Markdown: https://synthcore.org/api/idea/152.md
- Verification status: mechanism_failed
- Source: [arXiv:2608.25034](https://arxiv.org/abs/2608.25034)
- Category: architecture
- Solves: generalization, scalability, accuracy
- ML areas: graph-nn, rnn, mlp, training-dynamics
- Math tags: tropical-geometry, polyhedral-geometry, convex-analysis, graph-theory
- Ratings: usefulness 7/10; difficulty 7/10; novelty 8/10

## Idea description

Build a sequence or graph module whose state is a canonical set of affine tropical pieces rather than an opaque hidden vector. Compose consecutive segments by Minkowski addition of their lifted supports, merge alternatives by union followed by lower-hull reduction, and evaluate the resulting piecewise-linear function with a minimum.

## Mathematical statement

For a two-terminal DAG \(G\), the path polynomial is \(f_G(x)=\min_{\pi:s\to z}\sum_{e\in\pi}w_e(x)\), where \(s\) and \(z\) are the source and sink and each path contributes an affine or parameterized edge-weight sum. In lifted coordinates, each path is represented by \((\alpha_\pi,c_\pi)\), and \(f(x)=\min_{(\alpha,c)\in S'}(c+\langle\alpha,x\rangle)\). Series composition identifies terminals and satisfies \(f_{A;B}=f_A+f_B\); its lifted support is the Minkowski sum \(S'_{A;B}=S'_A+S'_B=\{(\alpha_A+\alpha_B,c_A+c_B)\}\). Parallel composition satisfies \(f_{A\|B}=\min(f_A,f_B)\); its support is the union \(S'_A\cup S'_B\), followed by removal of points that are not lower-hull relevant. The canonical extended Newton polyhedron is \(\Gamma(f)=\operatorname{conv}(S')+\mathbb{R}_{\geq0}e_{d+1}\), and equal polyhedra represent equal computed functions. The decision boundary is the tropical hypersurface \(\mathcal{T}(f)=\{x:\text{the minimum is attained by at least two pieces}\}\).

## Key formulas

- $$f_G(x)=\bigoplus_{\pi:s\to z}\bigodot_{e\in\pi}w_e=\min_{\pi:s\to z}\sum_{e\in\pi}w_e$$
- $$f_{A;B}=f_A\odot f_B=f_A+f_B$$
- $$S'_{A;B}=S'_A+S'_B=\{(\alpha_A+\alpha_B,c_A+c_B)\}$$
- $$f_{A\|B}=f_A\oplus f_B=\min(f_A,f_B),\qquad \mathcal{T}(f)=\{x:\text{the minimum in }f(x)\text{ is attained by }\geq2\text{ pieces}\}$$

## Implementation notes

Implement a compact tropical segment state containing a support tensor of pairs (alpha, c), with alpha in R^d and c in R. A token or local graph edge emits a small state, such as one to four affine pieces from an MLP. For each new sequence position, perform series composition by forming pairwise sums: alpha_new[p,q] = alpha_old[p] + alpha_token[q] and c_new[p,q] = c_old[p] + c_token[q]. For branching alternatives, concatenate supports from the branches, which implements parallel composition. Canonicalize after every composition: merge duplicate alpha vectors by retaining the smallest c, then remove candidates failing the lower-hull feasibility test from the first idea. Evaluate the state on features x as output = min_p(c_p + dot(alpha_p,x)). During early training, optionally replace min with softmin at temperature tau and anneal tau toward zero; use subgradients or a straight-through rule at ties. The paper determines the composition laws and canonical geometric representation; support-size thresholds, LP tolerances, and temperature schedules are empirical. First test on subset-sum and DAG shortest-path tasks, training on lengths 8-16 and evaluating at lengths 32-64. Compare an LSTM, Transformer, ordinary min-plus recurrence, and the proposed state at equal parameter budgets. Track extrapolation accuracy, decision-boundary disagreement on sampled x, support size, and runtime. The target signal is slower error growth when sequence length doubles, with bounded support size and improved length-64 accuracy.

## Verification

- Status: mechanism_failed
- Mechanism evidence: yes
- Mechanism confirmed: no
- Verdict: Built a readable TropicalState module implementing Minkowski-sum series composition, union/parallel composition, duplicate merging, lower-hull feasibility reduction, and min evaluation. Random numerical checks showed zero sampled envelope error and series-identity error below 1e-14; support fell from 256/4096/65536 to 37/79/137 for lengths 8/12/16. The effect is real as a representation-size reduction, but the MVP's LP canonicalization took 0.54/1.86/5.22 seconds versus 0.00023/0.00094/0.0093 seconds for naive enumeration, so it does not yet demonstrate an end-to-end win.

### Mechanism check

- Verdict: Built a readable TropicalState module implementing Minkowski-sum series composition, union/parallel composition, duplicate merging, lower-hull feasibility reduction, and min evaluation. Random numerical checks showed zero sampled envelope error and series-identity error below 1e-14; support fell from 256/4096/65536 to 37/79/137 for lengths 8/12/16. The effect is real as a representation-size reduction, but the MVP's LP canonicalization took 0.54/1.86/5.22 seconds versus 0.00023/0.00094/0.0093 seconds for naive enumeration, so it does not yet demonstrate an end-to-end win.
- Confidence: 9/10
- Limitations: No learned sequence model, LSTM/Transformer baseline, GPU implementation, training experiment, or lengths beyond 16 were tested. Envelope equivalence was sampled numerically, and the LP reducer uses scipy rather than an optimized hull algorithm.

## Artifacts

- [report.md](https://synthcore.org/code/69/report.md)
- [results.json](https://synthcore.org/code/69/results.json)
- [tropical_state.py](https://synthcore.org/code/69/tropical_state.py)
- [verify_and_benchmark.py](https://synthcore.org/code/69/verify_and_benchmark.py)
- [Download all files as ZIP](https://synthcore.org/download/69)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
