Friday, April 19, 2024

More Than the Sum of the Parts

 I had a chat with a student the other day about how to reconcile emerging understanding of the cognitive processes involved in reading with the assessment of reading in educational and other contexts. Thanks to relatively recent technological interventions such as eye-tracking machines and not-so-recent theoretical concepts such as working memory, the research literature is replete with examples of how slight changes to the context (e.g., different font size) can alter processing and how there are complex interactions between the context and the cognitive profiles of the learner (e.g., vocabulary size, purpose for reading, working memory size). The student was pondering whether we need to "control for" these various individual and contextual differences in our educational assessments. 

The answer is not straight-forward. Much of the challenge is definitional -- what do we mean by "assess," by "reading," by "control for," etc.? These words are doing a lot of work and need to be unpacked. 

Even at a relatively simplistic level, our terms are shorthand for a whole slew of different things. When we talk about a "reading test," in a language proficiency context, we usually aren't really talking about how the person reads (i.e., what particular cognitive processes are involved) but rather about that person's comprehension of what they have read. This is why there is no push (as far as I know) for incorporating eye-tracking into the Defense Language Proficiency Test (DLPT), for example. 

But even comprehension is slippery. Outside of the educational testing world, we virtually never show that we have comprehended something we have read by answering multiple choice questions about it. Rather, we take direct action to accomplish an immediate task (such as reading the instructions on a machine and then using the machine), we deploy nuggets of information that we have learned through reading in conversations with others, etc. 

I've been thinking about an analogy with basketball (or any sport, really) that is usually employed when talking about individual differences. (This isn't an original thought.) People have a range of physical attributes (tidal volume of the lungs, vertical leap, height, arm strength, etc.), cognitive attributes (perception, attention, decision-making, reaction time), and background knowledge (understanding of basic positions, familiarity with other team's playbook, knowledge of rules) that we can measure more-or-less in isolation. But being a good basketball player is none of these things; it is an amalgam of all of these things. Good players are those who are able to use their particular collection of abilities in the most effective way to maximize their team's chances of winning the game. 

SLA researchers are like sports researchers -- they are always looking for ways of improving their measurements of the various capabilities that undergird performance. To do so, they try to isolate the specific variables that they are interested in and try to make the case for how that particular variable might help explain variations in performance that we see on the court. The sophistication and precision of the research methods increases over time. 

Language testers, on the other hand, are more like coaches. They need to determine who to start, who to bench, who to cut, etc. They operate at a more global level of "better" versus "worse" players for a given situation. They are aware that the individual difference variables are implicated in the performance of the players, but their primary concern is a player's functional performance ("proficiency") on the court.

 

Monday, December 11, 2023

What I've Been Reading

It's been over six months since my last post, so it seems like a good time to try to push something out. I usually read for ten minutes or so in bed before going to sleep. Although it does take a while to get through longer books this way (I'm almost always reading non-fiction), over the course of a year I do manage to finish a few. That said, I'm usually nodding off as I'm doing this, so I don't have the best retention of the material. To that end, I thought it might be good for my future self to jot down what I've read recently and what the general gist was. (No guarantees on the accuracy of these recollections.)


The Death of an American Jewish Community: A Tragedy of Good Intentions, Hillel Levine and Lawrence Harmon

The World of Patience Gromes: Making and Unmaking a Black Community, Scott C. Davis

Though these two books deal with different geographical locations, they both discuss (among other things) the impact of urban renewal programs in the communities that they were supposed to help. One thing that stands out in both accounts is that, at the end of the day, lots of factors (internal and external) and personalities are involved in any kind of social / political process. Good intentions do not always lead to good outcomes, and what constitutes an acceptable rate of change is very dependent on personal experience and expectations. 

The Dawn of a Mindful Universe, Marcelo Gleiser

I don't remember much about this book, truth be told. One of the themes was that the universe has evolved to create beings like us who are now able to contemplate their own place in it. At the same time, for the average person, the sense of wonder, as well as the understanding that we are not apart from nature but rather a part of nature, has been lost. We need to get back to seeing the Earth that sustains us as a "sacred" entity if we want to remain in the picture. 

Mistakes Were Made (But Not by Me), Carol Tavris and Elliot Aronson

This book talked mainly about how hypocritical humans tend to be. We do everything in our power to maintain the fiction that we are as moral, kind, altruistic, reason-driven, etc. as we see ourselves to be. This can lead to problematic outcomes, such as prosecutors refusing to believe that the new discovered DNA evidence is actually proof of the defendant's innocence -- how could a prosecutor who prides themselves on being truth-seeking and moral, have made such an egregious mistake as helping to send an innocent person to jail?

Revolutionary Mathematics: Artificial Intelligence, Statistics, and the Logic of Capitalism, Justin Joque

