Chat with usRyan Buchanan is investigating How can we reconcile competing values?
     
Econet / ActiveInferenceJuliaProposal     Search:

Active Inference, Julia, Active Inference Julia

Peter Thestrup Waade: Next step is that @AndriusKulikauskas (Math4Wisdom) finishes a first draft of the application. Then I think we should meet online and discuss next steps, but otherwise my team and @Daniel Friedman can finish the application

Andrius: I am preparing the proposal below to get European Union funding for ActiveInference.jl

NGI Zero Commons Fund Guide for Applicants

Deadline August 1, 2025.

Vision The enduring success of the Internet lies in permission-free innovation, openness and interoperability. The Next Generation Internet is set up to empower, to unlimit our choices. It fosters diversity and decentralisation, and grows the potential for disruptive innovation. This extends far beyond the technical realm. The Next Generation Internet will achieve a sustainably open environment for our cultures and economies, celebrating our values and promoting creativity and well-being. Let's re-invent Internet to reach the full human potential, for all generations.

  • Projects should be in line with the NGI vision and the sub-granting call applied for.
  • Projects should have research and development as their primary objective.
  • Projects should satisfy any other hard eligibility criteria specific to the sub-granting call, such as having a clear European Dimension.

Projects receive an initial rating on three criteria:

  • 30% Technical excellence/feasibility
  • 40% Relevance/Impact/Strategic potential
  • 30% Cost effectiveness/Value for money

The second stage is used to select strategic projects which not only satisfy the minimal criteria, but also have potentially a lasting impact on society. Projects are to be selected based on their potential contribution to the Next Generation Internet and its key drivers for change. In the second stage, the reviewers are able to ask additional clarifying questions and make (minor) suggestions to improve the quality and impact of the project.

Technology layers

Application form Please be short and to the point in your answers; focus primarily on the what and how, not so much on the why. Add longer descriptions as attachments (see below). ... On the up side, you can be as technical as you need to be (but you don't have to). Do stay concrete.

Total length5 pages {$\leq 17,700$} characters
Overview1/3 page {$\leq 1200$} characters
Your relationship to the project2/3 page {$\leq 2500$} characters
Budget2/3 page {$\leq 2500$} characters
Compare your project with others1 1/3 page {$\leq 4000$} characters
Technical challenges1 2/3 page {$\leq 5000$} characters
Ecosystem2/3 page {$\leq 2500$} characters

Proposal

Applicant Peter Thestrup Waade (Denmark)

My only concern is that my time is very limited in the next few months (handing in my dissertation in August), so I have pretty limited time resources for grant writing. In other words, I'd say this would only be possible if Andrius and/or others can lead the application writing - but then I would be very happy to contribute as much as I can! The same is true for the rest of my team 🙂

Proposal name

Website

Can you explain the whole project and its expected outcome(s). (1200 characters ~ 200 words)

I take it that a key point is that ActiveInference.jl is meant to be a gateway interface for researchers to make modeling Active Inference as straightforward as possible. You want to rewrite parts of ActiveInference.jl so that it can allow for a variety of generative models, not simply POMDP, and thus be able to make good use of other packages under the hood. And we want to do this socially in a way that fosters our entire ecosystem. So it is great that you have connections with the other projects. So that is the summary of the proposal as I see it.

The software is usable for AI and also for computational psychiatry, so there is that angle, too

And also that we want to make active inference available to computaitonal psychiatry, so we also allow for interfacing between AI/machine learning and psychiatry/psychology/neuroscience

Feel free to try out the package! Although be aware that we are in the process of updating it - it isn't optimized yet, so it can be slow, and not all parameters can be estimated meta-bayesian style yet

eter, I suppose a first priority could be the A) high quality of the code base B) clarity of the modeling language And along with these I would consider how to set up the ecosystem so that coders or modelers could work for people like Dirk or others. Who are the possible programmers and what do they need to use your tools in helping others?

