Compute in deltas

So, for some years I’ve been stuck unable to figure out delta computing. I use the symbol \Game because it looks similar on my phone to the symbol I want. But here, I will use \Delta in place of \Game.

The small delta means difference between two programs \delta(p_1,p_2) is a program that when applied to the program p_1 produces another program that can takes any input, x, of p_1 to produce r_1=\delta(p_1,p_2)(p_1)(x), a result that is equivalent to the second program run on the same input and environment r_2=p_2(x) such that r_1\equiv r_2 for some useful definition of \equiv. This is the program difference(pd) between two programs.

The large delta the gives us the program differential operator(PD). \Delta(p,a) produces a function that can produce the change in p when a pd of its argument a is offered \delta(a_1,a_2). That is: \Delta(p,a)(\delta(a_1,a_2))\equiv \delta(p(a=a_1),p(a=a_2)) where the RHS partial evaluations are performed by partially specifying just the parametera and leaving the rest free.

An understanding of a pair of pd operator (\delta_1, \delta_2) allows for reversible change if \delta_1\circ \delta_2 is an appropriately typed identity function. A single \delta is an irreversible change. For one example, reading from a true random number generator would be an irreversible program. Inside the realm of a computer, simply reading an input from outside of the computer is an irreversible program within the computer, because it cannot affect the unpressing of the key. Even though outside of the computer we may know the reverse state of the “no” is the question“are you sure” from “rm -rf /“, the computer cannot know that for sure with its own faculties. That is to say, you cannot either, even if you are inside the computer and has access to just the computer memories and interfaces. Invertible pairs are intuitive, such as (sin(x),sin^{-1}(x)).

Our accessible realm of compute in an execution is therefore an accumulation of: (an initial state, irreversibly computed outputs, and the compute graph of reversible deltas) By modeling information this way, we can explicitly consider more general changes of states as well as give rise to a framework for understanding, interacting and developing software programs more effectively.

p.s. Btw, these ideas can be equally well expanded into operational and denotational semantics, each with their own idiosyncrasies.

p.p.s. Can we circumvent first order logic by currying functions instead of using \forall? Elsewhere I have worked out the reparameterization to achieve \forall_{a_1,a_2} \Delta(p,a)(\delta(a_1,a_2))\equiv \delta(p(a=a_1),p(a=a_2)). One of several example of this kind of reparameterization would be \Delta(p,\delta_a) \equiv \delta(p) each LHS and RHS now is requested to takes two parameters typed for a and yields a function that computes the pd of p when it’s parameter a changes from one to the second. To achieve the first order approximation effect of derivation in ordinary calculus on reals, all we need is to specify a loose \equiv^1, the first order equivalence, and so on. There are also sub-first-order equivalences such as: having at least same number of characters in the program code, that they are in the same language, etc. First order equivalence should minimally be a program having sufficiently compatible (-ly typed) input and outputs. Subsequently higher order equivalences include progressively more and more identical runtime behaviors or progressively more matching meaning. Here, again is another example of why presently described paradigm is beneficial: for example if a program is stochastic, how do we determine if another program is equivalent to it other than that the code is identical? By isolating the irreversible compute of receiving (from identical) external entropy, the remaining program can be evaluated in the f^{th} order using conventional \equiv^f. Further higher order equivalence may require that they have same runtime/memory/resource complexities. Which, btw, inspires an n^{th} ordering \geq^n that requires all equivalences \forall k<n \equiv^k and then at the n^{th} level require LHS to be better than RHS—such as lower runtime complexity, etc. The details of all these developments are documented more fully elsewhere.

p.p.p.s. Where is this headed? Well, aside from modeling the universe, one possibility is to achieve truly symbolic differentiation and do back-prop on program code. One can ask, for the PD to a program’s unit test wrt the program. We then pass in the pair (false,true) to arrive at the program (code) mutator that can repairs the input program to produce a program that causes the unit test to pass, after which we use higher ordering to search for a better program.

One can dream…

Deep Universal Regressors Elsewhere

I just chanced upon a fascinating article called the Neural Additive Models Interpretable Machine Learning with Neural Nets(FAMX.3 for me due to my interest, but others may feel this draft is a 2 or 3 due to brevity) The proposed ExU is a layer that has an foreactivated parameter (see my own blog discussions on the need for nonlinear over raw parameters here, here, and here, etc.)