This book likely deserves a more detailed reading in a less sleepy state than I gave it. The author is essentially making a Marxist critique of the commodification of knowledge in the service of capital that is possible given the explosion of machine learning and big data. For example, Uber is a transportation company that owns no cars, extracting value from the labor of the driver and the data collected from the passenger. 

Tuesday, May 9, 2023

Of X-Rays and Learning Analytics

 Unless you have been asleep for the past several years, you will have no doubt heard of the machine learning and artificial intelligence revolution. Even before ChatGPT made headlines as having the fastest growing user-base in history, most large organizations were already looking to leverage machine learning and AI models in their business to take advantage of the ever expanding amount of data collected by digital systems -- "Data is the new oil" as they say.

The advances in AI and machine learning in recent years have indeed been quite astounding. With a large enough data set and sufficient computing power, tasks once thought to be the exclusive domain of human experts are now being performed by digital systems with accuracy that matches or even exceeds human benchmarks. Machine learning expert Andrew Ng predicted in 2017 that if you are an expert radiologist (someone who scans X-Ray images for evidence of disease), you are more in danger of being replaced by an artificial system than by your best lab assistant, a sentiment that has been widely echoed in various media outlets ever since. 

Given this state of affairs, it seems obvious that institutions of higher education, if they want to survive in the AI-dominated world of the future, need to embrace the digital revolution, and that educational leaders who continue to cling to outdated modes of interaction will see their institutions falter and perish in the not too distant future. By taking full advantage of the copious amounts of data collected by educational technology systems and judiciously applying machine learning algorithms, educators will be better able to serve students where they are, improve outcomes and retention, and identify potential student mental health issues in a timely fashion leading to more effective intervention. 

Not so fast. While it is true that there is a lot of room for innovative thinking in higher education, one needs to proceed with caution. In a more recent interview in 2021, Andrew Ng admitted that the early exuberance over AI's capabilities was slightly overstated. The issue is not that the models were not good -- the AI models as created did indeed outperform the human baseline  -- but rather that they were not generalizable. Move the trained model to a different hospital, which uses a slightly different X-Ray machine with slightly different resolution, and you are back to square one. (The expert human, of course, has no problem reading X-Rays from different machines.) To be effective, models need to be able to differentiate the signal from the noise. To do this, there needs to be consistency in the signal.

Now think about the incredibly wide range of interactions captured as data in educational technology systems. Think about all of the different ways that instructors can run their courses, that students can interact with the materials, that classroom and interpersonal dynamics can impact communication styles. Even the "signals" that we have in the data are contested ("Grades don't tell you about effort or learning," "Attendance does not mean engagement," etc.). Is it really reasonable to think that algorithms will be able to solve the educational challenges that educational professionals have not been able to solve themselves? 

 

Saturday, October 22, 2022

This Is How I Would Say It

 This is a follow-up to a previous post, where I mused about what counts as "good" and "bad" writing. I thought it might be interesting to try to document some of the things that I find myself explicitly thinking about when trying to write something important enough to warrant more care than just catching typos. I'm sure that such checks are common to a lot of people who write often. 

Keep structures parallel

 Although I don't always catch them initially, I check to make sure that I am using structures that are parallel when creating lists. In other words, instead of this:

Many things can influence your teaching style, such as what you are teaching, the time of day, and are you familiar with the student population.

do something like this:

Many things can influence your teaching style, such as the focus of the lesson, the time of day, and your familiarity with the student population.

 Keeping things parallel helps avoid grammatical weirdness and makes the writing flow a little better.

Avoid ambiguous pronouns

This is still a work in progress for me. Pronouns are incredibly useful in keeping sentences from getting overly clunky by repeating a huge noun phrase over and over:

(Clunky) Students who have learning styles that differ from your teaching style may have trouble keeping up with the class because students who have learning styles that differ from your teaching style will require extra cognitive effort to be successful.  

(Better) Students who have learning styles that differ from your teaching style may have trouble keeping up with the class because they require extra cognitive effort to be successful.* 

 But there are times when they can become ambiguous or even confusing. [Note that the previous sentence could have been, perhaps more clearly, written as: But there are times when pronouns can become ambiguous or even confusing.] Adding additional words to a sentence or moving sentences around during the editing process can sometimes cause the referential integrity to "break" or to be less clear than it was when the text was first written. 

Vary sentence length

