Friday, March 13, 2026
Home Blog Page 119

Why a tool-using cow might change how we see cattle

0


Veronika the cow is the primary recorded non-primate mammal to display versatile, multi-purpose software use

Antonio J. Osuna Mascaró

Just a few years in the past, throughout a taxi experience, the driving force described to me how a pig had reworked his life. A childhood with canines taught him what to anticipate from animals, but he was unprepared for the pig he had taken in as a favour.

The person instructed me how he had rigged a string-and-bell system by the door so the animals might sign after they wished to go exterior. Each the canines and pig discovered to do that, however the pig took it a step additional: she started ringing the bell to alert the person when a canine was exterior ready to get again in. He had many examples like this, instructed with satisfaction and affection. On the finish of our dialog, I requested whether or not these experiences had modified his meals preferences. They’d: he not eats pork.

The taxi driver’s expertise mirrors a rising development in how we examine the psychological lives of different species. For a very long time, when scientists seemed for cognitive traits corresponding to our personal, they targeted virtually completely on non-human primates or the “feathered apes” – intelligent birds corresponding to parrots and crows. Extra not too long ago, researchers have expanded their focus to incorporate a way more numerous array of species, corresponding to bees, octopuses and crocodiles.

Consistent with this development, a brand new examine by Antonio Osuna-Mascaró and Alice Auersperg, each on the College of Veterinary Medication Vienna in Austria, examines the cognitive capacities of an animal we regularly overlook: the cow. Veronika, a pet cow (Bos taurus), expertly wields a brush to scratch herself. She makes use of the bristled finish to scratch her again however then flips the software to make use of the smoother stick finish for her extra delicate underside.

The researchers describe this as the primary recorded occasion of versatile, multi-purpose software use in a non-primate mammal. What does this software use reveal in regards to the minds of cows, and can it change how we deal with them?

Broadly outlined, software use is the act of manipulating an object in order that its movement instantly achieves a purpose. This definition excludes behaviours corresponding to nest constructing or searching for cowl underground; whereas supplies are moved to assemble a nest, the objects perform as a static construction as soon as in place. In software use, the motion itself is the mechanism of success – whether or not this entails utilizing a rock to crack a nut or wiggling a twig to fish termites from a mound.

Students as soon as thought software use was a uniquely human trait. Jane Goodall modified this within the Nineteen Sixties when she first noticed a chimpanzee she had named David Greybeard fashioning and utilizing a software for termite fishing. A long time later, software use has been found in sudden corners of the animal kingdom.

Doodlebugs, the larvae of antlions, throw sand at prey, whereas sure digger wasps use pebbles to tamp down their burrows. Nonetheless, these are extremely specialised behaviours that emerged by means of tens of millions of years of evolution. The cognition underlying these stereotyped actions is totally different from the versatile software use that emerges spontaneously in some animals to resolve an issue. Veronika’s use of the broom falls into this latter class.

Why a tool-using cow might change how we see cattle

Veronika makes use of totally different ends of the broom to scratch totally different components of her physique

Antonio J. Osuna Mascaró

Veronika was by no means taught to make use of instruments. This behaviour emerged spontaneously, beginning with the usage of small twigs when she was younger and progressing to the versatile deployment of a multi-purpose broom.

Her behaviour means that she has what the psychologist Josep Name identifies because the three substances of a inventive software consumer. First, she gathers info by studying the bodily properties of objects. Second, she combines this data to resolve issues, recognising {that a} inflexible object can attain an itch that’s in any other case inaccessible. Lastly, she has a propensity to control objects. This trait is vital as a result of bodily capability alone is just not sufficient. Whereas squirrel monkeys and capuchin monkeys have related palms, solely the latter is disposed to control objects.

Will studying extra in regards to the minds of cows and different livestock change how we deal with them? Analysis by psychologists means that it might. In a single examine, when requested to fee the psychological capacities and edibility of assorted animals, contributors tended to fee these with much less of a thoughts as extra edible and people with extra of a thoughts as much less edible. In one other examine, contributors had been launched to a species referred to as Bennett’s tree kangaroo. Those that had been instructed the animal was a meals supply seen it as being much less able to struggling and fewer worthy of ethical concern than those that had been instructed the animal lived within the wild.

The way in which we deal with animals is strongly correlated to the minds we consider they possess. Veronika’s story is probably going the primary of many to problem our notion of “simple-minded” livestock. But, for this data to be transformative, we should handle our personal cognitive dissonance. Denying that animals have minds protects us from the truth of how we deal with them. It’s simpler to disregard a thoughts than it’s to respect one.

Marta Halina is a professor of philosophy of science on the College of Cambridge

Matters:

Agentic Workflows: Reworking Community Operations with AI-Powered Automation

0


IT groups at the moment are sometimes overwhelmed by repetitive routine duties which are each time-intensive and prone to errors. Community operations are more and more complicated and fragmented, much more so in case your community has a number of controllers. This complexity results in wasted time, operational inefficiencies, and challenges in scaling. In a world the place velocity and precision outline success, conventional automation instruments usually fall brief, missing the intelligence and suppleness to proactively automate throughout multidomain environments. On prime of this, many community operators don’t have the time or need to study the particular syntax of automation instruments like Python or Ansible.

Enter Cisco Agentic Workflows, our free-to-use automation instrument built-in within the Meraki dashboard. To make use of Workflows, you do not want to be a present Meraki buyer. Even in the event you don’t have any Meraki gadgets or licenses, Cisco clients can create a Meraki account and entry Workflows to start automating different Cisco domains like Catalyst Heart, Catalyst SD-WAN, or ISE. Workflows might help tackle the challenges of NetOps complexity by offering AI-driven, easy low/no-code automation that permits IT groups to free themselves from routine duties, cut back handbook errors, and speed up community administration with predictable, repeatable outcomes.

Let’s take a more in-depth take a look at how Agentic Workflows delivers worth.

Hit the bottom operating with Workflows

Agentic Workflows is definitely accessible within the “Automation” tab of your Meraki dashboard. You have to be a full group administrator to make use of Workflows, however extra granular, role-based entry management is coming quickly.

Left sidebar menu shows 'Workspace' as the selected option under 'Workflows' category within 'Automation.' Interface shows table with Display Name, Description, and Categories as row headers, with details below.
Determine 1: Accessing Workflows in Meraki dashboard

 

The Workflows Change accommodates premade automations which were launched or accepted by Cisco engineers and content material suppliers and designed to resolve widespread use circumstances. These automations might be run as is or simply custom-made within the drag-and-drop workflow editor.

Left sidebar menu shows 'Exchange' as the selected option under 'Workflows' category. Interface titled 'Popular' displaying four workflow cards. Left sidebar menu shows 'Exchange' as the selected option under 'Workflows' category. Interface titled 'Popular' displaying four workflow cards.
Determine 2: Workflows Change

The Workflows Editor is a visible, easy, drag-and-drop interface, which makes creating or modifying workflows straightforward, even in the event you don’t have any coding expertise. You should use a mixture of prebuilt actions (that correspond to API calls), logic actions, and even different workflows. There’s additionally help for Cisco integrations, third-party instruments, and AI-driven options.

Cisco Meraki workflow builder interface showing a Unified Wireless Network Service Deployment flowchart with parallel paths for Meraki and Catalyst Center deployment and AI analysis.Cisco Meraki workflow builder interface showing a Unified Wireless Network Service Deployment flowchart with parallel paths for Meraki and Catalyst Center deployment and AI analysis.
Determine 3: Workflows Editor

Not solely are you able to run your automations manually within the dashboard, you too can set off them utilizing webhooks, a schedule, or the Cisco AI Assistant. That is the place issues get much more thrilling: As a substitute of asking the AI Assistant for assist, you possibly can ask it for an consequence. The assistant will suggest an acceptable workflow and summarize the steps. Collectively, they ship deterministic community automation, guaranteeing predictable and repeatable outcomes each time.

With Agentic Workflows and the Cisco AI Assistant, that is the way forward for community operations: shifting from looking for solutions to easily asking for outcomes.

Watch a fast demo on how one can rapidly arrange a safe wi-fi community with ISE utilizing Agentic Workflows and Cisco AI Assistant.

 

AI Assistant interface displaying a two-step workflow for Unified Wireless Network Service Deployment on Meraki and Catalyst Center, requesting user confirmation.AI Assistant interface displaying a two-step workflow for Unified Wireless Network Service Deployment on Meraki and Catalyst Center, requesting user confirmation.
Determine 4: Asking Cisco AI Assistant to seek out and execute a workflow

With Agentic Workflows, you possibly can embed highly effective AI reasoning into any automation. Ship information and customized prompts to an AI system and unlock clever automation equivalent to:

  • Information parsing and transformation: Extract, convert, and arrange information seamlessly.
  • Summarization and evaluation: Immediately generate insights and actionable suggestions.
  • Adaptive actions: Let AI resolve and execute subsequent steps—a foundational step towards AgenticOps.
