GSoC 2026 - Interest in Linear Algebra Rewrites for PyTensor

Hello! I have been really interested in pursuing PyMC as a potential organization for GSoC 2026 and i came across Linear Algebra Rewrites for PyTensor which caught my eye. i have made some pull requests on the PyMC codebase and am currently familiarizing myself with the PyTensor library. I am in the middle of working on a beginner friendly issue in PyTensor and am aware of the progress in the 2024 GSoC Project by Tanish which provides a solid baseline from which we can work.

@jessegrabowski and @robzinkov - which issues in pytensor would be a good idea to tackle that helps me get an idea of graph rewrites and linear alegebra ops?

Hi Adishree

Nice to hear you’re interested in pytensor. I am going through all these introduction posts and copy/pasting the same question and advice. Basically my view is that it will be impossible for you to help develop these tools if you aren’t already using them yourself. I would be more interested to see you reply to this post with a link to a gist or colab showing that you worked through a problem that motivates you using pytensor than to see you open a PR into a codebase that is completely alien to you right now. Are there particular areas of research you are interested in? Are there algorithms in that field that could benefit from these rewrites? There’s where I suggest you start.

Thank you for the feedback @jessegrabowski!

As practice, I built a Bayesian model exploring whether astrological identity predicts latent personality traits. I used pm.LKJCholeskyCov with chol= which led me to investigate what PyTensor was actually doing under the hood - specifically the Cholesky triangular solve rewrite. I added a comparison against naive matrix inversion and found that the speedup grows significantly with matrix size, reaching ~30x at n=256.

I also noticed something while reading the graph output: for one of my traits (abandonment_fear) I had written mu=-theta_ind[:,7], which causes PyTensor to insert an explicit negation node before a squaring operation. Since (-x)² = x², that negation is redundant - a missing rewrite that could be optimised away. Here’s the Colab link:

More broadly, an area I’m interested in is whether psychological constructs - personality traits, emotional patterns - have real statistical structure or whether we’re imposing categories on noise. That question seems to sit right at the intersection of what PyMC and these rewrites are built for.