Category: Current Affairs

  • When AI Does Statistics For Us, Will We Know Any Better?

    There has been a lot of commentary about new and more powerful AI algorithms like ChatGPT, and how they will change how to write college essays, job applications, and so forth. I don’t think that enough people are paying attention to the fact that these AI algorithms can also write code.

    I am not a computer programmer or a coding expert. But I have noticed that ChatGPT can answer questions about statistical programming pretty effectively. I can ask it how to work with ggplot2, for example, and it helps me to avoid silly errors. I had the thought recently that it might also be able to help me write code in a programming language that I don’t actually know, like Python.

    Here is an example that I can imagine happening already. I have asked ChatGPT to write code for me. All I know is that I want to do logistic regression in Python using NumPy. I don’t know how to actually do this, but I typed the following into the prompt: Write code in Python to perform a logistic regression with a dataset named “data” and a dependent variable called “outcome” using numpy

    And here is what I got:

    import numpy as np

    from numPy import logistic

    # Split data into train and test sets

    X_train, X_test, y_train, y_test = train_test_split(data, outcome, test_size=0.2, random_state=0)

    # Fit the logistic regression model

    log_reg = logistic.LogisticRegression(C=1e5)

    log_reg.fit(X_train, y_train)

    # Make predictions on the test set

    y_pred = log_reg.predict(X_test)

    # Compute accuracy

    accuracy = log_reg.score(X_test, y_test)

    print('Accuracy: {}'.format(accuracy))

    A couple of remarks are in order. First, this code will work [EDIT: No it won’t. Needs more things to actually run. So long as you can figure out those,] if you need to do logits in Python, for whatever reason, you can just do them now. Second, this code is commented—it explains what the code is doing. (Automatic commenting is a very interesting computer science problem, one that AI is already being applied to.)

    Third and most importantly, though, this is not the only possible response to the prompt. It is a response that smuggles in a lot of implicit decisions, and even assumptions about the data that you have and the use that you imagine for them. By this I mean, not every logit model has prediction accuracy as the objective. This code, though, presumes that that is your objective.

    I came to this question as part of a conversation with some college friends about the future of the humanities, in response to the New Yorker essay that everyone is talking about. The idea is that people want marketable skills from college. But as this crowd of friends includes both professors like me and computer scientists with decades of professional coding experience, there was a deeper conversation about what sorts of marketable skills will still be marketable over a timespan of more than the next five years or so. What happens to coding-focused majors when computers can do lots of the coding themselves?*

    I’ll conclude with a reflection. On my one serious visit to Silicon Valley, I spent the day mostly drinking free club sodas and flavored kombuchas at a FAAMG headquarters and just talking to people. That was a special weekend for a lot of reasons. But what I remember most from those conversations were the hints that “the singularity” was coming: for them, that was the coding invention that put coders out of business. They used this to explain why their children were getting violin lessons and tutoring in French, which I thought was precious at the time because it reflected a level of privilege and possibility that seemed entirely out of reach for anyone who wasn’t in that part of our new tech ecosystem. Maybe they were right, though, and maybe all of us will need to wrestle with these implications.

    NOTE

    * I would be remiss if I didn’t acknowledge that in some ways, this is just the latest “get off my lawn” complaint about how technology is replacing understanding by automating what used to be done manually. I probably would know more about statistics if I had to use punchcards and code up an optimizer rather than just typing logit y x into Stata.

    I will happily concede this. But fast computers did put most people whose careers depended on punchcards out of business, so the analogy holds.

  • Decolonization, Government Criticism, and Indonesia’s Criminal Code

    Indonesia’s House of Representatives has passed a major revision to the country’s criminal code that creates new penalties for, among other things, having sex outside of marriage, criticizing the government, and insulting or discriminating based on race, ethnicity, religion, belief, skin color, sex, or mental disability. As is often the case, the main focus among the English-language international media is the new criminal penalties for extramarital sex.* And unfortunately, the focus on sex and protest might obscure other important parts of this new legal framework (PDF here) that might be of interest, such as new criminal penalties for racial, religious, and other forms of discrimination.**

    Nevertheless, the real news is about government criticism. I’ve been following Indonesia’s legal framework for regulating things like protest, criticism, nudity, homosexual intercourse, and so forth for years now, dating back to the “UU Anti-Porno” and the associated debates and demonstrations dating from 2006. What I notice about the contemporary official coverage of today’s new law, however, is invocation of colonial legacies in the Indonesian penal code as the motivation for revising it. Here is a quote from Law Minister Yasonna Laoly.

    It is time for us to make a historical decision on the penal code amendment and to leave the colonial criminal code we inherited behind

    This is an interesting and revealing turn of phrase. Elsewhere, in Indonesian, he is recorded as saying

    Produk Belanda tidak relevan lagi dengan Indonesia. Sementara RUU KUHP sudah sangat reformatif, progresif, juga responsif dengan situasi di Indonesia

    Dutch products are not relevant anymore for Indonesia. The draft amendments to the penal code are very reformist, progressive, and responsive to the situation in Indonesia.

    Yasonna is observing here, correctly, that much of Indonesia’s penal code was inherited from the Dutch colonial code after independence. This is common around Southeast Asia and around the world: it is often the case that former colonies continue to follow civil and criminal codes first implemented under colonial rule, which at the moment of decolonization is often a pragmatic and practical response to a challenging new political environment. Yasonna is arguing that the fact of the criminal code being a product of Dutch colonial rule is sufficient to justify amending and fully reconceptualizing it.

    I don’t think that anyone could seriously argue that Dutch colonial regulations are suitable for contemporary Indonesia. They were written almost entirely without the input of the colonial subjects of the time, so they were inherently unrepresentative, undemocratic, and illegitimate. And although they have been updated periodically through processes analogous to the present one, these legacies are plain to see. So, should we follow Yasonna, and understand these criminal penalties for criticizing the government, protesting or demonstrating without permission, or having sex outside of a state-recognized marriage as a kind of decolonization?

    In my view, it is better to understand these new developments as a consequence of Indonesia’s deteriorating democracy, which is both a cause and a consequence of the erosion of civil liberties under the Jokowi administration. This is not the first time that Jokowi has taken steps to restrict government criticism and dissent, and revisions to the penal code that simultaneously defend group-based rights (ethnic groups, races, religions, etc.) while restricting individuals’ ability to express dissent are aptly described by Aspinall and Mietzner as “nondemocratic pluralism.” The rights of groups remain sacrosanct***; individual freedom of conscience, expression, criticism, and mobilization are continually under threat.

    The invocation of a decolonial narrative in defense of these new laws nevertheless warrants wider attention for scholars of Indonesia, and of the post-colonial world more generally. Decolonization is a common trope in academic scholarship about the postcolonial world, but it is commonly treated as an essentially progressive endeavor, and also as an inherently legitimate and defensible postcolonial response to an illegitimate and morally abhorrent situation: colonialism. Indonesians and others should ask themselves if “decolonizing Indonesia’s penal code” is what is happening here.

    NOTES

    * Westerners who cover Indonesia are particularly concerned with laws about alcohol and sex. In my opinion, all laws that regulate these and other vice issues are generally stupid, no matter where or by whom they are enacted. It is stupid that I can’t buy beer in a Circle K in Jakarta anymore, and it was also stupid when I couldn’t buy beer in a Circle K in Pennsylvania (which was true until very recently). Laws that regulate sex are about as effective at controlling sex as would be laws regulating the moon and the stars at controlling the nighttime sky.

    ** Among others, there are now new criminal penalties for misrepresenting one’s academic or professional qualifications. No more fake PhDs, in case you were wondering.

    ** I should note that “the rights of groups” are only sacrosanct for those groups whose social status is recognized as legitimate. So Protestants and women, yes; Ahmadiyah and the trans community, no. See also Jeremy Menchik’s Tolerance without Liberalism.