Workflow diagram for Unified Wireless Network Service Deployment showing parallel Meraki and Catalyst Center deployment paths and an LLM prompt configuration sidebar.Workflow diagram for Unified Wireless Network Service Deployment showing parallel Meraki and Catalyst Center deployment paths and an LLM prompt configuration sidebar.
Determine 5: Including an LLM immediate to a workflow

See it in motion right here: AI LLM Actions in Workflows video

Able to get began?

Deploying Agentic Workflows is a breeze. For easy directions on every little thing from creating your first workflow or leveraging variables and loops to triggering workflows with webhooks and utilizing superior AI actions, discover the coaching playlist and change into an Agentic Workflows professional. There’s additionally a Cisco Group the place you possibly can ask questions in the event you want further assist.

Say goodbye to repetitive handbook duties. Say hi there to AI-powered community automation. Agentic Workflows is offered at the moment as a free-to-use instrument within the Meraki dashboard.

 

Get began with Agentic Workflows
at the moment within the Meraki dashboard.

Posit AI Weblog: Please enable me to introduce myself: Torch for R


Final January at rstudio::conf, in that distant previous when conferences nonetheless used to happen at some bodily location, my colleague Daniel gave a chat introducing new options and ongoing improvement within the tensorflow ecosystem. Within the Q&A component, he was requested one thing surprising: Had been we going to construct help for PyTorch? He hesitated; that was in truth the plan, and he had already performed round with natively implementing torch tensors at a previous time, however he was not utterly sure how nicely “it” would work.

“It,” that’s an implementation which doesn’t bind to Python Torch, that means, we don’t set up the PyTorch wheel and import it through reticulate. As an alternative, we delegate to the underlying C++ library libtorch for tensor computations and automated differentiation, whereas neural community options – layers, activations, optimizers – are applied immediately in R. Eradicating the middleman has not less than two advantages: For one, the leaner software program stack means fewer doable issues in set up and fewer locations to look when troubleshooting. Secondly, by its non-dependence on Python, torch doesn’t require customers to put in and keep an appropriate Python atmosphere. Relying on working system and context, this could make an infinite distinction: For instance, in lots of organizations staff aren’t allowed to govern privileged software program installations on their laptops.

So why did Daniel hesitate, and, if I recall accurately, give a not-too-conclusive reply? On the one hand, it was not clear whether or not compilation in opposition to libtorch would, on some working methods, pose extreme difficulties. (It did, however difficulties turned out to be surmountable.) On the opposite, the sheer quantity of labor concerned in re-implementing – not all, however a giant quantity of – PyTorch in R appeared intimidating. Right now, there may be nonetheless plenty of work to be carried out (we’ll decide up that thread on the finish), however the primary obstacles have been ovecome, and sufficient elements can be found that torch might be helpful to the R group. Thus, with out additional ado, let’s prepare a neural community.

You’re not at your laptop computer now? Simply observe alongside within the companion pocket book on Colaboratory.

Set up

torch

Putting in torch is as easy as typing

This may detect whether or not you have got CUDA put in, and both obtain the CPU or the GPU model of libtorch. Then, it should set up the R package deal from CRAN. To utilize the very latest options, you’ll be able to set up the event model from GitHub:

devtools::install_github("mlverse/torch")

To shortly examine the set up, and whether or not GPU help works high quality (assuming that there is a CUDA-capable NVidia GPU), create a tensor on the CUDA system:

torch_tensor(1, system = "cuda")
torch_tensor 
 1
[ CUDAFloatType{1} ]

If all our howdy torch instance did was run a community on, say, simulated knowledge, we may cease right here. As we’ll do picture classification, nevertheless, we have to set up one other package deal: torchvision.

torchvision

Whereas torch is the place tensors, community modules, and generic knowledge loading performance stay, datatype-specific capabilities are – or shall be – offered by devoted packages. Generally, these capabilities comprise three forms of issues: datasets, instruments for pre-processing and knowledge loading, and pre-trained fashions.

As of this writing, PyTorch has devoted libraries for 3 area areas: imaginative and prescient, textual content, and audio. In R, we plan to proceed analogously – “plan,” as a result of torchtext and torchaudio are but to be created. Proper now, torchvision is all we’d like:

devtools::install_github("mlverse/torchvision")

And we’re able to load the information.

Knowledge loading and pre-processing

The checklist of imaginative and prescient datasets bundled with PyTorch is lengthy, and so they’re regularly being added to torchvision.

The one we’d like proper now’s obtainable already, and it’s – MNIST? … not fairly: It’s my favourite “MNIST dropin,” Kuzushiji-MNIST (Clanuwat et al. 2018). Like different datasets explicitly created to interchange MNIST, it has ten courses – characters, on this case, depicted as grayscale photos of decision 28x28.

Listed below are the primary 32 characters:

Determine 1: Kuzushiji MNIST.

Dataset

The next code will obtain the information individually for coaching and take a look at units.

train_ds <- kmnist_dataset(
  ".",
  obtain = TRUE,
  prepare = TRUE,
  remodel = transform_to_tensor
)

test_ds <- kmnist_dataset(
  ".",
  obtain = TRUE,
  prepare = FALSE,
  remodel = transform_to_tensor
)

Observe the remodel argument. transform_to_tensor takes a picture and applies two transformations: First, it normalizes the pixels to the vary between 0 and 1. Then, it provides one other dimension in entrance. Why?

Opposite to what you may count on – if till now, you’ve been utilizing keras – the extra dimension is not the batch dimension. Batching shall be taken care of by the dataloader, to be launched subsequent. As an alternative, that is the channels dimension that in torch, is discovered earlier than the width and top dimensions by default.

One factor I’ve discovered to be extraordinarily helpful about torch is how straightforward it’s to examine objects. Although we’re coping with a dataset, a customized object, and never an R array or perhaps a torch tensor, we are able to simply peek at what’s inside. Indexing in torch is 1-based, conforming to the R person’s intuitions. Consequently,

offers us the primary aspect within the dataset, an R checklist of two tensors equivalent to enter and goal, respectively. (We don’t reproduce the output right here, however you’ll be able to see for your self within the pocket book.)

Let’s examine the form of the enter tensor:

[1]  1 28 28

Now that we now have the information, we’d like somebody to feed them to a deep studying mannequin, properly batched and all. In torch, that is the duty of information loaders.

Knowledge loader

Every of the coaching and take a look at units will get their very own knowledge loader:

train_dl <- dataloader(train_ds, batch_size = 32, shuffle = TRUE)
test_dl <- dataloader(test_ds, batch_size = 32)

Once more, torch makes it straightforward to confirm we did the proper factor. To check out the content material of the primary batch, do

train_iter <- train_dl$.iter()
train_iter$.subsequent()

Performance like this may occasionally not appear indispensable when working with a well known dataset, however it should turn into very helpful when plenty of domain-specific pre-processing is required.

Now that we’ve seen the best way to load knowledge, all stipulations are fulfilled for visualizing them. Right here is the code that was used to show the primary batch of characters, above:

par(mfrow = c(4,8), mar = rep(0, 4))
photos <- train_dl$.iter()$.subsequent()[[1]][1:32, 1, , ] 
photos %>%
  purrr::array_tree(1) %>%
  purrr::map(as.raster) %>%
  purrr::iwalk(~{plot(.x)})

We’re able to outline our community – a easy convnet.

Community

If you happen to’ve been utilizing keras customized fashions (or have some expertise with PyTorch), the next method of defining a community might not look too stunning.

You utilize nn_module() to outline an R6 class that may maintain the community’s elements. Its layers are created in initialize(); ahead() describes what occurs in the course of the community’s ahead move. One factor on terminology: In torch, layers are referred to as modules, as are networks. This is smart: The design is actually modular in that any module can be utilized as a part in a bigger one.

web <- nn_module(
  
  "KMNIST-CNN",
  
  initialize = perform() {
    # in_channels, out_channels, kernel_size, stride = 1, padding = 0
    self$conv1 <- nn_conv2d(1, 32, 3)
    self$conv2 <- nn_conv2d(32, 64, 3)
    self$dropout1 <- nn_dropout2d(0.25)
    self$dropout2 <- nn_dropout2d(0.5)
    self$fc1 <- nn_linear(9216, 128)
    self$fc2 <- nn_linear(128, 10)
  },
  
  ahead = perform(x) {
    x %>% 
      self$conv1() %>%
      nnf_relu() %>%
      self$conv2() %>%
      nnf_relu() %>%
      nnf_max_pool2d(2) %>%
      self$dropout1() %>%
      torch_flatten(start_dim = 2) %>%
      self$fc1() %>%
      nnf_relu() %>%
      self$dropout2() %>%
      self$fc2()
  }
)

The layers – apologies: modules – themselves might look acquainted. Unsurprisingly, nn_conv2d() performs two-dimensional convolution; nn_linear() multiplies by a weight matrix and provides a vector of biases. However what are these numbers: nn_linear(128, 10), say?

