Skip to content

nata-web/SO_and_creativity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Untapped Potential in Self-Optimization of Hopfield Networks: The Creativity of Unsupervised Learning

This repository contains the code used for the paper "Untapped Potential in Self-Optimization of Hopfield Networks: The Creativity of Unsupervised Learning" (Artificial Life, arXiv).

Content:

  • SO_base.py - Main file. Uses the custom containers in containers.py, the parameters in paramfiles/modularprob.py, and calls for SO_base_FUNC.py to run the simulations. Calls for SO_base_plots.py to generate figures 2-9 in the paper.
  • SO_base_plots.py - Calls for SO_for_SAT.py and borders.py, and contains various plot functions to generate figures 2-9.
  • SO_base_FUNC.py - Calls for hebbclean.F90 to run the simulation in FORTRAN. Contains functions from SO-scaled-up to generate random weight matrices.
  • hebbclean.F90 - Contains the FORTRAN routine.
  • containers.py - Contains custom containers.
  • paramfiles/modularprob.py - Folder that contains all the parameters.

To replicate the figures in the paper, modify the following parameters in the paramfiles/modularprob.py file:

  • For Figures 2-4, and 8-9:
    • Set CO.alphaGrid = True and CO.num_alphas = 1 (for Fig. 3 also set plot6 = True in SO_base.py).
  • For Figures 5-6:
    • Set CO.alphaGrid = False and CO.num_alphas = 64.
  • For Figure 7:
    • Set CO.alphaGrid = False, CO.num_alphas = 1 and CO.resets_arr = [4000] * len(CO.alpha_arr) in line 33 of the code.

To run the code from Python with FORTRAN:

Make sure your system has gfortran and f2py. Run the following commands before the execution of the python code to compile the FORTRAN file:

f2py3 --f90flags="-g -fdefault-integer-8 -O3" -m hebbF -c hebbclean.F90

To run the simulations from Python without FORTRAN

Current code is written to run the explicitly with FORTRAN (plots are generated in Python). To run the simulation in Python only see SO-scaled-up.

If you have any questions, feel free to open an issue or send me an email: natalya.weber (at) alumni.oist.jp.

If you use our code for your research, consider citing our paper:

@article{weber_untapped_2025,
  title = {Untapped {{Potential}} in {{Self-Optimization}} of {{Hopfield Networks}}: {{The Creativity}} of {{Unsupervised Learning}}},
  shorttitle = {Untapped {{Potential}} in {{Self-Optimization}} of {{Hopfield Networks}}},
  author = {Weber, Natalya and Guckelsberger, Christian and Froese, Tom},
  year = 2025,
  month = oct,
  journal = {Artif Life},
  pages = {1--30},
  publisher = {MIT Press},
  issn = {1064-5462},
  doi = {10.1162/ARTL.a.10},
  abstract = {The self-optimization (SO) model can be considered as the third operational mode of the classical Hopfield network, leveraging the power of associative memory to enhance optimization performance. Moreover, it has been argued to express characteristics of minimal agency, which renders it useful for the study of Artificial Life. In this article, we draw attention to another facet of the SO model: its capacity for creativity. Drawing on creativity studies, we argue that the model satisfies the necessary and sufficient conditions of a creative process. Moreover, we show that learning is needed to find creative outcomes above chance probability. Furthermore, we demonstrate that modifying the learning parameters in the SO model gives rise to four different regimes that can account for both creative products and inconclusive outcomes, thus providing a framework for studying and understanding the emergence of creative behaviors in artificial systems that learn.}
}

About

Untapped Potential in Self-Optimization of Hopfield Networks: The Creativity of Unsupervised Learning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors