Conversation
… color codes in about 5 mins / shot without any beam cutoffs whatsoever using operator cost partitioning approach to improve over detcosts with naive LP implementation.
…ow_supports / rhs vectors before simplex solves.
- Reused a single local_hits buffer while building deduplicated active supports.
- Removed an unnecessary sort of local_hits; the local detector order was already stable.
- Reused a monotone warm-start cursor when reading detector budgets from the parent exact solution, instead of restarting the search for every
component.
… search behavior on the full 100-shot benchmark.
Kept changes:
- Avoid rebuilding detector parity from the full error chain on pop by caching each node’s residual detector bitset.
- Speed up exact-refinement LP setup by reusing buffers, avoiding unnecessary temporary row/rhs copies, removing an unnecessary local-hit sort, and using
a monotone warm-start cursor when pulling detector budgets from the parent exact solution.
- Replace full-error scans during component construction with candidate-error gathering from the active detectors’ incidence lists.
- Simplify union-find component assignment by mapping roots directly to component indices.
- Add detailed FTL timing/stat counters for chain replay, component build, simplex, projection, and component-build subphases to guide further
optimization.
…olicy order, fewest_incident_errors, --error-order-policy, --root-det-order-count, --root-det-order-depth, --exact-child-refine-count
… terms into “surviving” and “retiring” terms at layer compile time, then dispatching each layer to a templated fast path that skips retiring-detector validity checks entirely when that layer doesn’t need them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An LP relaxation of the decoding problem is:
minimize \sum_e w_e x_e
such that for all activated detectors d: sum_{e incident to d} x_e >= 1.
The detcost is a specific feasible solution to the dual LP. This is:
maximize \sum_{activated detectors d, errors e} a_d
such that for all errors e: \sum_{activated d incident to e} a_d <= w_e.
The detcost feasible point provides an admissible lower bound that is fast to compute and fast to incrementally update, while still generally predictive. However it is suboptimal and we can consider using better solutions to the dual LP to derive tighter lower bounds on remaining cost.
One issue with many LP relaxations is they have one variable per error mechanism. These LPs are prohibitively expensive to solve naively since our error models have 100s of errors per detector. However, it can be seen that the dual LP above only cares about the distinct overlap sets of errors with the activated detector set. This makes it more lightweight to solve in practice. Using this technique along with some lazy evaluation tricks, we can decode 1000 shots of the gross code in about 2000s, with an effectively infinite beam, with only 1 low-confidence outcome:
I'm not sure whether it is genuinely faster than Tesseract but I thought it was interesting to be able to decode the Gross code without heuristic cutoffs, ensembling, or beams.
There are related ideas in these papers, with the general idea being called 'operator cost partitioning':
https://cdn.aaai.org/ICAPS/2008/ICAPS08-022.pdf
https://arxiv.org/pdf/1401.3853
https://cdn.aaai.org/ojs/9668/9668-13-13196-1-2-20201228.pdf