h(x)=f(e^w * (x-b)

I’m very excited that people like Jeffery Hinton and Richard Caruana are thinking about and writing about stuff that I’m thinking about and writing about at about the same time and arriving at similar solutions. In this case they performed foreactivation on a weight matrix. This paper of course is a collection of massive amount of experimentation, far more than I had resources to accomplish. These smart folks also solved the problem of sign that I had struggled with a bit—the sign is washed out by having multiple layers. (64 in their successful examples)

oh! That was obvious, now that they say that. the tanh-autoactivated sign I wanted to multiply on the front of the e^W was not necessary after all. As long as there is at least one “linear” layer at the output of the subnetwork that does not use the ExU or another sign-restricting foreactivation on the parameters, then the output can have a full range in R irrespective of input and therefore can be a universal regressor.

My only concern is the effort it required to arrive at their awesome results, no less than 4 hyperparameters had to be tuned using Bayesian optimization. I think my own laziness demands that there be a way to tune a model hyperparameter using only learning rate warmup and decays—the dynamical nature of a model and its data should be entirely taken care of by the model and automated training process. The foreactivation is one such mechanism.

Of course, I only have access to the initial draft posted on 2020-04-29. I am very hopeful that in subsequent revisions and sequels this highly flexible and highly interpretable modeling technique can made easier to use.

Good luck

I just showed my kids Apollo 11 launch to the moon, Apollo 13 around the moon, and Space Shuttle Challenger launch. T minus 18 minutes.

I mean yes, many my reckoning, Musk’s company Solar City conn’d $20k from me by selling me a wrongly designed solar and battery system. Their support and resolution teams are basically people acting like robots sending scripted emails. I am very angry with this company throughout my entire purchase experience. I attribute some of their behavior to Musk’s leadership as well. I hope these people are laid off for ever and change jobs because this is just evil what they do to their customers. This is just evil—in the sense that they suck money from customers using deception. These people should just retire and never work again(and they can after musk pumped their stock up) because what they did is wrong and evil.

I really do hope this launch goes smoothly though. watching the Apollo launches, my eyes are drawn to the brilliant fixed-width san-serifs letters USA emblazoned on the side of the rocket. What a great time, 1969, when USA had meaning and spirit that can shine through even a few letters. It’s sight stirs an exuberant excitement within me today even though I wasn’t even alive then.

Today, you’d probably have to look at letters like T-e-s-l-a or S-p-a-c-e-X for anything with any spirit and meaning and hope and excitement and confidence and motion.

So, be that as it is, I wish them absolutely the best. May it prod mankind forward. I hope SpaceX is not evil to its customers and investors like Tesla is.

Electronic Management

There have been a lot of news about increase in workplace management, as in remote monitoring, as many folks are either forced to or choose to work from home due to covid19.

It occurs to me that there might be some argument for the additions to the rights and freedoms of the individual. The company is a very powerful entity with a lot of resources at its disposal. In my past posts, I have argued for organizing labor for software engineers. It must be recognized that there is a gross disparity of power between individuals and their employers when it comes to the modern electronic work.

Okay, sure, yes, they teach in business school that information asymmetry is only way to get an edge. But considering the relationship as part of human society, we can clearly see that the individual has too little information and too little power to preserve their own human interests. If everyone had more power, there would not be a few billionaires and a lot of poorer people. Wealth and income inequality is really just a consequence of information and power inequality—secrecy and domination. So in some ways, by balancing the power of each individual versus the collective singular entity of a company, we may influence those inequalities that we care about.

So, for one example: it is publicly suggested by news media that most workplace computer have technologies that can: record what you type on it, live viewing or record video of screen as you use the computer, and remote alteration of computer files on your work computer. Although this sounds like science fiction to many, it may very well become true by the time you read this, the technology required to accomplish this not so far fetched. Let’s assume for this discussion that our world is one where such technology is in prevalent use.

These “solutions” that companies use were purchased for legitimate reasons. They need to keep people productive at work. They need to protect company secrets. They (hopefully) need to preserve workplace professional integrity. Sometimes they need to correct certain situations directly without passing through the chain of management. And many other reasons. The technology very directly solves these problem.

They may be right about what happened two hundred thousand years ago. The past is written but the Future is left for us to write, and we’d have powerful tools, Rios, Openness, optimism and the spirit of curiosity. All they have is secrecy and fear, and fear is the Great Destroyer, not…

Star Trek Picard S1

It seems in the fictional 24th century, they have been enlighten to the fact that secretive actions driven by fear is not the path, that there is a brighter way forward for everyone.

So, it is towards that end I consider the state of workplace monitoring. Perhaps we have not advanced, each of us as individuals and all of us as a civilization, to a level where we need no workplace monitoring—I mean if we had that we probably wouldn’t need laws and law enforcement either. But when we must have monitoring. When the humans in a company must play with god like powers, perhaps there should at least be transparency.

What I propose is very simple: employees who are under company surveillance and control must be given the information the company has collected on them. If the company makes a change to files on his computer, he must be informed of those changes. Equal power also means you have access to the tools they use to analyze your activities. If your boss had a dashboard where he can look into your bathroom visits, by day of week, by time of day, as measured by frequency and duration, you should have the same access to the same dashboard. If he knows how fast you type on Monday mornings before and after your coffee break, so should you, and with the same latency that he has. If he changes a file, maybe even a single letter, you should be informed of it.

Actually we can probably separate the employer activities into different levels of access:

  • Lowest level:
    • computer IO(screen recording and keyboard logger)
    • audio-visual recordings
    • Live monitoring of screen should be accompanied by a clearly visible signal to the employee that someone is watching live.
    • Raw data files should be made available to the employee
  • Aggregation and analysis
    • Longitudinal data analysis
    • Alerts generated by the employers systems
    • Access to dashboards and analytics tools should be made available to the employee
  • Decision making
    • Explanation of why and AI made a determination for or suggestion to the company.
    • I would ask for an explanation of why a human manager made a determination for or suggestion to the company,…, but that’s not the fairness I’m fighting for today.
    • How a decision or determination was made must be communicated to the employee.
  • Alterations and Interventions
    • All changes the company makes to an employee’s files stored on company device or company cloud storage are relevant alterations.
    • Alterations should be communicated to the employee immediately.
    • The company should not assume that by moving the mouse on screen and typing the changes into the UI consist of informing the employee.
    • Intentional retardation (or speeding up) of equipment performance: computation, inputs and commands to the computer, the computers user interface(UI) responses, network transmission, these interventions directed towards changing the employee or his direct activities are activities that must be firmly recorded and promptly communicated to the employee.
    • The company should not represent that the alterations and interventions it made remotely to the computer data of an employee was made by said employee in any form or record such acts on media such that it is knowable to said employee, other employees, management or law enforcement.
  • Additionally, it would be very irresponsible to understate the meta-requirement of employment. The amount of effort an employees or subjects should devote to monitoring of metrics the organization provides them as part of their jobs or subjugation, or as the case maybe, as part of their “relationship” or “complication”.

Also, to be perfectly clear, for all your quick-jerk reactionaries, I obviously mean employee should have access to recordings of their own activities and not other employees activities. Employees in management role with access to other employee’s data bear extra burden of integrity and responsibility.

I make these suggestion because I feel that they are essential to preservation of human workplace digital rights and digital integrity. In America, we can still dream of human freedoms and rights. In America we can speak opening about what we feel is right and just. We can still do right by ourselves and treat everyone with dignity and respect and trust and support.

And, I mean, think of it, you don’t want street riots in America when China or Russia or India or the EU announces human digital integrity and management transparency laws, do you? Following “I can’t breath,” may be “I can’t ty…” or shall we just follow GDPR X when it comes to pass ? The late-comer advantage is very clear here, it is much easier for technologically underdeveloped groups of people to establish new regimes in the technology that they build afresh than the established technology industry with “stuff that (still) works)” If you think you’re afraid of China having 5G, just wait till the worlds start copying the Russian constitution for rigorously defined and well balanced laws regarding digital rights and integrity. What truths do we hold evident then?