Although it is common for academic writing to be quite verbose, slogging through pages and pages of a never ending river of paragraph-long sentences can be exhausting. The text needs to breathe. This doesn't mean that long sentences are bad and should be avoided at all costs. Rather, there should be a variety of sentence lengths scattered throughout the manuscript. Resist the need to "embellish" short sentences with additional words just because they don't seem "long enough" for "academic" writing. Clarity of thought, not density of text, is the goal. 

 Don't reference the entire field (unless warranted)

 This may be something that was more common when I was in graduate school than now, but it is a bit of a pet peeve (perhaps because I can't do it the way others can). It is great to have an encyclopedic command of the literature, but stringing several lines worth of references to every single statement usually just makes the text harder to read. I'm talking about things like this:

Students who have learning styles (Academic, 2007; Bigwig, 2011a; Bigwig, 2011b; Bigwig, 2015a; Bigwig, 2015b; Bigwig, 2015c, Bigwig & Student, 2016; Bigwig & Colleague, 2017;  Bigwig & Mentor, 1983; Colleague, 2020; Colleague, 2022; Mentor, 1962; Obligatory, 1977; Student, 2018; Zeitgeist, 2022; also see Kirkum, 2009) that differ from your teaching style (Celebrity, 2005; Heavyweight, 2009a; Heavyweight, 2009b; Hotshot, 2017; Hotshot & Celebrity, 2019; Somebody, 2013; Somebodyelse, 1992; Kirkum, 2008) may have trouble keeping up with class (Notable, 2003; Notable & Somebody, 2004; Notable & Student, 2005) because they require extra cognitive effort (Hotshot, 1999; Personage, 2000; VIP, 2013; Kirkum, 2009) to be successful.  

 Of course, there may be a legitimate need to refer specifically to many individual studies, such as to counter the argument that there has been little research into idea X, for example. But if you are just trying to prove that you have done the reading, it is probably better to do that in the strength of your argument rather than the size of your bibliography. I prefer to just list an example or two if I want give a nod to a general area of the literature ("...... learning styles (e.g., Academic, 2007; Bigwig, 2011)...."). 

Don't try to cram everything in

This is another tough one. When we were high school students, it seemed like we were always trying figure out how to make our term papers "long enough" to meet whatever requirements the teacher had set. Page limits were like unachievable goals that you would give anything to reach. ("How could anyone ever right ten whole pages about <insert topic here>?")  

Once you are reporting on your own work, however, it is a completely different story. ("How could anyone ask me to boil down my masterwork to a mere ten pages?") This is particularly true if you are trying to create a paper out of a longer manuscript such as a dissertation. Of course, it is possible to publish things piecemeal, but those pieces need to be able to stand on their own. 

One of the best pieces of advice I heard is to keep the literature review extremely short. Your job is to put the study in context, not to recapitulate the history of the field. Get right into the meat of what you did, pulling relevant literature into the methods and results sections as needed. That may not be the appropriate approach for a dissertation itself, but for a journal article or chapter, your reader will likely thank you.

 

 

*The concept of learning style as it is usually discussed does not have much support in the research literature.

Friday, October 21, 2022

I Wouldn't Say It Like That

 I saw a presentation by Chelsea Troy the other day on the topic of technical debt in software development teams. One of the points she made is that technical debt is not really about "bad" code, but more about the maintainability of the code. Poorly written code is hard to maintain, which is why it can be problematic. But in trying to identify poorly written code that will cause problems, people sometimes conflate the robustness of the code itself with the particular coding style of the developer (i.e., the "that's not how I would have written it" argument).

 That presentation, and the fact that I've been looking at a lot of drafts of academic papers recently, got me thinking about academic writing. How much of our impression of the writing of others is colored by the difference between what they wrote versus our internal "how I would have phrased it" sense of style? I tend to err on the side of accepting what was written if it isn't "wrong" in a technical/grammatical sense or "unclear" (unless I'm a co-author, in which case I might suggest an alternative phrasing), even though there may be many places where I felt I could have written it "better." But where's the line between our idiosyncratic preference for blue when the writer has given us red, versus legitimate feedback on a passage that virtually any other academic would have also found wanting?

I don't have an answer (though Steven Pinker's wonderful book The Sense of Style might). I know that I overuse parenthetical statements in my own writing and have been accused of being too "informal" by some reviewers. I happen to think that too much writing is overly formal when it doesn't need to be. Writing needs to be clear. Sometimes that means being very short and to the point. Other times it may require an extended description with carefully chosen words that precisely delineate the nuanced argument that you are undertaking. (See what I did there?)

I'm not a fan of trying to "academify" writing just for the sake of it. That said, one expects a certain style when reading an academic paper versus a novel or a news story. Although I would be OK with it, I can imagine that some would consider the following sentence too informal for an academic paper (though perhaps not for an academic presentation):

There are as many teaching styles as there are teachers.

One could rewrite the same sentiment in a slightly more "elevated" style:

There are as many styles of teaching as there are practitioners of the craft.

Whether the second sentence is an improvement over the first likely depends on your tolerance for informality in academic writing, as I can imagine many feeling that the first is too pedestrian to be called "well-written." But is it "bad writing" such that it needs to be "fixed"? I'm not sure.

How about an extreme version:

The variance in the distribution of operationalizations of instructional approaches is isomorphic to the variance in the distribution of instructional practitioners.    

 Unless the author is literally comparing statistical distributions of teaching styles and teachers, I would argue that this version is further from "good writing" than the first. It is needlessly opaque. In other words, I wouldn't say it like that.


Sunday, March 6, 2022

Pubsub Crawl

Today was another foray into Google Cloud Functions. This time, my goal was to begin to string things together using Google Pub/Sub. This type of approach forms the backbone of modern "serverless" workflows. 

My final use case requires hitting an API (with the appropriate credentials), retrieving a list of file URLs, and downloading those files to a cloud storage location. Because my brain is not as agile as it was when I was younger and I can't hold too many things in mind at once, I like to break things down into smaller chunks to help with troubleshooting. (This is probably a good practice regardless of age.) Previously, I had been interacting with things via gcloud commands in the CLI, but I broke down and decided to use the console for this bit.

My first hurdle was hitting an API with credentials. When experimenting with cloud functions before, I was always using the –allow-unauthenticated flag, which is really not good practice. I spent a bit of time trying to figure out the most secure way to do things, but ended up going down lots of rabbit holes in the Google's IAM documentation. At the end of the day, it seemed like creating a service account and requiring authentication seemed like the safest bet.
 
By default, Google Cloud Functions use the App Engine default service account, which has an "Editor" role in the project. This is considered a "primitive" role (along with "Owner" and "Viewer") and is not as secure as using more granular permissions. Because I knew that I would need to invoke the function, send pub/sub messages, and access an API key stored in the Google Secrets Manager, I created a new service account with just those permissions. This account will be linked to the Cloud Function.
 
Previously, I had been using the fake data API at http//:jsonplaceholder.typicode.com for practice. That's a great resource, but doesn't require authentication. For that, I turned to https://www.alphavantage.co/, a site that allows you to create an access token for their stock tracker. One can receive stock information by hitting an http endpoint with a stock symbol and the access token. 
 
I created key/value pair in the Google Secret Manager to hold the token, and then spent a while trying to get everything to work, following some of the sample scripts in the Google documentation (https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets). My first bare-bones function literally just tried to return the secret value. Once I could grab the apikey value from a function, I rewrote the function to iterate through a list of stock symbols and create URL strings that incorporate the stock symbol and apikey. 

The next step was to create a pubsub topic and subscriptions, which I did through the console interface. The idea is that the URLs I had just created could be sent as pubsub messages to other cloud functions that would do the actual downloading. Although creating the topic and subscriptions was relatively straight-forward, it took 15 versions of the cloud function script to finally get things working. At least half of the revisions were due to typos and/or forgetting to import a package, with the rest being logical errors or variable issues. 
 
So, now I had a cloud function that could retrieve a stored secret, create appropriately formatted URLs, and send them to a pubsub topic as individual messages. The next step is to create a cloud function that is triggered by those messages and downloads the files. 
 
But that's a task for another day.
 

Saturday, March 5, 2022

How to (Not) Function in the Cloud

I spent a bit of time today poking around with Google Cloud Functions. The idea is very similar to AWS Lambda -- both tools allow you to run small, single purpose Python (or other) scripts in a serverless environment, avoiding the overhead of spinning up a compute instance, installing the appropriate software, configuring access, etc. 

I first worked through the "Hello World" tutorial, which was essentially a function that would return "Hello <users name>!" or "Hello world!" message when the associated http endpoint was hit with or without a "name=<user name>" argument in the http request. That went fairly smoothly, though I try to force myself to type rather than copy/paste code when following tutorials, so there were a good deal of errors due to typos the first few tries.

But, like so many other things, there is usually a huge gap between the "Hello world" example and anything even somewhat approaching a real use case. This may be unavoidable given how many moving pieces there are in any "real" cloud deployment. 

Because my eventual use case was to hit an API and download some data, I decided to tweak the "Hello World" program bit by bit to get closer to that. Luckily, there is a wonderful "fake api" available at http://jsonplaceholder.typicode.com/ which is great for testing. 

It took a good hour of trial and error (and fixing more typos) to figure out which part of the sample "Hello World" code was just part of the sample script and which was needed as part of the Cloud Function deployment. (It turns out that there wasn't much "boilerplate" stuff needed.) It also took a while to realize that some Python packages that I needed weren't part of the standard library (and had to be specified in an associated requirements.txt file), while others were, and putting them in the requirements.txt file confused things. 

I was working from the command line to deploy the scripts, and making changes to them in a text editor. It takes about ~2 min to deploy the script after making changes, and there were many times when I forgot to save the most recent changes before redeploying, confusing myself in the process when things didn't work as anticipated. 

Luckily, I eventually realized that there is a good deal of logging that the service provides through the logs explorer (or through a gcloud command), which greatly improved my troubleshooting process. I think it took me 11 deployments to create a simple function that would hit the fake api and pull out the fake user names from the response json.