GSoC 2023 Project Idea 5.1 Optimization of the computations of higher-order interactions and integration in the Frites python package (175 h)

Hi @glunkad,

The idea is to have a single function allowing to switch automatically to the NumPy- or Jax-based implementation, depending on which library is installed (if Jax installed, use jax, otherwise use numpy). Some preliminary questions to answer before jumping into this task.

  1. What are the dependencies of Jax when installed using CPU only? (pip install --upgrade "jax[cpu]")
  2. Can we install Jax on every platform easily? (Linux, Mac, Windows)
  3. Do we see performance improvements using Jax on CPU compared to NumPy?
  4. How to limit as much as possible duplicated code?

Best,

1 Like

Hello @EtienneCmb mentor,

In the project given we have to implement the HOI’s in both Numpy and Jax libraries, further it’s should merged or combined to form a single function !..

Answers to some preliminary questions .

→ Libraries: scipy>=1.5,opt-einsum,numpy>=1.20,jaxlib==0.4.6

→ Supports installing or building jaxlib on Linux (Ubuntu 16.04 or later) and macOS (10.12 or later) platforms.Windows users can use JAX on CPU and GPU via the Windows Subsystem for Linux.

  • Ubuntu 16.04 or later
  • macOS 10.12 or later

→ According to the documentation it is stated to have added advantage of performance improvements using Jax on CPU compared to NumPy.

→ Making most out off inbuilt function provided by library.

Perfect, thx @glunkad, very clear. What are the dependencies of jaxlib (if any) and what is the purpose? Can it be installed independently?

1 Like

Can it be installed independently? @EtienneCmb

Jaxlib is the support library for JAX. While JAX itself is a pure Python package, jaxlib contains the binary (C/C++) parts of the library, including Python bindings, the XLA compiler, the PJRT runtime

JAX is written in pure Python, but it depends on XLA, which needs to be installed as the jaxlib package. Use the following instructions to install a binary package with pip or conda, or to [build JAX from source]

We support installing or building jaxlib on Linux (Ubuntu 16.04 or later) and macOS (10.12 or later) platforms

Hi @EtienneCmb
Apologies about the gap in communication, I had my university exams.

I am very much interested in (1)optimisation of low level computations. I have already done good amount of research on it which I have included in my draft proposal.

Also, I am working on including other parts of the project in it and had a question. Could you please explain what the (3)simulate_hoi function is intended to do?

I @dishie, no problem, I hope the exams went well.

If you want to benchmark if the code is working you need a ground truth. In our case, the ground truth consist in injecting redundant and synergistic interactions between triplets, quadruplets at certain time. Then, we use our function and we try to retrieve the multiplets having HOIs such as whether their interactions are redundant- or synergy-dominated.

That’s the goal of the simulate_hoi, being able to simulate ground-truth.

Hi @Vaishnavi, thank you for the details.

Understood.Thank you!

Dependencies: scipy and numpy
It provides combined features of XLA (Accelerated Linear Algebra) and Autograd which also alows just-in-time compile your own Python functions into XLA-optimized kernels using a one-function API, jit. Compilation and automatic differentiation can be composed arbitrarily, can express sophisticated algorithms and get maximal performance without leaving Python. We can even program multiple GPUs or TPU cores at once using pmap, and differentiate through the whole thing.

Hi @EtienneCmb ,

1. Optimize the low-level HOIs computations (70 hours): find ways to decrease computing time while keeping reasonable memory usage. Some ideas include faster entropy calculations, avoiding recomputing some quantities, parallel computations, etc.

Can you please brief the first task ?

Estimating the entropy of a signal. The entropy H of a signal X is calculated with the well-known Shannon’s formula:


Is this above formula is required for that ?

Hi @dishie @glunkad and @Vaishnavi,

The deadline for submitting your project on GSoC is the 4th of April. We advise you to submit your proposal sooner (e.g 2nd or 3rd of April). Let me know once you’re done with our sublission.

Best,

Hello @EtienneCmb ,
I have submitted the proposal .
Thanks!

Hello @EtienneCmb mentor,

I have submitted the proposal.
Best regards

Hi @Vaishnavi and @glunkad,

Perfect. @dishie let me know when you are done with your submission.

Have a nice weekend all,

1 Like

Hello @EtienneCmb
I’ve turned in my proposal. Thank you!

Excellent @dishie ! Thank you all for your proposals :pray:

1 Like