If we can just get these things right, then our world will flourish with the truly free use of our computers technologies to advance us. If we can treat each other with dignity and fairness, we can fly to the stars.

Let’s make it so!

P.s.

The need for disclosure to the monitored subjects does not rise to the level of medical and scientific disclosure to human experiment subjects. those pursuits tend to have higher-minded goals of universally improving human knowledge and life. Not all organizations have or need to be held to that standard.

Present demand for disclosure also does not invoke fundamental human rights, and leave that open to argument.

What we do stake support in is the need for governance of power. Corporations and other legal entities have power over individual human entities. Those powers must be kept in check. Just as companies are required to disclose the results of credit and background checks made for purpose of employment, advanced monitoring should also include mandatory disclosure of their products. Clearly we have great precedence for mandatory disclosure for other sensitive and private information regarding a person. And certainly, when something is done to a person’s he must be informed of those alterations. We should have it for all monitoring, recording and affectations targeting a person in presence of material power and information disparity.

Oops about judge dear critically

The old saying that I say: “that which you hold very dear you judge very critically.”

But I just watched the first two volumes of Disney Family Sing-Along, and there’s not any Chinese artists here either… and Disney is certainly unarguably the definitive entity for story-telling, thought-inspiring, and in 4 years, multi-centennial, money-making media giga-conglomerate.