In torch, as an alternative of the variety of models in a layer, you specify enter and output dimensionalities of the “knowledge” that run by it. Thus, nn_linear(128, 10) has 128 enter connections and outputs 10 values – one for each class. In some instances, resembling this one, specifying dimensions is straightforward – we all know what number of enter edges there are (specifically, the identical because the variety of output edges from the earlier layer), and we all know what number of output values we’d like. However how concerning the earlier module? How will we arrive at 9216 enter connections?

Right here, a little bit of calculation is important. We undergo all actions that occur in ahead() – in the event that they have an effect on shapes, we preserve monitor of the transformation; in the event that they don’t, we ignore them.

So, we begin with enter tensors of form batch_size x 1 x 28 x 28. Then,

  • nn_conv2d(1, 32, 3) , or equivalently, nn_conv2d(in_channels = 1, out_channels = 32, kernel_size = 3),applies a convolution with kernel measurement 3, stride 1 (the default), and no padding (the default). We will seek the advice of the documentation to search for the ensuing output measurement, or simply intuitively cause that with a kernel of measurement 3 and no padding, the picture will shrink by one pixel in every course, leading to a spatial decision of 26 x 26. Per channel, that’s. Thus, the precise output form is batch_size x 32 x 26 x 26 . Subsequent,

  • nnf_relu() applies ReLU activation, on no account touching the form. Subsequent is

  • nn_conv2d(32, 64, 3), one other convolution with zero padding and kernel measurement 3. Output measurement now’s batch_size x 64 x 24 x 24 . Now, the second

  • nnf_relu() once more does nothing to the output form, however

  • nnf_max_pool2d(2) (equivalently: nnf_max_pool2d(kernel_size = 2)) does: It applies max pooling over areas of extension 2 x 2, thus downsizing the output to a format of batch_size x 64 x 12 x 12 . Now,

  • nn_dropout2d(0.25) is a no-op, shape-wise, but when we wish to apply a linear layer later, we have to merge all the channels, top and width axes right into a single dimension. That is carried out in

  • torch_flatten(start_dim = 2). Output form is now batch_size * 9216 , since 64 * 12 * 12 = 9216 . Thus right here we now have the 9216 enter connections fed into the

  • nn_linear(9216, 128) mentioned above. Once more,

  • nnf_relu() and nn_dropout2d(0.5) depart dimensions as they’re, and eventually,

  • nn_linear(128, 10) offers us the specified output scores, one for every of the ten courses.

Now you’ll be pondering, – what if my community is extra sophisticated? Calculations may grow to be fairly cumbersome. Fortunately, with torch’s flexibility, there may be one other method. Since each layer is callable in isolation, we are able to simply … create some pattern knowledge and see what occurs!

Here’s a pattern “picture” – or extra exactly, a one-item batch containing it:

x <- torch_randn(c(1, 1, 28, 28))

What if we name the primary conv2d module on it?

conv1 <- nn_conv2d(1, 32, 3)
conv1(x)$measurement()
[1]  1 32 26 26

Or each conv2d modules?

conv2 <- nn_conv2d(32, 64, 3)
(conv1(x) %>% conv2())$measurement()
[1]  1 64 24 24

And so forth. This is only one instance illustrating how torchs flexibility makes growing neural nets simpler.

Again to the primary thread. We instantiate the mannequin, and we ask torch to allocate its weights (parameters) on the GPU:

mannequin <- web()
mannequin$to(system = "cuda")

We’ll do the identical for the enter and output knowledge – that’s, we’ll transfer them to the GPU. That is carried out within the coaching loop, which we’ll examine subsequent.

Coaching

In torch, when creating an optimizer, we inform it what to function on, specifically, the mannequin’s parameters:

optimizer <- optim_adam(mannequin$parameters)

What concerning the loss perform? For classification with greater than two courses, we use cross entropy, in torch: nnf_cross_entropy(prediction, ground_truth):

# this shall be referred to as for each batch, see coaching loop under
loss <- nnf_cross_entropy(output, b[[2]]$to(system = "cuda"))

Not like categorical cross entropy in keras , which might count on prediction to comprise possibilities, as obtained by making use of a softmax activation, torch’s nnf_cross_entropy() works with the uncooked outputs (the logits). For this reason the community’s final linear layer was not adopted by any activation.

The coaching loop, in truth, is a double one: It loops over epochs and batches. For each batch, it calls the mannequin on the enter, calculates the loss, and has the optimizer replace the weights:

for (epoch in 1:5) {

  l <- c()

  coro::loop(for (b in train_dl) {
    # make sure that every batch's gradient updates are calculated from a recent begin
    optimizer$zero_grad()
    # get mannequin predictions
    output <- mannequin(b[[1]]$to(system = "cuda"))
    # calculate loss
    loss <- nnf_cross_entropy(output, b[[2]]$to(system = "cuda"))
    # calculate gradient
    loss$backward()
    # apply weight updates
    optimizer$step()
    # monitor losses
    l <- c(l, loss$merchandise())
  })

  cat(sprintf("Loss at epoch %d: %3fn", epoch, imply(l)))
}
Loss at epoch 1: 1.795564
Loss at epoch 2: 1.540063
Loss at epoch 3: 1.495343
Loss at epoch 4: 1.461649
Loss at epoch 5: 1.446628

Though there may be much more that may be carried out – calculate metrics or consider efficiency on a validation set, for instance – the above is a typical (if easy) template for a torch coaching loop.

The optimizer-related idioms particularly

optimizer$zero_grad()
# ...
loss$backward()
# ...
optimizer$step()

you’ll preserve encountering time and again.

Lastly, let’s consider mannequin efficiency on the take a look at set.

Analysis

Placing a mannequin in eval mode tells torch not to calculate gradients and carry out backprop in the course of the operations that observe:

We iterate over the take a look at set, maintaining monitor of losses and accuracies obtained on the batches.

test_losses <- c()
complete <- 0
right <- 0

coro::loop(for (b in test_dl) {
  output <- mannequin(b[[1]]$to(system = "cuda"))
  labels <- b[[2]]$to(system = "cuda")
  loss <- nnf_cross_entropy(output, labels)
  test_losses <- c(test_losses, loss$merchandise())
  # torch_max returns a listing, with place 1 containing the values 
  # and place 2 containing the respective indices
  predicted <- torch_max(output$knowledge(), dim = 2)[[2]]
  complete <- complete + labels$measurement(1)
  # add variety of right classifications on this batch to the combination
  right <- right + (predicted == labels)$sum()$merchandise()
})

imply(test_losses)
[1] 1.53784480643349

Right here is imply accuracy, computed as proportion of right classifications:

test_accuracy <-  right/complete
test_accuracy
[1] 0.9449

That’s it for our first torch instance. The place to from right here?

Study

To be taught extra, try our vignettes on the torch web site. To start, you might wish to try these particularly:

You probably have questions, or run into issues, please be happy to ask on GitHub or on the RStudio group discussion board.

We’d like you

We very a lot hope that the R group will discover the brand new performance helpful. However that’s not all. We hope that you just, lots of you, will participate within the journey.

There is not only a complete framework to be constructed, together with many specialised modules, activation features, optimizers and schedulers, with extra of every being added repeatedly, on the Python facet.

There is not only that complete “bag of information varieties” to be taken care of (photos, textual content, audio…), every of which demand their very own pre-processing and data-loading performance. As everybody is aware of from expertise, ease of information preparation is a, maybe the important think about how usable a framework is.

Then, there may be the ever-expanding ecosystem of libraries constructed on high of PyTorch: PySyft and CrypTen for privacy-preserving machine studying, PyTorch Geometric for deep studying on manifolds, and Pyro for probabilistic programming, to call just some.

All that is far more than might be carried out by one or two individuals: We’d like your assist! Contributions are drastically welcomed at completely any scale:

  • Add or enhance documentation, add introductory examples

  • Implement lacking layers (modules), activations, helper features…

  • Implement mannequin architectures

  • Port among the PyTorch ecosystem

One part that must be of particular curiosity to the R group is Torch distributions, the premise for probabilistic computation. This package deal is constructed upon by e.g. the aforementioned Pyro; on the identical time, the distributions that stay there are utilized in probabilistic neural networks or normalizing flows.

To reiterate, participation from the R group is drastically inspired (greater than that – fervently hoped for!). Have enjoyable with torch, and thanks for studying!

Clanuwat, Tarin, Mikel Bober-Irizar, Asanobu Kitamoto, Alex Lamb, Kazuaki Yamamoto, and David Ha. 2018. “Deep Studying for Classical Japanese Literature.” December 3, 2018. https://arxiv.org/abs/cs.CV/1812.01718.



OpenAI’s audio-first {hardware} product may launch this yr, and I am excited

0


OpenAI is increase an arsenal of design expertise because it develops its first {hardware} product. The corporate acquired famed Apple designer Jony Ive’s startup “io” in a $6.5 billion deal final yr. The design lead behind the iPhone and extra, plus his complete crew, is now beneath OpenAI’s roof engaged on an progressive {hardware} product. Now, we’ve a greater thought of when OpenAI really plans to unveil and launch this secretive AI-powered machine.