ersonally, I would write that the principal challenge is adoption given that this field requires a high level of collaboration by researchers contributing different skills and expertise, and furthermore, the Active Inference framework itself is conceptually advanced, mathematically sophisticated, computationally robust, and taps deeply into the empirical data being modeled by the relevant science. The solution is to work closely with researchers so that the software meets their needs. And also to learn to present the framework, especially for model-based data analysis as in Chapter 9 of the textbook, in a way that helps users think clearly about the framework, the models they are constructing or discovering, and the code that implements that. Your library already exists and I think it is this matter of taking this further.

they fund which include scientific research; design and development of free and open source software and open hardware; understanding user requirements and improving usability/inclusive design; documentation for researchers, developers and end users, including educational materials and so on.

it needs to focus on the "next generation" Internet, by which they mean "An internet of human values: Resilient. Trustworthy. Sustainable." So how does or could your software contribute to the Internet?

It would essentially be an improved type of documentation, from the packages perspective, and from the community's and entrance point to modeling. It is also a great point that we can host it on the AII's internet presence which already exists 🙂 So essentially we might apply for money to transform ActiveInference.jl into a fully fledged tool, which involves a) a software developer to make sure the code is efficient, readable and editable, b) the creation of an online-hosted guide to doing active inference modeling with the package, including things like the questionnaire you were describing, or some video tutorials perhaps, c) included in the previous a good from-scratch introduction to the field, to introduce newcomers to it, d) community based testing of the software to make sure it is as intuitive and useful as possible

I imagine there could be a modeling language based on the most important concepts here https://coda.io/@active-inference-institute/active-inference-ontology-website/definitions-3 and your package would make this straightforward to translate into code for the relevant project.

We have the basics set up, but there is much to do in terms of efficiency, completeness of features, and usability of the package too I think I also do think that having continuous state space models could be useful, at least to confirm Karl's suggestion that you don't need it since the discrete state space in principle can cover all interesting situations, and also because there are situations where the computational cost of discretizing everything is large,

Have you been involved with projects or organisations relevant to this project before? And if so, can you tell us a bit about your contributions? (2500 characters ~ 430 words)

@Samuel William Nehrer @Jonathan Ehrenreich Laursen welcome Sam and Jonathan are members of my team and have done most of the implementation of the package under my supervision. They are students, and will be doing their master's at ETH, Zürich @John Boik has recently joined the team and alreayd made invaluable contributions. He is part of the currently ongoing update also welcome to Aleks @sashapustota, who has worked on active inference and related Bayesian mind models, and who has agreed to help out with this application. It would be great to be able to hire him while he applies for his PhD - I trust his competence and his kindness too

Finally, Chris Mathys is the PI in our lab and has supervised the software development, and Dominik Firisz has recently joined the team too, and will aim at contributing to the package in the fall

https://www.mdpi.com/1099-4300/27/1/62 Article about ActiveInference.jl

Endorsed by

  • Active Inference Institute
  • Karl Friston

Requested Amount (between 5,000 and 50,000 EUR)

Explain what the requested budget will be used for?

  • Does the project have other funding sources, both past and present?
  • Explain costs for hardware, human labor (including rates used), travel cost to technical meetings, etc.
  • (max 2500 characters, be concise)
  • (If you want, you can in addition attach a budget at the bottom of the form).

The total possible is 50,000 euros and I am thinking that we ask for 40,000 euros. For myself, I would ask for 12,000 euros at a rate of 25 euros per hour. Which would equal 20 hours per week, 4 weeks per month, for 6 months.

People for whom we prioritise appling for money is: @AndriusKulikauskas (Math4Wisdom) as coordinator, tester, and person who will get feedback from the community. Aleks @sashapustota who will be software developer and work with us on extending and improving the package

But depending on the budget, on time availability on their end, and on what makes sense for the project, we might also be able to do a small hire, either for @Moller, for Dominik, or for someone else (where I do have a brilliant software engineer in mind that I know I work well with, too) Hi everyone

learn about user needs (like you were doing today) and start trying to serve them (as part of the process of building your package). So if you like, I could ask for funding for myself as an organizer and interviewer, and for one or two software developers to program custom solutions, and for an Active Inference expert to do the modeling, perhaps paying the Active Inference Institute for that or just to support it in general as the locus for this activity.