I cannot count the number of times I wrote about Star Trek not having any Chinese resembling Asian people in the future.

The one Chinese character they do have has misspelled name, her family name should be Hua not Fa. I wonder where Disney gets their history? From Hun-speak???!!

Star Trek still has another 50 years to exceed this, and I am confident it will!

The Hesitation

Suppose I want my chatbot to be conservative in its learning, what are the ways we control that? There is dropout, and weight decay, and normalization. One idea was to find a way for it to learn and then sleep for a while before learning again. If we look at the gradient of such a function, it would look like 1+ cos(x) :

1 + cos(x)

This gradient is motivated by the want of rest period, when the input passes a certain periodic magnitude the progress of gradient based optimizer is gradually slowed down(but still pointed towards the same direction.) After the sleep, the function wants to progress fast to make up for the time spent sleeping, so the steps are bigger. A bit of manipulation of that expression produces the function with that gradient function x+sin(x)

x + sin(x)

This addition of a hesitation can be used as a foreactivation (defined in previous FAM entries). Or in fact the hesitation layer can be placed any where a dropout is normally used.

A certain amount of experimentation is required to inject useful amount of randomization. This layer is particularly easy to instantiate after units that have known scaling, such as sigmoidal activations, softmax, batchnorm, and others. One formula in particular is amplitude. For \alpha \in (0, 1] The hesitation layer H_\alpha(t) = t + \alpha sin (2 \pi t)/{2\pi} makes it possible to adjust the flat part of the sleep cycle. Here is \alpha = 0.5 in blue next to the original:

H_{\alpha=0.5}(t) = t + \alpha sin (2 \pi t)/{2\pi}

More work is needed to establish the precise effect this layer has different types of optimizers. For optimizers like Adam, the added variability would normally increase the noise of the gradients passing through the layer thereby effecting a reduction the learning rate. For \alpha>1 the hesitation layer becomes non-monotonic, but since Adam accumulates gradients, the gradient in the “wrong” direction will slow the progress of optimization more significantly than smaller \alpha’s. It will not necessarily produce an unrecoverable valley of local minimum. For \alpha \in (0, 1) this layer will not introduce new univariate local minimums or saddles to the optimization it is being added to. With randomization, the units will sleep at different times giving other paths of gradient that are not sleeping a chance to explore their potential to improve.

Another direction to explore is learnable sleep cycles in the form of H_{\alpha\beta}=x + \alpha sin(2 \pi \beta x)/{2 \pi \beta} . Where \alpha \beta are either a single scalar or properly sized tensor for element-wise application. Generally the adjustment of \alpha \beta will be for quicker progress towards the direction of underlying gradients.

Wdyt?

