graphwise 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +38 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -47,6 +47,8 @@ Three key properties:
47
47
  2. **Frontier collision detection**: when a vertex is reached by multiple frontiers, the connecting path is recorded
48
48
  3. **Implicit termination**: halts when all frontier queues are empty; no depth bound or size threshold
49
49
 
50
+ ---
51
+
50
52
  #### DOME: Degree-Ordered Multi-seed Expansion
51
53
 
52
54
  The default priority function uses degree-based hub deferral:
@@ -55,6 +57,8 @@ $$\pi(v) = \frac{\deg^{+}(v) + \deg^{-}(v)}{w_V(v) + \varepsilon}$$
55
57
 
56
58
  where $\deg^{+}(v)$ is weighted out-degree, $\deg^{-}(v)$ is weighted in-degree, $w_V(v)$ is node weight, and $\varepsilon > 0$ prevents division by zero.
57
59
 
60
+ ---
61
+
58
62
  #### Expansion Variants
59
63
 
60
64
  | Algorithm | Priority Function | Phases |
@@ -73,18 +77,24 @@ where $\deg^{+}(v)$ is weighted out-degree, $\deg^{-}(v)$ is weighted in-degree,
73
77
  | **SIFT** | MI threshold with degree fallback | 1 |
74
78
  | **FLUX** | Density-adaptive strategy switching | 1 |
75
79
 
80
+ ---
81
+
76
82
  #### EDGE: Entropy-Driven Graph Expansion
77
83
 
78
84
  $$\pi_{\text{EDGE}}(v) = \frac{1}{H_{\text{local}}(v) + \varepsilon} \times \log(\deg(v) + 1)$$
79
85
 
80
86
  where $H_{\text{local}}(v) = -\sum_{\tau} p(\tau) \log p(\tau)$ is the Shannon entropy of the neighbour type distribution. Nodes bridging heterogeneous structural regimes (high entropy) are explored first.
81
87
 
88
+ ---
89
+
82
90
  #### PIPE: Path-potential Informed Priority Expansion
83
91
 
84
92
  $$\pi_{\text{PIPE}}(v) = \frac{\deg(v)}{1 + \mathrm{pathPotential}(v)}$$
85
93
 
86
94
  where $\mathrm{pathPotential}(v) = \lvert N(v) \cap \bigcup_{j \neq i} V_j \rvert$ counts neighbours already visited by other seed frontiers. High path potential indicates imminent path completion.
87
95
 
96
+ ---
97
+
88
98
  #### SAGE: Salience-Accumulation Guided Expansion
89
99
 
90
100
  $$
@@ -93,6 +103,8 @@ $$
93
103
 
94
104
  where $\text{salience}(v)$ counts discovered paths containing $v$. Salience dominates in Phase 2; degree serves as tiebreaker.
95
105
 
106
+ ---
107
+
96
108
  #### REACH: Retrospective Expansion with Adaptive Convergence
97
109
 
98
110
  $$
@@ -105,6 +117,8 @@ $$
105
117
  \widehat{\text{MI}}(v) = \frac{1}{\lvert \mathcal{P}\_{\text{top}} \rvert} \sum\_{p} J(N(v), N(p\_{\text{endpoint}}))
106
118
  $$
107
119
 
120
+ ---
121
+
108
122
  #### MAZE: Multi-frontier Adaptive Zone Expansion
109
123
 
110
124
  $$
@@ -113,30 +127,40 @@ $$
113
127
 
114
128
  Phase 1 uses PIPE's path potential until $M$ paths found. Phase 2 incorporates SAGE's salience feedback. Phase 3 evaluates diversity, path count, and salience plateau for termination.
115
129
 
130
+ ---
131
+
116
132
  #### TIDE: Total Interconnected Degree Expansion
117
133
 
118
134
  $$\pi_{\text{TIDE}}(v) = \deg(v) + \sum_{w \in N(v)} \deg(w)$$
119
135
 
120
136
  Nodes in sparse regions (low aggregate neighbourhood degree) are explored first. Related to EDGE but uses raw degree sums rather than entropy.
121
137
 
138
+ ---
139
+
122
140
  #### LACE: Local Affinity-Computed Expansion
123
141
 
124
142
  $$\pi_{\text{LACE}}(v) = 1 - \overline{\text{MI}}(v, \text{frontier})$$
125
143
 
126
144
  Prioritises nodes by average MI to already-visited frontier nodes. Related to HAE but uses MI to visited nodes rather than type entropy.
127
145
 
146
+ ---
147
+
128
148
  #### WARP: Weighted Adjacent Reachability Priority
129
149
 
130
150
  $$\pi_{\text{WARP}}(v) = \frac{1}{1 + \text{bridge}(v)}$$
131
151
 
132
152
  Pure cross-frontier bridge score without degree normalisation. Related to PIPE but omits the degree numerator.
133
153
 
154
+ ---
155
+
134
156
  #### FUSE: Fused Utility-Salience Expansion
135
157
 
136
158
  $$\pi_{\text{FUSE}}(v) = (1 - w) \cdot \deg(v) + w \cdot (1 - \overline{\text{MI}})$$
137
159
 
138
160
  Single-phase weighted blend of degree and MI. Related to SAGE but uses continuous blending rather than two-phase transition.
139
161
 
162
+ ---
163
+
140
164
  #### SIFT: Salience-Informed Frontier Threshold
141
165
 
142
166
  $$
@@ -145,10 +169,16 @@ $$
145
169
 
146
170
  MI-threshold-based priority with degree fallback. Related to REACH but uses a hard threshold instead of continuous MI-weighted priority.
147
171
 
172
+ ---
173
+
148
174
  #### FLUX: Flexible Local Utility Crossover
149
175
 
150
176
  Density-adaptive strategy switching. Selects between DOME, EDGE, and PIPE modes per-node based on local graph density and cross-frontier bridge score. Related to MAZE but adapts spatially (per-node) rather than temporally (per-phase).
151
177
 
178
+ ---
179
+
180
+ ---
181
+
152
182
  ### Path Ranking: PARSE
153
183
 
154
184
  **Path Aggregation Ranked by Salience Estimation** (PARSE) scores paths by the geometric mean of per-edge mutual information, eliminating length bias:
@@ -235,6 +265,10 @@ where $c(\tau_u)$ is the count of nodes with the same type as $u$. Weights Jacca
235
265
  | **Betweenness** | Fraction of shortest paths through node |
236
266
  | **Random** | Uniform random score (null baseline) |
237
267
 
268
+ ---
269
+
270
+ ---
271
+
238
272
  ### Seed Selection: GRASP
239
273
 
240
274
  **Graph-agnostic Representative seed pAir Sampling**: selects structurally representative seed pairs from an unknown graph using reservoir sampling and structural feature clustering. Operates blind: no full graph loading, no ground-truth labels, no human-defined strata.
@@ -245,6 +279,10 @@ Three phases:
245
279
  2. **Structural features**: for each sampled node compute $\log(\deg + 1)$, clustering coefficient, approximate PageRank
246
280
  3. **Cluster and sample**: MiniBatchKMeans into $K$ groups; sample within-cluster and cross-cluster pairs
247
281
 
282
+ ---
283
+
284
+ ---
285
+
248
286
  ## Module Exports
249
287
 
250
288
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphwise",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Graph algorithms for citation network analysis - novel expansion, MI variants, and path ranking",
5
5
  "type": "module",
6
6
  "sideEffects": false,