I could be the organizer. I think there are two roles for adoption - we need one or more software developers, we need one or more modelers to work with users. I think (and hope) that I could learn to do such modeling. But, in general, there is a question of whether it would be good to have fewer people earning more money, or more people earnling less money. I imagine the latter can help grow a vibrant community of modelers and developers.

Also, I suggest reaching out to people who are using your library or might like to. In particular, neurosurgeon Dirk de Ridder presented a theoretical model based on his experience and he is now looking for collaborators to implement this model with a demonstration I think with the help of the Institute we can gather together an impressive group of researchers and learn their needs and desires.

Compare your own project with existing or historical efforts. E.g. what is new, more thorough or otherwise different. (max 4000 characters ~ 690 words, be concise)

Other softwares is the original implemention in MATLAB, the DEM software; pymdp; ActiveInference.jl; RxInfer.jl (which does parts of but all of active inference); and cpp-aif in C++ After you've drafted, we can write a little bit on their relative strengths and weaknesses. In our paper there is also an overview The thing that makes ActiveInfernce.jl unique is that is is invertiable, so it can be used computationla phenotying / cognitive modeling It can also use RxInfer under the hood (when we've updated it), so it can benefit from their speed and ecosystem Another thing that ActiveInference.jl has is that we are going to mkae it generative model-general, so that other types of models than discrete POMDP's can be used Finally, we can rely on Turing.jl and RxInfer.jl to implement these generative models, which is necessary for continuous state space models And then Julia makes it very easy to write performant code that is also easy to read, extend and develop - so it should make it much easier for the community help develop the package I will reach out to RxInfer soon. I am in contact with the developers of pymdp (Verses). And the aif-cpp I don't know how much is used, but it would be nice to talk to them Happy to (perhaps in the future) extend to applying for money for AIF development in general, across packages, although ym focus is of course on ActiveInference.jl

We are building on the Active Inference ontology work. https://coda.io/@active-inference-institute/active-inference-ontology-website

The world needs an open source ecosystem regarding AI and that Active Inference is an important contribution to that, and the priority is to strengthen the open source spirit among Active Inference researchers, centered around the Active Inference Institute. So the idea would be for you and me and others to build on the Active Inference Institute's existing work.

Compare with

What are significant technical challenges you expect to solve during the project, if any? (optional but recommended, max 5000 characters ~ 860 words)

We need to think what would be most helpful to fund. And then break it down into milestones. They pay after each milestone is completed.

Accelerate the adoption cycle, the research and development cycle for faster feedback and custom service.

Andrius could lead a small team to work with your team to learn about user needs (like you were doing today) and start trying to serve them (as part of the process of building your package). So if you like, I could ask for funding for myself as an organizer and interviewer, and for one or two software developers to program custom solutions, and for an Active Inference expert to do the modeling,

I will need to understand your core needs. I also had a thought for giving this an online component and relate it to their vision of the next generation Internet. It would be good if there was a simple online website where researchers could find and share examples of how they break down their projects in the way that Karl talked about yesterday. 1) Specifying subjective generative models 2) Specifying the objective generative model 3) Inverting all of these generative models. 4) Finding the prior beliefs that fit best. I think this is the subject of Chapter 9 Model-Based Analysis in the Active Inference textbook. Also, he talked about A-tensor (likelihoods), B-tensor (priors), C-tensor (goals), D-tensor (initialization), E-tensor (habits), F Free Energy, G I didn't hear, H-tensor (new goals required for inductive inference) if I wrote this down correctly.

If there was such a template available online, and also alongside the code, that would help researchers structure their thinking, then this would facilitate adoption, sharing, collaboration, use case collection, development of relevant software, interplay with compatible theoretical frameworks, sharing of data, integration with AI tools. It would facilitate the Active Inference Institute's role as a hub and catalyst. It would contribute to the human relationships which make the Internet a healthy forum.