In an interview with Axios, OpenAI’s Chief International Affairs Officer Chris Lehane stated that the corporate is “on observe” to disclose its first product within the second half of 2026. The affirmation is the closest factor we have gotten to a timeline for OpenAI {hardware}. The corporate, together with its CEO Sam Altman, has been teasing an upcoming AI machine, however particulars have been sparse.



Main overview finds no autism or ADHD danger from being pregnant Tylenol

0


Taking acetaminophen, generally recognized by the model identify Tylenol, throughout being pregnant doesn’t increase the danger of autism, attention-deficit hyperactivity dysfunction (ADHD), or mental incapacity in kids. This conclusion comes from essentially the most complete overview of the proof up to now, printed on January 16 in The Lancet Obstetrics, Gynaecology & Girls’s Well being. The examine was led by researchers at Metropolis St George’s, College of London.

The analysis workforce carried out a scientific overview and meta-analysis drawing on outcomes from 43 beforehand printed research. Their objective was to find out whether or not acetaminophen use throughout being pregnant is secure. The evaluation was prompted by renewed public concern following claims made in September 2025 suggesting that prenatal publicity to acetaminophen might intrude with mind improvement and enhance the probability of autism.

These considerations have been fueled by earlier research that discovered small statistical hyperlinks between acetaminophen use in being pregnant and autism diagnoses. Nevertheless, lots of these research had essential limitations. Some relied on incomplete knowledge, whereas others did not account for household historical past or genetic components. One main hole was the dearth of comparisons between siblings, which may also help separate the consequences of treatment from inherited traits and shared environments.

Why Sibling Comparisons Matter

To handle these weaknesses, the researchers centered on the highest-quality proof accessible. They in contrast pregnancies wherein acetaminophen was used with these wherein it was not, paying explicit consideration to research that examined siblings born to the identical mom. In these sibling comparability research, one little one was uncovered to acetaminophen throughout being pregnant whereas one other was not.

This strategy permits researchers to higher management for shared genetics, family atmosphere, and long-term parental traits. These components are troublesome to completely account for in conventional observational research however can strongly affect little one improvement.

The sibling comparability knowledge have been in depth. Researchers analyzed outcomes for 262,852 kids assessed for autism, 335,255 evaluated for ADHD, and 406,681 assessed for mental incapacity. Throughout these massive teams, there was no proof that acetaminophen use throughout being pregnant elevated the danger of any of those situations compared with pregnancies the place the treatment was not used.

Researchers Clarify the Findings

Professor Asma Khalil, Professor of Obstetrics and Maternal Fetal Drugs at Metropolis St George’s, College of London and Guide Obstetrician, led the examine and addressed why earlier analysis might have raised alarms.

“Our findings counsel that beforehand reported hyperlinks are more likely to be defined by genetic predisposition or different maternal components equivalent to fever or underlying ache, slightly than a direct impact of the paracetamol itself.

“The message is evident — paracetamol stays a secure possibility throughout being pregnant when taken as guided. That is essential as paracetamol is the first-line treatment we suggest for pregnant ladies in ache or with a fever, and so they need to really feel reassured that they nonetheless have a secure possibility to alleviate them of their signs.”

Sturdy High quality Controls and Remaining Limits

Every examine included within the evaluation was evaluated utilizing the High quality In Prognosis Research (QUIPS) device, which assesses a number of elements of examine design to estimate the danger of bias. The dearth of any hyperlink between acetaminophen use in being pregnant and autism, ADHD, or mental incapacity remained constant even when the researchers restricted their evaluation to research rated as low danger of bias (and subsequently highest high quality). The identical reassuring outcomes have been seen in research that adopted kids for greater than 5 years.

The authors additionally famous some limitations. There was not sufficient constant knowledge to look at whether or not dangers differed by trimester of publicity, the intercourse of the child, or how steadily acetaminophen was used. Too few of the present sibling comparability research reported these particulars.

What This Means for Pregnant Sufferers

Total, the findings align with steering from main medical organizations around the globe. The researchers hope this thorough overview will assist ease lingering doubts about utilizing acetaminophen throughout being pregnant. Avoiding therapy for important ache or fever can carry recognized dangers for each the mom and the child, particularly when maternal fever goes untreated. This proof helps the continued use of acetaminophen as a secure possibility when taken as directed.

A number of-equation fashions: Estimation and marginal results utilizing gmm

0


We estimate the common therapy impact (ATE) for an exponential imply mannequin with an endogenous therapy. Now we have a two-step estimation downside the place step one corresponds to the therapy mannequin and the second to the result mannequin. As proven in Utilizing gmm to resolve two-step estimation issues, this may be solved with the generalized technique of moments utilizing gmm.

This continues the collection of posts the place we illustrate methods to acquire appropriate customary errors and marginal results for fashions with a number of steps. Within the earlier posts, we used gsem and mlexp to estimate the parameters of fashions with separable likelihoods. Within the present mannequin, as a result of the therapy is endogenous, the chance for the mannequin is not separable. We display how we are able to use gmm to estimate the parameters in these conditions.

Mannequin

We start by describing the potential-outcome framework used to outline a median therapy impact. For every therapy stage, there may be an end result that we’d observe if an individual had been to obtain that therapy stage. When we have now an end result with an exponential imply and there are two therapy ranges, we are able to specify how the technique of the potential outcomes (y_{0i}) and (y_{1i}) are generated from the regressors ({bf x}_i) and error phrases (epsilon_{0i}) and (epsilon_{1i}),

start{eqnarray*}
E(y_{0i}vert{bf x}_i,epsilon_{0i}) &=& exp({bf x}_i{boldsymbol beta}_0 + beta_{00}+epsilon_{0i}) cr
E(y_{1i}vert{bf x}_i,epsilon_{1i}) &=& exp({bf x}_i{boldsymbol beta}_1 + beta_{10}+epsilon_{1i})
finish{eqnarray*}

the place the parameters (beta_{00}) and (beta_{10}) are fixed intercepts and ({boldsymbol beta}_0) and ({boldsymbol beta}_1) are the coefficients on the regressors ({bf x}_i). Notice that the distribution of the potential outcomes may very well be Poisson, lognormal, or another distribution with an exponential imply.

For therapy (t_i), we observe the result

start{equation}
y_i = (1-t_i) y_{0i} + t_i y_{1i}
nonumber
finish{equation}

So we observe (y_{1i}) below the therapy ((t_{i}=1)) and (y_{0i}) when the therapy is withheld ((t_{i}=0)). The potential-outcome errors (epsilon_{0i}) and (epsilon_{1i}) are correlated with the therapy project.

The therapy (t_i) is set by regressors ({bf z}_i) in a probit regression, such that

start{equation}
t_i = {bf 1}({bf z}_i{boldsymbol psi} + u_i > 0)
nonumber
finish{equation}

the place the therapy error (u_i) is customary regular.

We deal with (t_i) as endogenous by permitting (epsilon_{0i}) and (epsilon_{1i}) to be correlated with (u_i). On this put up we’ll assume that the variances of the unobserved errors are the identical for the management and therapy group and that their correlation with (u_i) can be equal. We assume that the errors are trivariate regular with imply zero and covariance

start{equation}
left[begin{matrix}
sigma^{2} & sigma_{01} & sigma_{t} cr
sigma_{01} & sigma^{2} & sigma_{t} cr
sigma_{t} & sigma_{t} & 1
end{matrix}right]
nonumber
finish{equation}

Remedy impact

We need to determine the therapy impact of (t_i) conditional on ({bf x}_i). That is simply the distinction of the potential-outcome technique of (y_{1i}) and (y_{0i}), conditional on ({bf x}_i).

start{eqnarray*}
E(y_{1i}-y_{0i}vert{bf x}_i) &=& Eleft{E(y_{1i}-y_{0i}vert {bf x}_i, epsilon_{0i}, epsilon_{1i}) vert{bf x}_i proper} cr
&=& Eleft{exp({bf x}_i{boldsymbol beta}_1 + beta_{10}+epsilon_{1i})vert{bf x}_iright} –
Eleft{exp({bf x}_i{boldsymbol beta}_0 + beta_{00}+epsilon_{0i})vert{bf x}_iright}cr
&=& expleft({bf x}_i{boldsymbol beta}_1 + beta_{10}+frac{sigma^2}{2}proper) –
expleft({bf x}_i{boldsymbol beta}_0 + beta_{00}+frac{sigma^2}{2}proper)
cr
finish{eqnarray*}

So we are able to determine the therapy impact of (t_i) at ({bf x}_i) if we all know ({boldsymbol beta}_0), ({boldsymbol beta}_1), (beta_{00}^{star}=beta_{00}+sigma^2 / 2), and (beta_{10}^{star}=beta_{10}+sigma^2 / 2).

The ATE is the margin of the conditional therapy results over the regressors ({bf x}_i).

start{equation}
mbox{ATE} = E(y_{1i} – y_{0i}) = Eleft{E(y_{1i}-y_{0i}vert{bf x}_i)proper} nonumber
finish{equation}