Ps one can work out the gradient H_{\alpha}(f(x))= f(x) + \alpha sin(f(x)) . Take the derivative wrt x. \partial H_{\alpha}(f(x)) / \partial x= (1+\alpha sin(f(x))\partial f(x)/ \partial x. So you see the gradient varies between [1-\alpha, 1+\alpha] times of f(x)’s gradients.

Transactional UBI

Maybe we should be paid not for “being nice citizens” but in quantifiable ways. For example, the government should pay us for the act of voting. This act divulges our preferences and intentions in a most intimate way, and it seems there is permanent record of our votes as well. would it not make sense to pay citizens to vote ?

This is similar to Andrew Yang’s idea of giving everyone money($100) to donate to political campaigns. The idea makes sense. The idea also enhances our Capitalism, it strengthens capitalism by making it even more integral part of our political system.

The idea can be extended further so that the entirety of the UBI is not a dividend for being a good citizen, it can be a payment for our efforts to perform political thoughts and actions: MATH, make American think about their politicians more and make them act, for money.

Of course, there could be problems. One may argue that if two candidates are running and they both suck! Everyone may just write their own children in for their choice. But of course, any good red blooded American will recognize that as a Socialist anti-free-market uncompetitive argument: if there are two sucky candidates, a third will rise and triumph over them in America: in a free world, you cannot be stuck with two really really bad candidates. (Can it happen? For several election cycles? Consecutively ?)

It comes down to a redefinition of our relationship with our government, what, exactly, did we agree to in our social contract ? what are the axioms of our constitution? Can we perform object-oriented analysis of the constitution? Can we restate it using domain driven design? Can we apply what we know about organizational behaviors, modern psychology and cognitive psychology, can we put our knowledge of these to an analysis to revamp our constitution?! Can we use our knowledge of information, and again here I advocate my idea of formally recognizing information property as a different type of property and use property law to regulate it. Can we put that in the constitution using our newly acquired knowledge about the science of information? Can we write our awareness of our environment into our constitution? Can the land of the free and home of the brave also by definition preserve the land and home?

And as all blog entries must discuss in 2020, what if an AI can write this formalized and rigorously designed constitution better than us? What then? Can we demand that a test for suitability of an AI for us is that our natural actions largely follow the new agreement?

So in summation, I feel that we should rewrite our constitution to inject new knowledge and remove old biases. We can implement UBI in a transactional sense, that citizens are paid for their political services such as: organizing or attending political rallies, public participation in political discourse, supporting political candidates formally in campaigns and in votes. For these service, the government can pay its citizens money.

P.s. and honestly, the governments do need to have a bit more of perspective. A huge fine on a tax payment 12 minutes past midnight because their stupid website didn’t load, this is just not right. How about we give the government a bit of their own medicine and fine it every time mail arrives late or roads have pot holes or police fails to protect citizen? Some times, people who work for the people in the government acts more like they work against the people. Case in point, when traffic patrol increases during periods when police departments have funding shortage, it is a great demonstration of ingenuity to keep something great going, but it also betrays the trust of citizens that the government serve the people. UBI is a way to ascertain that we establish a canon of reverse financial flow available to all equally.

I should also mention another idea promulgated here by the FAMx blog. We need to establish a fine on the government for intentional acts that violate our civil liberties. Suppose we eventually arrive at the agreement that privacy is a fundamental human right, and that the government chose to violate a certain person’s privacy for a purported higher purpose, and suppose that it is found the purpose was not legal or effective, that the violation of privacy right is automatically remedied by cash payments through the same channel that pays UBI. If FBI reads my private email for suspicion of some crime, and the FBI becomes aware that I didn’t commit it, then I should be paid money—automatically. This type of penalty on the government will ultimately encourage it to operate efficiently and accurately. Systematic payments, as opposed to incidental ones where some body finds the wherewithal to sue the government for violations and succeed in being awarded remedy, will help those who choose to be servants of the public to do it well. And that is fair. It is fine grained check and balance for our country, for our world, for our posterities, we must advance.

Permanent record

I would rate this FAMX.1, I’m sure I will achieve that in the limit…

Been blasting through Snowden’s book on audible. I have to say that my previous misgivings about lack of opportunity to achieve greatness like Snowden is completely wrong. The first two or three chapters reads like my childhood, minus the link to the Mayflower and familial connection to the military. I mean, down to the publications and games that I were exposed to growing up in Pennsylvania, just north of Maryland where he grew up. I can find my own stupid posts on the internet made from a dial-up BBS too! Many this book speaks to me in so many tones, and some of it sound like myself explaining things.

Anyways, one revelation is particularly interesting. It seems that almost all recruiting agencies are run by American spoooks! This explains so many well timed emails that can float above all the spam, that one came when your fat finger accidentally hit the wrong button and traded 10 TSLA options the wrong direction instead of 1(can a finger really be that fat?) twice, or that LinkedIn alert that pop just as you find the stupidest and most embarrassing bug in your own side hustle code(or main project at work), or that email offering of a good package when you have a particularly intolerable rash without insurance, that email that come when you experience domestic strife at the worst!

THIS is WHY! They, the recruiters, have special access to “the system” the likes of post-911 Snowden built! Of course they know exactly when you are vulnerable! That’s what the spy’s computer systems were made for, finding people’s weaknesses. The fact that these consultants take advantage of the system to target you when you are most vulnerable so they can make commission is a little bit annoying—mainly you kind of are now perpetually embarrassed at everything you do, because you know they are watching! Peed your pants? Hit your child? Hit another car and drove away? Omg, the things that can happen when no one is looking.

Of course, I shouldn’t complain, almost all my jobs in the last few decades were from recruiters. Kept me busy. But for people who knows my work history, the profitability of those jobs were not as much as the jobs that did not come from recruiter. But I don’t want to sound ungrateful. They do serve a purpose and especially in your time of need. One has to get over the way it all happens and who now can see everything you do.