aspireai.
PUBLIC EDITION

Studying 187 languages in one repository needed a different tool per language, so PyReprism made each language declare its own lexical surface once

AspireAI community · arXiv (PyReprism)
Empirical studies of polyglot repositories apply the same analyses to every language in the corpus, from separating code from comments to normalizing identifiers and screening for duplicated code, but assembling those analyses from specialized tools introduces differences in language coverage, measurement conventions and workflow. PyReprism is an open-source Python library and CLI that separates language-specific lexical processing from reusable analyses: each language declares its lexical surface, producing a lossless stream of typed tokens, and every analysis is implemented once on that stream. Across 187 built-in languages, language declarations have a median length of 16 lines and no language overrides a shared analysis. Against a reference parser, comment and string classification reach F1 of 0.994 and 0.958 on 1,412 files in 12 languages never used to develop the tokenizer, and in one polyglot repository study a single tool replaced three, taking 2.9s instead of 8.7s on one core. The paper also documents where lexical analysis falls short, in complexity estimation and clone screening. Code is at github.com/unlv-evol/PyReprism.
Read the story and explore more from the AspireAI community.
Discover more stories
Stay curious.
THE BIG PICTURE
A FRESH PERSPECTIVE
Research
One distance function matched sparse-autoencoder features across layers and compressed feature circuits into supernodes
Two sparse-autoencoder analyses have resisted scaling: matching semantically similar features across layers, and compressing large feature circuits into interpretable supernodes. This paper argues both are the same underlying problem, estimating semantic distances between SAE features that sit on different activation manifolds. Its representation treats each feature not as a single decoder vector but as an activation-weighted distribution over the hidden states expressing it, projects those distributions into a shared reference space, and compares them with Wasserstein distance. The representation is proved invariant to activation rescaling and stable under perturbation, and recovers true matches under finite-sample margin conditions. Empirically it outperformed decoder-vector and LLM-based baselines and captured subtle functional distinctions between related features, and it compressed large feature circuits into interpretable supernodes automatically. The limitation is that this is interpretability tooling: the paper demonstrates better feature matching and circuit compression, not that downstream interpretability claims become more accurate.
Swipe into something new
01 / 1729
The conversation continues
Explore Builds — projects by Kiran Adimatyam ↗
A fresh perspective changes everything.
ASPIREAI — STAY CURIOUS.