QuAC: Quick Attribute-Centric Type Inference for Python
summary
QuAC collects attribute sets for expressions, builds a class-query DB (builtins, stdlib protocols, imported and user classes), and ranks candidates with BM25 ranking to pick the best class; it then uses relation-based semantics to recursively infer container parameters (e.g., predicts sequence of Point). On popular Python repos it reduces runtime by ~15× versus non-LLM baselines, is nearly two orders of magnitude faster than an LLM, and covers about half of the LLM’s errorless non-trivial predictions while improving container-parameter accuracy.
AI-written summary · about
chapters (11)
- 0:00QuAC and Python typing
- 1:47Python type inference challenges
- 3:35QuAC’s attribute-centric approach
- 5:18Class prediction with BM25
- 7:04Container type parameters
- 8:50Relations for semantic analysis
- 9:32Evaluation vs state-of-the-art
- 11:14Comparison with LLM inference
- 12:19Container type prediction
- 13:03Challenges and future work
- 14:06Conclusion and Q&A
related talks
31mHybrid Quantum-Classical Machine Learning using Qiskit
15mScalable Type Inference for Intrinsically-Typed Binders
40mDeep Learning for QSAR
24m"A Confession of My Python Sins"
22mExploiting Auxiliary Information for Better Recommendation
29mSix QA Tools that will make your Python code better
38mUnderstanding attributes (Or: They're not nearly as boring as you think!)
27mWhat are quantum computers, and how can we train them in Python?