Determining priorities. I think that your argument for a continuous state space model is fine if you position it as an alternative. There is a principle in software development of serving a client's needs even if they don't make sense because that can be the quickest way to communicate why. But I would first find at least one user who actually wants the continuous state space model. If you don't have such a user then I would wait until you get a request, personally thinking. For this grant, I would focus on actual users and connecting with them and their needs.

Yes, good idea to gather researchers - I imagine that would be very useful for the application, and also for the software development itself.

I think one primary bottleneck in the field is the time resources of the (somewhat limited amount of) computational modellers; I am sure Dirk's project is valuable, but I, for example, coulnt currently take on a whole new modeling project right now. But of course, the aim is to address this - exactly by making these tools as easy to use and understand as possible. And regarding continuous state space models, good point. I actually know quite a few people who would like to do this I think - the problem is, they often end up using other modeling approaches than active inference, sometimes relates ones sometimes not. Many people also simply do not do the projects because there aren't modeling tools for it. But in any case, I don't think there should be much focus on this in the application, except perhaps to say that we want to the software to be flexible enough that it can be extended to meet various needs that might arise in the future, and to connect it with the rest of Julias open-source ecosystem

Describe the ecosystem of the project, and how you will engage with relevant actors and promote the outcomes? (E.g. which actors will you involve? Who should run or deploy your solution to make it a success? (max 2500 characters ~ 430 words, be concise)

The Applied Active Inference Symposium will take place on November 12-14 https://coda.io/d/AII_do5M5iYau8H/Call-for-Presenters_suPBkWXn and the focus will be on industry and one major topic will be: Open Science & Tool Development: Increasing the function and accessibility of Active Inference software across languages. Focused tracks and workshops on practical aspects of Active Inference.

So we should talk to @DanielFriedman when he gets back and think about presenting ActiveInference.jl and other software and our overall plan for our ecosystem. Then we can note in our proposal that we will be coordinating ourselves within that ecosystem, presenting and finding users, making connections, etc. This can be our "measurement" of where things stand as we start. If we go for 6 months, then we would start in November / December and finish in May / June. That kind of matches the Institute's cycle.

It's important to think how all of the software might fit nicely within our ecosystem. So it could be good to connect with the leaders for those packages, especially since we're working through the Active Inference Institute. For example, having a community of modelers working for free and/or pay can be meaningful for all of the packages. I think it would be good to distinguish the niches that the packages are serving.

Attachments: add any additional information about the project that may help us to gain more insight into the proposed effort, for instance a more detailed task description, a justification of costs or relevant endorsements. Attachments should only contain background information, please make sure that the proposal without attachments is self-contained and concise. Don't waste too much time on this. Really.

Endorsements

  • Active Inference Institute (can coordinate a team, can position with regard to other software projects, can position within the Applied Active Inference Symposium).
  • Karl Friston
  • Theoretical Neurobiology Meeting

Alongside @AndriusKulikauskas (Math4Wisdom), @Daniel Friedman and potentially @Moller (who I would like to meet properly before we commit to anything), we form the team that will write this application together (and perhaps others in the future)

Other somewhat similar projects

Projects funded so far

  • related to science: An OpenScience flavour of Bonfire on NixOS for preprints — Discuss preprints based on W3C
  • PyCM — Machine learning post-processing and analysis. PyCM is an open-source Python library designed to systematically evaluate, quantify, and report the performance of machine learning algorithms. It offers an extensive range of metrics to assess algorithm performance comprehensively, enabling users to compare different models and identify the optimal one based on their specific requirements and priorities. Additionally, PyCM supports generating evaluation reports in various formats. Widely recognized as a standard and reliable post-processing tool, PyCM has been adopted by leading open-source AI projects, including TensorFlow, Google’s scaaml, Torchbearer, and CLaF. In this grant, the team will implement several new features, such as data distribution analysis, dissimilarity / distance matrices and curve analysis. In addition the project will improve benchmarking and confidence, and introduce an API and GUI for wider adoption.

Secondary

We have also discussed making like a GUI-like tool which runs Julia under the hood, to reduce the coding complexity for users. Developing that would be great, but it strikes me as a secondary thing after the software itself has grown up properly