## 4 Graph Filters for Library Recommendations
### Symmetric Absorbing Random Walks  
In this subsection, we transcribe the above human-driven library discovery process to graph filters with minimal (ideally no) parameters. To do this, we make the assumption that all choices during random walks follow static distributions that only depend the nodes that developers are currently looking at. We also ignore real-world semantics, such as project names or descriptions, whose exploration is left for future work. Instead, we only use the structural characteristics of dependency graphs. Given these assumptions, one possible tool to model random walks with memory are partially absorbing random walks [39]. Instead of only defining one type of filter, these introduce a framework for accounting for memory by letting a portion of random walks passing through nodes stay there. In terms of our theorization, this corresponds to developers remembering the nodes they visit and their relatedness to original queries. Various graph filters arise for different assumptions of how memory works, such as the probability of staying on nodes being proportional to node degrees, which is theoretically equivalent to personalized PageRank (more details below), or the alternative of assigning the same absorption rate to all nodes to retrieve tightly knit structural communities [39], where the absorption rate effectively describes the memorability of nodes. Partially absorbing random walks account for the four types of random walk with memory actions described in the previous section and are recursively computable through the following formula:  
\[h=S(S+\hat{D})^{-1}h_{0}+S(S+\hat{D})^{-1}\hat{A}S^{-1}h \tag{9}\]  
where \(\hat{A}\) are symmetric normalizations of adjacency matrices presented in (2), \(S\) is a diagonal matrix whose diagonal elements \(S[u,u]\) correspond to the absorption rates of nodes \(u\), and \(\hat{D}\) are diagonal matrices with elements \(\hat{D}[u,v]=\{\sum_{\sigma^{\prime}}\hat{A}[u,v^{\prime}]\text{ if }u=v,0\text{ otherwise}\}\). We stress that \(\hat{D}\) are the node degrees of the normalized (not the original) graph adjacency matrix. Correspondence between quantities appearing in (9) and the random walk procedure with memory in dependency graphs is demonstrated in Figure 3.  
Partially absorbing random walks can implement different graph filters, depending on chosen absorption rates \(S\). For example, selecting \(S=\frac{1-a}{a}\hat{D}\) for a parameter \(a\in(0,1)\) reduces this scheme to the power method iteration of computing personalized PageRank, whereas \(S=\frac{1-a}{a}I\) discovers tightly connected structural communities around query nodes with high probability [39]. In both cases, absorption rates only depend on one (hyper)parameter. We now provide a novel way of selecting absorption rates. This starts by solving (9) with respect to \(h\) and expressing the graph signal outcome \(h\) of partially absorbing random walks per:  
\[h=F(\hat{A})\hat{I}_{0}\] \[F(\hat{A})=\big{(}\mathcal{I}-S(S+\hat{D})^{-1}\hat{A}S^{-1} \big{)}^{-1}\] \[\hat{I}_{0}=S(S+\hat{D})^{-1}h_{0}\]  
In this context, \(\hat{I}_{0}\) is an adjusted version of the query graph signal that weighs the query project and its dependencies based on their absorption rates. \(F(\hat{A})\) is the graph filter responsible for diffusing the adjusted query graph signal. Effectively, this can be expressed as a spectral filter \(F(\hat{A})=\hat{F}(\hat{A})=(\mathcal{I}-\hat{\hat{A}})^{-1}\), where \(\hat{\hat{A}}=S(S+\hat{D})^{-1}\hat{A}S^{-1}\) is a new normalization applied on the normalized adjacency matrix \(\hat{A}\) (\(F(\hat{A})\) is not a spectral filter of \(\hat{A}\) because it arise from a non-polynomial graph operations of the latter, but \(\hat{F}(\hat{\hat{A}})\) is a spectral filter of \(\hat{\hat{A}}\)). In the previous section, we formulated that graph signal filtering should be low-pass around query graph signals. To achieve this effect for \(\hat{F}(\hat{\hat{A}})\), one simple solution would be to make \(\hat{\hat{A}}\) symmetric.