Our estimator will present constant estimates of the mannequin parameters and the ATE.

Estimator

We can not simply run separate regressions for the management and therapy teams and distinction the means to estimate the therapy impact (regression adjustment estimation of the therapy impact). The potential-outcome errors (epsilon_{0i}) and (epsilon_{1i}) are correlated with (t_i), and a regression that ignores this correlation is not going to give constant level estimates.

By modeling the therapy, and utilizing this data in a mannequin for the exponential imply, we are able to account for the correlation and acquire constant level estimates. It is a two-step downside.

Not like as within the earlier posts, we can not carry out the steps independently to get level estimates. We additionally don’t have to make among the parametric assumptions that we made within the earlier posts. In our present mannequin, (y_i) may very well be Poisson, lognormal, or another distribution with an exponential imply.

We are able to specify our mannequin by way of second situations which might be glad by the parameters, quite than strict distributional assumptions that impose a chance. Second situations are anticipated values that specify the mannequin parameters by way of the true moments. The generalized technique of moments (GMM) finds parameter values which might be closest to satisfying the pattern equal of the second situations. For our two-step downside, we are able to estimate the second situations for each steps concurrently, as proven in Utilizing gmm to resolve two-step estimation issues.

The therapy regressor coefficients ({boldsymbol psi}) are recognized by the second situations

start{equation}
Eleft[{bf z}_ileft{t_i – Phileft({bf z}_i{boldsymbol psi}right)right}right] = {bf 0}
nonumber
finish{equation}

This is step one. We use the therapy project mannequin parameters to assist account for the endogeneity of the project and the result errors within the second step, the place we mannequin the exponential imply. The second situations for the second step come from a nonlinear least-squares estimator that fashions (E(y_ivert {bf x}_i,t_i, {bf z}_i)) and are given by

start{equation}
Eleft[ frac{partial Eleft(y_{i}vert {bf x}_i, t_i, z_i right)}{partial {boldsymbol beta}} left{y_i –
Eleft(y_{i}vert {bf x}_i, t_i, z_i right)
right}right]
nonumber
finish{equation}

the place

start{eqnarray*}
Eleft(y_{i}vert {bf x}_i, t_i, z_i proper) &=&
Eleft(t_i y_{1i} + (1-t_i) y_{0i} vert {bf x}_i, t_i, z_i proper) cr
&=& expleft({bf x}_i {boldsymbol beta}_{t_i} + beta_{t_i0}^{star}proper) left{frac{Phi(sigma_{t}+ {bf z}_i{boldsymbol psi)}}{Phi({bf z}_i{boldsymbol psi})}proper}^{t_i} left{frac{1-Phi(sigma_{t}+ {bf z}_i{boldsymbol psi)}}{1-Phi({bf z}_i{boldsymbol psi})}proper}^{1-t_i} cr
finish{eqnarray*}

and ({boldsymbol beta}) is

start{equation}
{boldsymbol beta} = left[begin{matrix} {boldsymbol beta}_{1} cr
{boldsymbol beta}_{0} cr
beta_{00}^{star} cr
beta_{10}^{star} cr
sigma_{t}end{matrix}right]
nonumber
finish{equation}

Extra particulars on the derivation of the conditional imply is offered within the appendix. To acquire constant level estimates, we might discover an estimate of ({boldsymbol psi}) that satisfies the pattern second situations for the primary stage. Then this estimate, (widehat{boldsymbol psi}), could be used rather than ({boldsymbol psi}) within the pattern equal of the second-stage second situations. The estimate (widehat{boldsymbol beta}) could be computed utilizing these situations. With this estimate (widehat{boldsymbol beta}), we might additionally estimate the ATE. The ATE is a operate of the parameters of the second moments and has second situation

start{equation}
Eleft{mbox{ATE} – left(
expleft({bf x}_i{boldsymbol beta}_1 + beta_{10}+frac{sigma^2}{2}proper) –
expleft({bf x}_i{boldsymbol beta}_0 + beta_{00}+frac{sigma^2}{2}proper)
proper)proper}
nonumber
finish{equation}

Our level estimates could be constant, however we would want to regulate the usual errors of the second stage and the therapy impact for the a number of steps of estimation. Sections 10.3 and a pair of.5 of Cameron and Trivedi (2013) and part 18.5 of Wooldridge (2010) describe the present mannequin and the two-step strategy. Utilizing GMM with all phases concurrently would robotically alter the usual errors. We’ll use the command gmm to estimate the primary and second phases along with the therapy impact utilizing GMM.

Estimation

We use the interactive model of gmm to estimate the parameters from simulated information. Our end result has a lognormal distribution. As within the final put up, we’ll use native macros to arrange our work.

We retailer the second equation for the therapy within the macro first. The instrument possibility for first is saved within the native macro first_inst. The second situations are calculated by multiplying the equation by the devices.


. native first (first:t - regular({t: x1 z1 z2 _cons}))

. native first_inst devices(first: x1 z1 z2)

Now, we’ll look in the mean time situations for the second stage. We’ll start with the second situations that correspond to the derivatives for the coefficients and intercepts of the exponential imply. We retailer the second equation within the macro second and the instrument possibility within the macro second_inst. As within the first case, the second situations are calculated by multiplying the equation by the devices. Notice that we specify noconstant and use ibn for t within the devices possibility. We could have separate intercepts for the therapy and management group and no marginal fixed intercept.


. native second (second:(exp(0.t*({y0:x1 x2 x3 _cons})+            
>                          1.t*({y1:x1 x2 x3 _cons}))*            
>                          cond(t,regular({sigmat}+{t:})/regular({t:}),     
>                         (regular(-{sigmat}-{t:}))/(regular(-{t:}))))*     
>                 (y- (exp(0.t*({y0:})+           
>                          1.t*({y1:}))*          
>                          cond(t,regular({sigmat}+{t:})/regular({t:}),     
>                         (regular(-{sigmat}-{t:}))/(regular(-{t:}))))))

