Skip to content

Added metabolic polytope simplification - #499

Open
DimitriosPavlouGR wants to merge 3 commits into
GeomScale:developfrom
DimitriosPavlouGR:simplification
Open

Added metabolic polytope simplification#499
DimitriosPavlouGR wants to merge 3 commits into
GeomScale:developfrom
DimitriosPavlouGR:simplification

Conversation

@DimitriosPavlouGR

Copy link
Copy Markdown

Metabolic polytope simplification

Adds redundancy removal and dimension fixing for metabolic polytopes, with two methods: an exhaustive one that tests every bound against the full constraint set, and a Clarkson like output-sensitive method that keeps each LP as small as the essential set found so far.

Additions

  • metabolic_polytope.hpp - a representation for {x : A_eq x = b_eq, b_l <= x <= b_u}
  • bigg_parser.hpp - reads BiGG models from JSON
  • exhaustive_simplification.hpp - tests each bound by relaxing it and solving up to four LPs
  • clarkson_simplification.hpp - Clarkson's method, starts with every bound relaxed and iteratively adds constraints to the essential set
  • transformation.hpp - projects onto the affine hull, giving a full dimensional equivalent H-Polytope representation
  • test/metabolic/* - unit tests and benchmarks for both methods
  • examples/metabolic_simplification - example of parsing a BiGG model, simplifying and transforming it to quickly approximate its volume

Results

19 BiGG models, dimension fixing enabled. Compared against PolyRound (Gurobi) with matching settings (1e-7 tolerance)

Bounds relaxed: agree closely across all three implementations - identical on 11 of 19 models.

Dimension fixing: counts differ substantially because the two implementations test different things compared to PolyRound. PolyRound looks for inequality rows of zero width, while these implementations solve a max/min LP pair per variable against the equality system.

Runtime: Clarkson implementation is 2.7x faster than the exhaustive method and 3.1x faster than PolyRound on the set of tested instances.

Bounds relaxed

Model n m bounds PolyRound exhaustive Clarkson
e_coli_core 95 72 190 154 154 154
iNF517 754 650 1508 1309 1309 1309
iAT_PLT_636 1008 738 2016 1423 1422 1423
iSynCJ816 1044 928 2088 1864 1944 1865
iJN746 1054 907 2108 1884 1633 1863
iAM_Pc455 1074 907 2148 1758 1744 1748
iEK1008 1226 998 2452 2161 2160 2152
iCN900 1229 885 2458 2317 2317 2317
iYO844 1250 990 2500 2278 2278 2278
iND750 1266 1059 2532 2259 2259 2244
iPC815 1961 1552 3922 3481 3481 3481
iRC1080 2191 1706 4382 3457 3457 3455
iECED1_1282 2706 1929 5412 4622 4618 4530
iEC042_1314 2714 1926 5428 4640 4640 4639
iECIAI39_1322 2721 1953 5442 4668 4668 4668
iECSF_1327 2742 1951 5484 4658 4658 4657
iECBD_1354 2748 1952 5496 4708 4708 4704
iEcolC_1368 2768 1969 5536 4740 4740 4736
RECON1 3741 2766 7482 5362 5004 5111

Dimensions fixed

Model PolyRound exhaustive Clarkson
e_coli_core 4 8 8
iNF517 50 241 241
iAT_PLT_636 0 0 0
iSynCJ816 37 460 263
iJN746 66 347 402
iAM_Pc455 13 223 223
iEK1008 53 333 333
iCN900 266 926 926
iYO844 125 594 582
iND750 104 635 635
iPC815 132 896 896
iRC1080 72 622 622
iECED1_1282 236 1062 1062
iEC042_1314 243 1070 1070
iECIAI39_1322 257 1152 1152
iECSF_1327 234 999 999
iECBD_1354 258 1097 1097
iEcolC_1368 257 1115 1115
RECON1 136 1272 1191

Runtime (seconds)

Model PolyRound exhaustive Clarkson vs exhaustive vs PolyRound
e_coli_core 0.358 0.054 0.030 1.8× 11.9×
iNF517 6.605 3.417 1.285 2.7× 5.1×
iAT_PLT_636 12.944 6.096 3.584 1.7× 3.6×
iSynCJ816 12.622 6.466 3.582 1.8× 3.5×
iJN746 9.680 8.883 5.865 1.5× 1.7×
iAM_Pc455 12.040 38.696 6.451 6.0× 1.9×
iEK1008 14.587 11.392 4.199 2.7× 3.5×
iCN900 14.498 5.101 2.240 2.3× 6.5×
iYO844 12.817 14.591 17.695 0.8× 0.7×
iND750 15.917 30.207 5.143 5.9× 3.1×
iPC815 28.685 17.418 9.021 1.9× 3.2×
iRC1080 48.612 64.885 28.750 2.3× 1.7×
iECED1_1282 62.152 201.296 20.105 10.0× 3.1×
iEC042_1314 58.337 62.210 18.685 3.3× 3.1×
iECIAI39_1322 61.671 76.595 18.818 4.1× 3.3×
iECSF_1327 63.685 72.860 23.426 3.1× 2.7×
iECBD_1354 70.345 61.653 20.663 3.0× 3.4×
iEcolC_1368 63.408 73.278 19.958 3.7× 3.2×
RECON1 159.775 207.606 214.521 1.0× 0.7×

Example

examples/metabolic_simplification runs the full pipeline on a BiGG model:

./metabolic_simplification e_coli_core.json
input polytope
 reactions     : 95
 metabolites   : 72
 finite bounds : 190

clarkson: starting simplification on polytope with 95 reactions, 72 metabolites, and 190 finite bounds
clarkson: fixed 8 dimensions
clarkson: interior LP optimal, slack objective = 0.58199
clarkson: simplification finished, fixed 8 dimensions, relaxed 154 bounds

simplified polytope
 finite bounds    : 36
 bounds relaxed   : 154
 dimensions fixed : 8

transformed polytope
 dimension                   : 24
 constraints (finite bounds) : 36

volume
estimate : 8.28757e+27

Limitations

  • Clarkson often requires dimension fixing - degenerate dimensions make it difficult for Clarkson to find an interior point, so the run fails, falling back to the exhaustive method instead
  • Clarkson misses some bounds - due to numerical error Clarkson might not be able to classify some of the constraints as redundant, marking them as essential instead and returning a not minimal representation of the polytope as a result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant