Many software developers keep accounts on both GitHub, where they write project code, and Stack Overflow, where they post short snippets and explanations. Linking those accounts matters for security: iDev links them to catch actors who build reputation on the question-and-answer site and then ship malware through repositories. Linking by content is hard, because the two platforms use different words for the same work. GitHub code is long, tied to a project, and named after its domain. Stack Overflow snippets are short, explanatory, and often use placeholder names. Language models pretrained on code, the obvious tool for this gap, are built to ignore exactly the surface details that might identify a person. MonoCoder improves code modeling by parsing code into syntax trees and anonymizing variable names, strings, and numeric literals, a step it calls Local Semantics Elimination (LSE). The authorship and identity-linkage literature (StyleLink, De-Health) claims the opposite: idiosyncratic naming, misspellings, and formatting habits are the fingerprint.
This proposal treats that tension as the research question. The model has two views of each account. The abstracted view is what a domain-pretrained model sees after LSE: the technical content, which should survive the platform change once the vocabulary gap is closed. The residue view is everything LSE deletes: naming conventions, literal choices, comment phrasing, and layout. We train linkage models on each view and on both together. Then we measure where cross-platform identity actually lives, and whether an explicit split beats a single domain encoder on raw text. The case that matters most is developers whose interests do not overlap across platforms. For them, content matching has nothing to work with.
Core Claim
We make three connected predictions about developer identity linkage between GitHub and Stack Overflow. First, much of the identifying signal sits in the local residue that domain code pretraining discards. Second, a linker that scores the abstracted and residue views separately and then combines them beats a single contrastively trained encoder on raw text. Third, the gain concentrates where topical overlap is absent.
The stakes of the third prediction are real. Lee & Lo report that across 92,427 linked developers, 26% keep entirely disjoint interests across the two platforms, with a similarity score of 0. Any content-matching linker has no signal on that quarter of users.
The three input directions play different roles here:
- Domain pretraining is the method for closing the gap between how the two platforms phrase the same technical content.
- Vocabulary mismatch is the obstacle for the abstracted view.
- Identity resolution is the task and the evaluation.
What is new is not "use a code model for user linkage." It is making the model's discard decision an explicit, measured variable, with a channel dedicated to what domain pretraining throws away.
Research Program
Data
We build a linked corpus from developers who self-disclose their Stack Overflow account on GitHub, or the reverse. Self-disclosed links are the high-precision ground-truth source described in A Cross-Platform Collection of Social Network Profiles; the same kind of link anchors both iDev and Lee & Lo.
Leakage control is the first serious engineering task. The corpus must not let a model link accounts through trivial identity markers. We strip:
- author and license headers, email addresses, and handles in code;
- links between the two sites;
- usernames anywhere in the text.
We verify the result with a probe: a string-matching linker run on the cleaned text should fall to near chance.
Views
Each account yields two text views, split with MonoCoder-style syntax-tree parsing.
- Abstracted view $A(x)$. Code with local identifiers and literals anonymized, plus commit messages and answer prose.
- Residue view $R(x)$. The removed material, kept as an ordered stream: identifier tokens, literal values, comment text, indentation, and spacing patterns.
Encoders
The abstracted-view encoder starts from a code-pretrained model. We then continue pretraining it on unlabeled, anonymized text mixed from both platforms, so that snippet-style and project-style phrasings of the same logic land close together. This step is where domain pretraining is supposed to close the vocabulary gap, and an ablation tests it directly. Starting from a code-pretrained model rather than a general one follows the PEFT comparison: models exposed to code in pretraining beat general models even when the general models are fully fine-tuned.
The residue encoder is a small character-aware transformer, trained from scratch on residue streams.
Scoring
Both encoders are trained with a triplet loss on linked pairs, and their scores are combined:
$$ s(u,v) = \alpha \cos\big(f_A(A(x_u)), f_A(A(x_v))\big) + (1-\alpha)\cos\big(f_R(R(x_u)), f_R(R(x_v))\big) $$
The symbols are defined as follows:
- $u$ is a GitHub account and $v$ a Stack Overflow account.
- $x$ is an account's cleaned text.
- $f_A$ and $f_R$ are the abstracted-view and residue encoders.
- $\alpha$ is either fixed on validation data or predicted per pair from activity volume and topical overlap.
The per-pair gate is the part we expect to matter. Where interests overlap, it should lean on content; where they are disjoint, it should lean on residue.
Analysis
We map linkage accuracy along three axes:
- Topical overlap, stratified by Lee & Lo-style tag similarity.
- Activity volume, since sparse users defeat most linkers. De-Health notes that most forum users have fewer than 5 posts.
- Snippet provenance. Stack Overflow snippets pasted from the author's own repositories likely keep their naming, while toy examples do not. We detect the pasted case by near-duplicate matching against the author's repositories and report it separately, so the residue channel cannot win by memorizing copied code.
Baselines
The naive reference point is profile-attribute and username string matching run on raw, uncleaned profiles. It tells us how much the task depends on self-presented metadata. On iDev's GitHub–Stack Overflow data, profile attributes alone reached an accuracy of 0.868 (iDev). We run the same kind of matcher on our pairs, using Jaro-Winkler and Jaccard over name, bio, and location, and report it both on raw and on cleaned profiles.
The strongest existing method is iDev itself, which reports ACC 0.936 and F1 0.934. iDev builds a heterogeneous network of users, projects, questions, and answers, embeds meta-paths, and classifies candidate pairs with an SVM. That number comes from iDev's own dataset, and its reliance on cross-platform interaction edges means we can reimplement it only where such edges exist. We therefore report iDev's figure as an external reference, and run a reimplementation on the edge-bearing subset of our corpus using the same pairs and negative-sampling ratio. Beating iDev means matching its F1 on that subset, and clearly exceeding it on the edge-free subset, where it has no structural signal.
The stylometric competitor is StyleLink. It feeds 274 hand-built lexical, syntactic, and idiosyncratic features into graph networks trained with a triplet loss. The file reports its gain over its own baseline, a 9.2% average precision improvement, but no number on developer data. We retrain it on our pairs under the same triplet objective. It tests whether a learned residue channel beats hand-built features.
The competitor we consider most dangerous is a single code-pretrained encoder, with the same continued pretraining, fine-tuned contrastively on raw, un-anonymized text. It has the same parameter count as our two encoders combined, and the same data, steps, and hyperparameter search budget. If it could learn to use residue implicitly, the explicit split would be unnecessary.
Ablations isolate each ingredient:
- The abstracted channel alone, which is essentially LSE plus domain pretraining.
- The residue channel alone.
- A fixed versus a gated $\alpha$.
- A general-domain encoder versus a code-pretrained encoder versus one continued on both platforms, to measure what domain pretraining contributes to closing the vocabulary gap.
The proposal's central claim holds if the two-channel model beats the raw single encoder in overall mean reciprocal rank (MRR, the average of one over the rank at which the true match appears). It also needs a large margin in the disjoint-interest stratum.
Why not just…?
Why not just fine-tune a code model contrastively on raw text? This is the real threat, and we do not argue it away. A raw encoder sees the residue too and may learn to use it. The matched-budget comparison settles the question. If the raw encoder ties the two-channel model everywhere, the architecture claim fails. The decomposition probes would still show where identity lives. A further diagnostic tests whether the raw encoder relies on residue: we retrain it on text where local names are shuffled among the author's own code, then re-evaluate. Its accuracy should drop.
Why not just ask a frontier model zero-shot whether two accounts match? VIKI used zero-shot Gemini to profile already-linked developers. It needed ten runs per user to average out variance, and it never performed linkage. Ranking one account against thousands of candidates by pairwise prompts is costly. RaFe measured 78 hours of large-model feedback against 0.67 hours with a compact scorer for 30,000 instances. We still run the zero-shot model as a reranker over the top 20 candidates on a 500-user subsample, since the experiment shows whether it adds accuracy on top of our candidates.
Why not just use graph structure? iDev shows that interaction structure beats profile text. However, it needs explicit cross-platform edges, and those are exactly what careful or adversarial actors remove. The edge-free stratum shows whether text alone carries the signal there.
Why not just hand-built stylometry? De-Health found traditional stylometry alone at 8% accuracy under post sparsity, with most of its 70% exact-match accuracy coming from a structural candidate filter (De-Health). The StyleLink retraining tests whether learned residue beats hand-built residue features on code.
Proposed Experiments
The main evaluation ranks each GitHub account against Stack Overflow candidate pools of 1,000 and 10,000 accounts. We report MRR and Hits@1, @10, and @100, plus pair-level accuracy and F1 for comparison with iDev. We use user-disjoint splits and report each result with its variance.
Three checks decide the outcome.
The disjoint-interest stratum. If the residue channel does not lift Hits@10 substantially for users whose interests do not overlap, the central claim fails.
The obfuscation test. We rename all identifiers in the query account's code, simulating a user who deliberately scrubs style. The residue channel should collapse and the abstracted channel should hold. This tells defenders which features matter, and whether LSE-style scrubbing is an effective privacy tool for developers.
The pretraining ablation. Continued pretraining on both platforms should narrow the gap between snippet-to-project matching and project-to-project matching in the abstracted channel. If it does not, domain pretraining does not close this vocabulary gap. That would echo BioBART's finding that pretraining on formal PubMed text did not transfer to informal patient dialogue (BioBART).
The comparison baseline for the pretraining ablation is a within-platform linker: GitHub split against GitHub for the same user.
References
- iDev: Enhancing Social Coding Security by Cross-platform User Identification Between GitHub and Stack Overflow
- MonoCoder: Domain-Specific Code Language Model for HPC Codes and Tasks
- StyleLink: User Identity Linkage Across Social Media with Stylometric Representations
- De-Health: All Your Online Health Information Are Belong to Us
- GitHub and Stack Overflow: Analyzing Developer Interests Across Multiple Social Collaborative Platforms
- A Cross-Platform Collection of Social Network Profiles
- A Comparative Study of PEFT Methods for Python Code Generation
- VIKI: Systematic Cross-Platform Profile Inference of Tech Users
- RaFe: Ranking Feedback Improves Query Rewriting for RAG
- BioBART: Pretraining and Evaluation of A Biomedical Generative Language Model