• versteegen 15 minutes ago

    The objective function here defines a Markov random field (MRF) with boolean random variables and certain local statistics of nearest neighbours, either uniform if the target is a white image, or varying with location to produce an image. MRFs define Gibbs probability distributions, which you can sample from (which will already produce a good image here) or perform gradient ascent on to reach a local maxima. The negative log-likelihood of the MRF distribution is equal to the loss function of the original optimisation problem, so the maximum likelihood estimate (MLE) (there will often be multiple due to symmetry) of the MRF is the optimal solution(s) to the origina problem.

    The statistics are 9th-order (of 3x3 blocks of pixels) but of a simple form which are hardly more expressive than 2nd-order nearest neighbour statistics (in terms of the different textures that they can reproduce) which are well known. Texture synthesis with MRFs with local statistics is discretized (in space) Turing reaction-diffusion. I did my PhD on this topic.

    Probably the most influential early paper on this kind of simple texture model, where you will see similar patterns, is:

    Cross & Jain, 1983, PAMI, Markov Random Field Texture Models

    • chillee 11 minutes ago

      It's always fun when people use autodiff in packages like PyTorch for completely unrelated usecases :)

      • christina97 13 minutes ago

        I feel like just doing simulated annealing on the starting grid would work better and be faster to implement?

        (Not saying the goal was working well and being fast to implement.)

        • dvh 5 hours ago
          • mbauman 5 hours ago

            Atavising was new to me. From https://nbickford.wordpress.com/2012/04/15/reversing-the-gam... :

            > First of all, while I said “Predecessorifier” in the talk, “Ataviser” seems to be the accepted word, coming from “Atavism”, which the online Merriam-Webster dictionary defines as “recurrence of or reversion to a past style, manner, outlook, approach, or activity”.

            • Jerrrrrrry 3 hours ago

                "its like showing a solved rubiks cube and asking what the scramble was"
              
              ^ this analogy may be the best I've seen in a long time.
              • jwood27 2 hours ago

                I made a related crossword puzzle. You can find it here if you want to give it a try! https://jacobw.xyz/projects/crossword/

                • Hugsun 3 hours ago

                  Interesting. I can't zoom on mobile which is frustrating.

                  • xfreesoft 3 hours ago

                    https://github.com/vtempest/Automated-Automata One idea is to have the gradient patterns emergent from simple rules calculating prior numbers with no need for hand of God intrvention.

                    • conorpo 2 hours ago

                      Seeing alot of parallels to the article by Stephen Wolfram posted a few days back on the fundamental nature of time .