. native second_inst devices(second: c.(x1 x2 x3)#i.t ibn.t, noconstant)

Lastly, we present the second situations that correspond to the by-product of the exponential imply for the covariance parameter and the ATE. These are saved in native macros secondt and ate. We don’t have to specify the devices for these second equations; the fixed is the instrument.


. native secondt (secondt:(exp(0.t*({y0:})+1.t*({y1:}))*                   
>                 cond(t,normalden({sigmat}+{t:})/regular({t:}),           
>                 (-normalden(-{sigmat}-{t:}))/(regular(-{t:}))))*         
>                 (y- (exp(0.t*({y0:})+                                   
>                          1.t*({y1:}))*                                  
>                          cond(t,regular({sigmat}+{t:})/regular({t:}),     
>                         (regular(-{sigmat}-{t:}))/(regular(-{t:}))))))

. native ate (ate: {ate} - (exp({y1:})-exp({y0:})))

Now, we use gmm to estimate the parameters of the exponential imply mannequin with an endogenous therapy and its ATE. Our second situations precisely determine the mannequin, so we use one-step estimation and an id preliminary weight matrix.


. matrix I = I(14)

. gmm `first' `second' `secondt' `ate', `first_inst' `second_inst' 
>         onestep winitial(I)

Step 1
Iteration 0:   GMM criterion Q(b) =  .47089834
Iteration 1:   GMM criterion Q(b) =  .01758819
Iteration 2:   GMM criterion Q(b) =  .00464735
Iteration 3:   GMM criterion Q(b) =  .00001541
Iteration 4:   GMM criterion Q(b) =  4.462e-08
Iteration 5:   GMM criterion Q(b) =  2.860e-13

notice: mannequin is strictly recognized

GMM estimation

Variety of parameters =  14
Variety of moments    =  14
Preliminary weight matrix: consumer                       Variety of obs   =     10,000

------------------------------------------------------------------------------
             |               Strong
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
t            |
          x1 |   .4878797    .016208    30.10   0.000     .4561126    .5196469
          z1 |   .3201969   .0197232    16.23   0.000     .2815401    .3588537
          z2 |  -1.023134   .0204703   -49.98   0.000    -1.063255   -.9830127
       _cons |  -.5308057   .0275083   -19.30   0.000    -.5847209   -.4768905
-------------+----------------------------------------------------------------
y0           |
          x1 |   .2897787   .0208321    13.91   0.000     .2489486    .3306088
          x2 |   .2154847   .0182694    11.79   0.000     .1796773    .2512922
          x3 |  -.2993678    .017933   -16.69   0.000    -.3345159   -.2642197
       _cons |  -.1904076   .0288861    -6.59   0.000    -.2470232   -.1337919
-------------+----------------------------------------------------------------
y1           |
          x1 |   .1828499   .0307878     5.94   0.000     .1225069    .2431928
          x2 |   .4439466   .0296223    14.99   0.000     .3858879    .5020052
          x3 |  -.5825316   .0277333   -21.00   0.000    -.6368878   -.5281753
       _cons |  -.6311437   .0308619   -20.45   0.000    -.6916319   -.5706554
-------------+----------------------------------------------------------------
     /sigmat |    .292965   .0338062     8.67   0.000     .2267061     .359224
        /ate |  -.2984529   .0242588   -12.30   0.000    -.3459992   -.2509065
------------------------------------------------------------------------------
Devices for equation first: x1 z1 z2 _cons
Devices for equation second: 0.t#c.x1 1.t#c.x1 0.t#c.x2 1.t#c.x2
    0.t#c.x3 1.t#c.x3 0.t 1.t
Devices for equation secondt: _cons
Devices for equation ate: _cons

We estimate that the ATE is (-)0.3. We’ll evaluate this estimate to the pattern distinction of (y_{1}) and (y_{0}).


. gen diff = y1 - y0

. sum diff

    Variable |        Obs        Imply    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        diff |     10,000   -.3016842    .6915832  -9.553974   5.870782

In our pattern, the common distinction of (y_{1}) and (y_{0}) can be (-)0.3.

Remaining issues

We illustrated methods to use gmm to estimate the parameters of an exponential imply mannequin with an endogenous therapy and its common therapy impact. We display methods to carry out multistep estimation in Stata when the mannequin isn’t separable, and estimation of every step requires data from the earlier step.

Within the earlier posts, we used gsem and mlexp to estimate the parameters of fashions with separable likelihoods. Within the present mannequin, as a result of the therapy is endogenous, the chance for the mannequin is not separable. We demonstrated how we are able to use gmm to estimate the parameters in these conditions.

Appendix 1

The second situations for the exponential imply correspond to the distinction between (y_i) and (E(y_ivert {bf x}_i,t_i, {bf z}_i)). The conditional imply of (y_i) relies on the conditional technique of the unobserved end result errors (epsilon_{0i}) and (epsilon_{1i}). This explicitly fashions the covariance between therapy project and the unobserved end result errors and permits us to estimate the parameters wanted to estimate conditional and common therapy results.

For (j=0,1), the conditional imply of the potential end result (y_{ji}) is
start{eqnarray*}
Eleft(y_{ji}vert {bf x}_i, t_i, z_i proper) &=&
Eleft{ Eleft(y_{ji}vert {bf x}_i, epsilon_{ji}, t_i, z_i proper)vert {bf x}_i, t_i, z_i proper} cr
&=& Eleft{expleft({bf x}_i{boldsymbol beta}_j + beta_{j0}+epsilon_{ji}proper) vert {bf x}_i, t_i, z_i proper} cr
&=&
expleft({bf x}_i{boldsymbol beta}_j + beta_{j0}proper)Eleft{expleft(epsilon_{ji}proper) vert {bf x}_i, t_i, z_i proper}
finish{eqnarray*}

As a result of (epsilon_{ji}) is correlated with (t_i) by way of the unobserved error (u_i), we have now
start{eqnarray*}
epsilon_{ji} = sigma_{t}u_i + c_{ji}
finish{eqnarray*}

the place (c_{ji}) is regular with zero imply and variance (sigma^2-sigma_{t}^2) and unbiased of (u_i).

Terza (1998) derived the conditional expectation of (exp(sigma_{t}u_i)). Utilizing his outcomes, we acquire
start{eqnarray*}
Eleft(y_{i}vert {bf x}_i, t_i, z_i proper) &=&
Eleft(t_i y_{1i} + (1-t_i) y_{0i} vert {bf x}_i, t_i, z_i proper) cr
&=& expleft({bf x}_i {boldsymbol beta}_{t_i} + beta_{t_i0}^{star}proper) left{frac{Phi(sigma_{t}+ {bf z}_i{boldsymbol psi)}}{Phi({bf z}_i{boldsymbol psi})}proper}^{t_i} left{frac{1-Phi(sigma_{t}+ {bf z}_i{boldsymbol psi)}}{1-Phi({bf z}_i{boldsymbol psi})}proper}^{1-t_i} cr
finish{eqnarray*}

Appendix 2

We simulate information from a lognormal mannequin with an endogenous therapy. The code used to provide the info is given beneath.


. set seed 113432

. set obs 10000
variety of observations (_N) was 0, now 10,000

. // Exogenous regressors
. generate x1 = rnormal()

. generate x2 = rnormal()

. generate x3 = rpoisson(1)

. // Remedy regressors
. generate z1 = ln(rchi2(4))

. generate z2 = rnormal()

. matrix corr = ( 1,  .4, .4     
>                 .4,  1, .4     
>                 .4, .4,  1)

. matrix sds = (.8, .8,1)

. drawnorm e0 e1 u, corr(corr) sd(sds)

. gen t = .5*x1 + .3*z1 - z2 -.5 + u> 0

. gen y0 = exp(.3*x1 + .2*x2 - .3*x3 + -.5 + e0)

. gen y1 = exp(.2*x1 + .4*x2 - .6*x3 + -.9 + e1)

. gen y = 0.t*y0 + 1.t*y1

The potential-outcome errors have totally different variances and correlations. We additionally use totally different coefficients for the management and therapy teams.

References

Cameron, A. C., and P. Okay. Trivedi. 2013. Regression Evaluation of Rely Information. 2nd ed. New York: Cambridge College Press.

Terza, J. V. 1998. Estimating rely information fashions with endogenous switching: Pattern choice and endogenous therapy results. Journal of Econometrics 84: 129–154.

Wooldridge, J. M. 2010. Econometric Evaluation of Cross Part and Panel Information. 2nd ed. Cambridge, MA: MIT Press.



How I Created an AI Comedian Utilizing Gemini 3 and NotebookLM

0


Gemini 3 and NotebookLM are two of my favourite instruments from the Google suite. I exploit them typically for studying, work, and even for breaking down advanced concepts in a easy means. However this time, I wished to do one thing purely enjoyable. Recently, I’ve been seeing AI-generated comics throughout social media. From story writing to visuals and last layouts, all the pieces is created utilizing AI. Curious to see how sensible this actually is, I made a decision to strive it myself. On this weblog, I doc my experiment of making a full comedian utilizing Gemini 3 and NotebookLM from concept to last output. In case you’ve ever questioned how AI comics are made, learn on to see the way it turned out.

Step 1: Get the Story

I might be utilizing Gemini 3 to get the story. Right here’s the immediate I’ve used:

Create a brief shaggy dog story a couple of robotic and a human who’re in love.

Necessities:
The story ought to be not more than 5 comedian pages
Every web page ought to embrace:
A web page quantity
A short scene description (for visuals)
Dialogue or narration appropriate for comedian panels
Tone ought to be emotional, heat, and barely futuristic
Deal with themes of connection, selection, and what it means to be human
Preserve it healthful and honest, not tacky
Ending ought to be bittersweet or hopeful

Type:
Easy, cinematic storytelling
Minimal however significant dialogue
Clear separation between pages
Do NOT exceed 5 pages.

Output:

Discover the complete output right here.

Step 2: Giving the Immediate to NotebookLM

For this job, I might be inserting the story from Gemini in NotebookLM. You ca put it aside as a doc, share hyperlink or simply merely price paste the textual content in NotebookLM pocket book. I went with the third choice in my case. Then, I gave this immediate within the chat:

NotebookLM Prompts

I’m offering you with a brief story/script beneath. Your job is to transform this content material into a comic book format.

Necessities:
Create a comic book storyboard, not prose
Restrict the comedian to a most of 5 pages
For every web page, clearly specify: Web page quantity, Panel breakdown (e.g., Panel 1, Panel 2, and so on.), Visible description for every panel (characters, setting, feelings, actions), Dialogue or narration inside every panel

Preserve the tone in step with the unique content material
Do NOT add new plot factors or characters
Do NOT exceed 5 pages

Additionally Learn: How you can Create Movies Utilizing Nano Banana + Veo 3?

Closing End result

Creating comic using geminis and notebooklm - title
Creating comic using geminis and notebooklm - page 1
Creating comic using geminis and notebooklm - page 2
Creating comic using geminis and notebooklm - page 3
Creating comic using geminis and notebooklm - page 4
Creating comic using geminis and notebooklm - page 5
Creating comic using geminis and notebooklm - page 6
Creating comic using geminis and notebooklm - page 7
Creating comic using geminis and notebooklm - page 8
Creating comic using geminis and notebooklm - page 9
Creating comic using geminis and notebooklm - page 10
Creating comic using geminis and notebooklm - page 11

10 Extra Prompts for Creating Comics

Under are 10 totally detailed story-generation prompts with broader themes starting from youngsters to teenagers to mythology and fantasy. These are story-only prompts, appropriate for Gemini or any LLM, and align properly with comedian creation later.

Kids’s Story: Braveness and Friendship

Create a brief shaggy dog story for youngsters a couple of shy youngster who befriends an uncommon companion (an animal, magical creature, or robotic). The story ought to deal with overcoming worry, studying to talk up, and the facility of friendship. Use easy language, clear feelings, and mild humor. Every scene ought to present a small problem the kid faces and the way their companion helps them develop braver. The ending ought to be heat and reassuring, exhibiting that braveness doesn’t imply being fearless, however attempting anyway.

Kids’s Story: Studying Accountability

Write a brief shaggy dog story a couple of youngster who’s given duty for one thing vital for the primary time, comparable to caring for a pet, guarding a magical object, or serving to a youthful sibling. The story ought to present errors, studying moments, and gradual enchancment. Preserve the tone mild and inspiring. The ending ought to emphasize development, accountability, and delight in doing one thing proper after struggling.

Teen Story: Identification and Belonging

Create a comic book story about an adolescent who feels misplaced in school or of their neighborhood and discovers a hidden expertise, secret world, or sudden position that helps them perceive who they’re. The story ought to discover self-doubt, peer strain, and the will to belong. Present moments of inside battle in addition to quiet victories. The ending ought to be hopeful, exhibiting acceptance of oneself reasonably than exterior validation.

Sci-Fi: Reminiscence and Alternative

Create a comic book story set in a future the place recollections will be edited or erased. The protagonist should resolve whether or not to delete a painful reminiscence or preserve it. The story ought to discover the worth of ache, studying, and emotional authenticity. Preserve the plot grounded and introspective. The ending ought to emphasize private selection and acceptance reasonably than technological perfection.

Mythology: A Take a look at of Character

Create a mythological shaggy dog story the place a human is unknowingly examined by divine beings by on a regular basis conditions reasonably than epic battles. The story ought to present small acts of kindness, honesty, or sacrifice being noticed and judged. The reveal ought to come close to the top, exhibiting that character issues greater than energy or intelligence.

Conclusion

Creating comics with AI is not difficult or intimidating. By utilizing Gemini 3 for story technology and NotebookLM for structuring these tales into comic-ready codecs, your complete course of turns into easy, quick, and surprisingly pleasurable. Gemini helps you deal with concepts and feelings, whereas NotebookLM turns these concepts into clear scenes and panels with out altering the unique story. Collectively, they type a simple workflow for anybody who needs to experiment with AI-generated comics, whether or not for studying, content material creation, or pure enjoyable.

Which comedian are you going to make utilizing AI? Let me know within the remark part beneath!

Often Requested Questions

Q1. Do I would like drawing or design expertise to create AI-generated comics?

A. No. This workflow focuses on story creation and comedian structuring. Visible technology instruments deal with the paintings primarily based on descriptions.

Q2. Can I exploit instruments aside from Gemini 3 for story technology?

A. Sure. Any giant language mannequin able to following structured prompts can be utilized, although outcomes might differ in tone and consistency.

Q3. Why use NotebookLM as an alternative of instantly producing comics?

A. NotebookLM helps convert uncooked tales into clear, structured comedian codecs with panels and scenes, making them simpler to visualise or move to image-generation instruments.

This fall. Are these comics appropriate for various age teams?

A. Sure. The prompts vary from kids’s tales to teen narratives and mythology-inspired themes, permitting you to tailor content material to particular audiences.

Q5. Can this workflow be used for social media or publishing?

A. Completely. Many creators already use related pipelines to generate brief comics for blogs, Instagram carousels, and different platforms.

Howdy, I’m Nitika, a tech-savvy Content material Creator and Marketer. Creativity and studying new issues come naturally to me. I’ve experience in creating result-driven content material methods. I’m properly versed in search engine optimization Administration, Key phrase Operations, Net Content material Writing, Communication, Content material Technique, Enhancing, and Writing.

Login to proceed studying and revel in expert-curated content material.

The right way to Design a Absolutely Streaming Voice Agent with Finish-to-Finish Latency Budgets, Incremental ASR, LLM Streaming, and Actual-Time TTS


On this tutorial, we construct an end-to-end streaming voice agent that mirrors how fashionable low-latency conversational methods function in actual time. We simulate the entire pipeline, from chunked audio enter and streaming speech recognition to incremental language mannequin reasoning and streamed text-to-speech output, whereas explicitly monitoring latency at each stage. By working with strict latency budgets and observing metrics comparable to time to first token and time to first audio, we give attention to the sensible engineering trade-offs that form responsive voice-based person experiences. Take a look at the FULL CODES right here.

import time
import asyncio
import numpy as np
from collections import deque
from dataclasses import dataclass
from typing import Record, AsyncIterator
from enum import Enum
import matplotlib.pyplot as plt


@dataclass
class LatencyMetrics:
   audio_chunk_received: float = 0.0
   asr_started: float = 0.0
   asr_partial: float = 0.0
   asr_complete: float = 0.0
   llm_started: float = 0.0
   llm_first_token: float = 0.0
   llm_complete: float = 0.0
   tts_started: float = 0.0
   tts_first_chunk: float = 0.0
   tts_complete: float = 0.0


   def get_time_to_first_audio(self) -> float:
       return self.tts_first_chunk - self.asr_complete if self.tts_first_chunk and self.asr_complete else 0.0


   def get_total_latency(self) -> float:
       return self.tts_complete - self.audio_chunk_received if self.tts_complete else 0.0


@dataclass
class LatencyBudgets:
   asr_processing: float = 0.1
   asr_finalization: float = 0.3
   llm_first_token: float = 0.5
   llm_token_generation: float = 0.02
   tts_first_chunk: float = 0.2
   tts_chunk_generation: float = 0.05
   time_to_first_audio: float = 1.0


class AgentState(Enum):
   LISTENING = "listening"
   PROCESSING_SPEECH = "processing_speech"
   THINKING = "pondering"
   SPEAKING = "talking"
   INTERRUPTED = "interrupted"

We outline the core knowledge constructions and state representations that permit us to trace latency throughout all the voice pipeline. We formalize timing indicators for ASR, LLM, and TTS to make sure constant measurement throughout all levels. We additionally set up a transparent agent state machine that guides how the system transitions throughout a conversational flip. Take a look at the FULL CODES right here.

class AudioInputStream:
   def __init__(self, sample_rate: int = 16000, chunk_duration_ms: int = 100):
       self.sample_rate = sample_rate
       self.chunk_duration_ms = chunk_duration_ms
       self.chunk_size = int(sample_rate * chunk_duration_ms / 1000)


   async def stream_audio(self, textual content: str) -> AsyncIterator[np.ndarray]:
       chars_per_second = (150 * 5) / 60
       duration_seconds = len(textual content) / chars_per_second
       num_chunks = int(duration_seconds * 1000 / self.chunk_duration_ms)


       for _ in vary(num_chunks):
           chunk = np.random.randn(self.chunk_size).astype(np.float32) * 0.1
           await asyncio.sleep(self.chunk_duration_ms / 1000)
           yield chunk

We simulate real-time audio enter by breaking speech into fixed-duration chunks that arrive asynchronously. We mannequin life like talking charges and streaming conduct to imitate reside microphone enter. We use this stream as the inspiration for testing downstream latency-sensitive parts. Take a look at the FULL CODES right here.

class StreamingASR:
   def __init__(self, latency_budget: float = 0.1):
       self.latency_budget = latency_budget
       self.silence_threshold = 0.5


   async def transcribe_stream(
       self,
       audio_stream: AsyncIterator[np.ndarray],
       ground_truth: str
   ) -> AsyncIterator[tuple[str, bool]]:
       phrases = ground_truth.break up()
       words_transcribed = 0
       silence_duration = 0.0
       chunk_count = 0


       async for chunk in audio_stream:
           chunk_count += 1
           await asyncio.sleep(self.latency_budget)


           if chunk_count % 3 == 0 and words_transcribed < len(phrases):
               words_transcribed += 1
               yield " ".be a part of(phrases[:words_transcribed]), False


           audio_power = np.imply(np.abs(chunk))
           silence_duration = silence_duration + 0.1 if audio_power < 0.05 else 0.0


           if silence_duration >= self.silence_threshold:
               await asyncio.sleep(0.2)
               yield ground_truth, True
               return


       yield ground_truth, True

We implement a streaming ASR module that produces partial transcriptions earlier than emitting a remaining end result. We progressively reveal phrases to mirror how fashionable ASR methods function in actual time. We additionally introduce silence-based finalization to approximate end-of-utterance detection. Take a look at the FULL CODES right here.

class StreamingLLM:
   def __init__(self, time_to_first_token: float = 0.3, tokens_per_second: float = 50):
       self.time_to_first_token = time_to_first_token
       self.tokens_per_second = tokens_per_second


   async def generate_response(self, immediate: str) -> AsyncIterator[str]:
       responses = {
           "howdy": "Whats up! How can I provide help to immediately?",
           "climate": "The climate is sunny with a temperature of 72°F.",
           "time": "The present time is 2:30 PM.",
           "default": "I perceive. Let me provide help to with that."
       }


       response = responses["default"]
       for key in responses:
           if key in immediate.decrease():
               response = responses[key]
               break


       await asyncio.sleep(self.time_to_first_token)


       for phrase in response.break up():
           yield phrase + " "
           await asyncio.sleep(1.0 / self.tokens_per_second)


class StreamingTTS:
   def __init__(self, time_to_first_chunk: float = 0.2, chars_per_second: float = 15):
       self.time_to_first_chunk = time_to_first_chunk
       self.chars_per_second = chars_per_second


   async def synthesize_stream(self, text_stream: AsyncIterator[str]) -> AsyncIterator[np.ndarray]:
       first_chunk = True
       buffer = ""


       async for textual content in text_stream:
           buffer += textual content
           if len(buffer) >= 20 or first_chunk:
               if first_chunk:
                   await asyncio.sleep(self.time_to_first_chunk)
                   first_chunk = False


               length = len(buffer) / self.chars_per_second
               yield np.random.randn(int(16000 * length)).astype(np.float32) * 0.1
               buffer = ""
               await asyncio.sleep(length * 0.5)

On this snippet, we mannequin a streaming language mannequin and a streaming text-to-speech engine working collectively. We generate responses token by token to seize time-to-first-token conduct. We then convert incremental textual content into audio chunks to simulate early and steady speech synthesis. Take a look at the FULL CODES right here.

class StreamingVoiceAgent:
   def __init__(self, latency_budgets: LatencyBudgets):
       self.budgets = latency_budgets
       self.audio_stream = AudioInputStream()
       self.asr = StreamingASR(latency_budgets.asr_processing)
       self.llm = StreamingLLM(
           latency_budgets.llm_first_token,
           1.0 / latency_budgets.llm_token_generation
       )
       self.tts = StreamingTTS(
           latency_budgets.tts_first_chunk,
           1.0 / latency_budgets.tts_chunk_generation
       )
       self.state = AgentState.LISTENING
       self.metrics_history: Record[LatencyMetrics] = []


   async def process_turn(self, user_input: str) -> LatencyMetrics:
       metrics = LatencyMetrics()
       start_time = time.time()


       metrics.audio_chunk_received = time.time() - start_time
       audio_gen = self.audio_stream.stream_audio(user_input)


       metrics.asr_started = time.time() - start_time
       async for textual content, remaining in self.asr.transcribe_stream(audio_gen, user_input):
           if remaining:
               metrics.asr_complete = time.time() - start_time
               transcription = textual content


       metrics.llm_started = time.time() - start_time
       response = ""
       async for token in self.llm.generate_response(transcription):
           if not metrics.llm_first_token:
               metrics.llm_first_token = time.time() - start_time
           response += token


       metrics.llm_complete = time.time() - start_time
       metrics.tts_started = time.time() - start_time


       async def text_stream():
           for phrase in response.break up():
               yield phrase + " "


       async for _ in self.tts.synthesize_stream(text_stream()):
           if not metrics.tts_first_chunk:
               metrics.tts_first_chunk = time.time() - start_time


       metrics.tts_complete = time.time() - start_time
       self.metrics_history.append(metrics)
       return metrics

We orchestrate the total voice agent by wiring audio enter, ASR, LLM, and TTS right into a single asynchronous stream. We document exact timestamps at every transition to compute essential latency metrics. We deal with every person flip as an remoted experiment to allow systematic efficiency evaluation. Take a look at the FULL CODES right here.

async def run_demo():
   budgets = LatencyBudgets(
       asr_processing=0.08,
       llm_first_token=0.3,
       llm_token_generation=0.02,
       tts_first_chunk=0.15,
       time_to_first_audio=0.8
   )


   agent = StreamingVoiceAgent(budgets)


   inputs = [
       "Hello, how are you today?",
       "What's the weather like?",
       "Can you tell me the time?"
   ]


   for textual content in inputs:
       await agent.process_turn(textual content)
       await asyncio.sleep(1)


if __name__ == "__main__":
   asyncio.run(run_demo())

We run all the system throughout a number of conversational turns to watch latency consistency and variance. We apply aggressive latency budgets to emphasize the pipeline underneath life like constraints. We use these runs to validate whether or not the system meets responsiveness targets throughout interactions.

In conclusion, we demonstrated how a totally streaming voice agent will be orchestrated as a single asynchronous pipeline with clear stage boundaries and measurable efficiency ensures. We confirmed that combining partial ASR, token-level LLM streaming, and early-start TTS reduces perceived latency, even when complete computation time stays non-trivial. This strategy helps us purpose systematically about turn-taking, responsiveness, and optimization levers, and it offers a strong basis for extending the system towards real-world deployments utilizing manufacturing ASR, LLM, and TTS fashions.


Take a look at the FULL CODES right here. Additionally, be at liberty to comply with us on Twitter and don’t overlook to affix our 100k+ ML SubReddit and Subscribe to our Publication. Wait! are you on telegram? now you may be a part of us on telegram as nicely.


Asif Razzaq is the CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, Asif is dedicated to harnessing the potential of Synthetic Intelligence for social good. His most up-to-date endeavor is the launch of an Synthetic Intelligence Media Platform, Marktechpost, which stands out for its in-depth protection of machine studying and deep studying information that’s each technically sound and simply comprehensible by a large viewers. The platform boasts of over 2 million month-to-month views, illustrating its recognition amongst audiences.

OnePlus simply made bootloader unlocking riskier than ever

0


TL;DR

  • OnePlus has reportedly added hardware-level Anti-Rollback Safety in current ColorOS updates.
  • Updating to the brand new firmware completely blocks downgrades, customized ROMs, and most unbricking strategies.
  • For those who unlock bootloaders or flash ROMs, keep away from ColorOS builds ending in .500, .501, or .503.
  • The change impacts the OnePlus 13 and OnePlus 15 and will quickly roll out to older units and OxygenOS builds as nicely.

OnePlus has reportedly began making a serious behind-the-scenes change that might completely have an effect on bootloader unlocking, customized ROMs, and even fundamental software program downgrades on its telephones. The corporate had beforehand introduced a brand new system that might restrict bootloader unlocking, and it seems to be prefer it’s lastly beginning to implement it.

Don’t wish to miss the very best from Android Authority?

google preferred source badge dark@2x

In accordance with Droidwin (through XDA Member AdaUnlocked), OnePlus has quietly launched Anti-Rollback Safety (ARB) with ColorOS 16.0.3.500/.501/.503 updates (based mostly on Android 16) on choose units. This isn’t a traditional software program restriction, it’s a hardware-level fuse that will get completely tripped the second you put in one in every of these builds.

What’s ARB and the way does it work?

The blue leather OnePlus 13 lying on a shelf.

Joe Maring / Android Authority

Because the publication explains, ARB works by blowing an e-fuse on the motherboard that updates the machine’s safety model. As soon as tripped, it can’t be reversed by software program. The one means again could be to interchange the motherboard.

ARB is a part of Android’s Verified Boot framework. It was launched to forestall downgrades to older, much less safe firmware. Units from the likes of Xiaomi, POCO, Redmi, Google, and others have used ARB for years. The safety additionally mirrors how Samsung Knox works. For those who unlock the bootloader on Samsung telephones, you find yourself tripping the fuse. Nonetheless, in contrast to ARB-enabled telephones, Samsung’s implementation isn’t so stringent. Samsung blocks the bootloader-unlocking course of, however normally doesn’t hard-brick the telephone should you attempt.

So with ARB on affected OnePlus telephones, you received’t be capable of downgrade to any firmware older than the ARB-enabled construct. Flashing older customized ROMs will even probably trigger an immediate exhausting brick, and conventional unbricking instruments received’t work for the reason that injury could be on the {hardware} stage.

Affected OnePlus units

OnePlus 15 hero image

Mishaal Rahman / Android Authority

Droidwin confirms ARB is already reside on the next units:

  • OnePlus 13 and 13T: ColorOS 16.0.3.501
  • OnePlus 15: ColorOS 16.0.3.503
  • OnePlus Ace 5/Ace 5 Professional: ColorOS 16.0.3.500

The OPPO Discover X8 sequence is taken into account at excessive threat, that means ARB may additionally be reside on telephones within the lineup. In the meantime, the OnePlus 11 and OnePlus 12 might be subsequent in line to be impacted by the brand new system.

It’s necessary to notice that proper now, ARB has solely reportedly appeared on ColorOS. However given OnePlus’ shared codebase, it may additionally arrive on OxygenOS in a future replace.

OnePlus has additionally reportedly eliminated official downgrade packages for the OnePlus 13, that means even beforehand sanctioned rollbacks may now brick units.

For now, should you care about bootloader unlocking or customized ROMs, it’s finest to not set up any replace ending in .500, .501, or .503.

Thanks for being a part of our neighborhood. Learn our Remark Coverage earlier than posting.

Indigenous TikTok star ‘Bush Legend’ is definitely AI-generated, resulting in accusations of ‘digital blackface’

0

The self-described “Bush Legend” on TikTok, Fb and Instagram is rising in reputation.

These brief and sharp movies characteristic an Aboriginal man — typically painted up in ochre, different occasions in an all khaki outfit — as he introduces totally different native animals and information about them. These movies are paired with miscellaneous yidaki (didgeridoo) tunes, together with techno mixes.