Goto

Collaborating Authors

 Personal


Segment Anything

arXiv.org Artificial Intelligence

We introduce the Segment Anything (SA) project: a new task, model, and dataset for image segmentation. Using our efficient model in a data collection loop, we built the largest segmentation dataset to date (by far), with over 1 billion masks on 11M licensed and privacy respecting images. The model is designed and trained to be promptable, so it can transfer zero-shot to new image distributions and tasks. We evaluate its capabilities on numerous tasks and find that its zero-shot performance is impressive -- often competitive with or even superior to prior fully supervised results. We are releasing the Segment Anything Model (SAM) and corresponding dataset (SA-1B) of 1B masks and 11M images at https://segment-anything.com to foster research into foundation models for computer vision.


Pragmatically Appropriate Diversity for Dialogue Evaluation

arXiv.org Artificial Intelligence

Linguistic pragmatics state that a conversation's underlying speech acts can constrain the type of response which is appropriate at each turn in the conversation. When generating dialogue responses, neural dialogue agents struggle to produce diverse responses. Currently, dialogue diversity is assessed using automatic metrics, but the underlying speech acts do not inform these metrics. To remedy this, we propose the notion of Pragmatically Appropriate Diversity, defined as the extent to which a conversation creates and constrains the creation of multiple diverse responses. Using a human-created multi-response dataset, we find significant support for the hypothesis that speech acts provide a signal for the diversity of the set of next responses. Building on this result, we propose a new human evaluation task where creative writers predict the extent to which conversations inspire the creation of multiple diverse responses. Our studies find that writers' judgments align with the Pragmatically Appropriate Diversity of conversations. Our work suggests that expectations for diversity metric scores should vary depending on the speech act.


Catan creator Klaus Teuber has passed away at 70

Engadget

Klaus Teuber, who created the board game sensation Settlers of Catan, has passed away at the age of 70. According to the official Catan website, Teuber died on April 1st after a "brief and severe illness." He is survived by his wife Claudia and their two sons, Guido and Benny, all of which are involved with publisher Catan Studios. It is hard to do justice to how important Catan was (and is) to the board game space. Teuber invented the multiplayer resource-trading game in 1995 and is one of the first European board games to achieve massive success throughout the rest of the world.


Transformer visualization via dictionary learning: contextualized embedding as a linear superposition of transformer factors

arXiv.org Artificial Intelligence

Transformer networks have revolutionized NLP representation learning since they were introduced. Though a great effort has been made to explain the representation in transformers, it is widely recognized that our understanding is not sufficient. One important reason is that there lack enough visualization tools for detailed analysis. In this paper, we propose to use dictionary learning to open up these "black boxes" as linear superpositions of transformer factors. Through visualization, we demonstrate the hierarchical semantic structures captured by the transformer factors, e.g., word-level polysemy disambiguation, sentence-level pattern formation, and long-range dependency. While some of these patterns confirm the conventional prior linguistic knowledge, the rest are relatively unexpected, which may provide new insights. We hope this visualization tool can bring further knowledge and a better understanding of how transformer networks work. The code is available at https://github.com/zeyuyun1/TransformerVis


Introducing `askgpt`: a chat interface that helps you to learn R!

#artificialintelligence

Everyone is talking about AI at the moment. So when I talked to my collogues Mariken and Kasper the other day about how to make teaching R more engaging and how to help students overcome their problems, it is no big surprise that the conversation eventually found it’s way to the large language model GPT-3.5 by OpenAI and the chat interface ChatGPT. It’s advantages for learning R (or any programming languages) are rather obvious: you get help on exactly your path to learning – which is different for everyone of us you can ask the model anything without anxiety about what it might think of you it can answer instantaneously So I got to work implementing a few of the functionalities I wish I had available when I first started with R. The resulting package was just released on CRAN and I wanted to write this post to highlight a few of the way you can use it to make learning or teaching easier. You can install it now like so install.packages("askgpt") Or get the development version: remotes::install_github("JBGruber/askgpt") A Simple Chat Interface Directly in R The main function, askgpt(), is very similar to ChatGPT, only directly in R: library(askgpt) askgpt("Can you explain how functions work in R?") #> Functions in R are a set of pre-defined or user-defined set of instructions that can take inputs, perform specific calculations or operations, and return outputs. Functions can be used to automate repetitive tasks, combine multiple operations into a single step, and create more complex programs. #> #> In R, function definitions can be created using the `function()` keyword. The basic syntax of a function definition in R is as follows: #> #> ``` #> function_name # Function code goes here #> return(output) #> } #> ``` #> #> Here, `function_name` is the name you choose for your function, `argument1`, `argument2`, etc. are the inputs to the function (also called parameters), and `output` is the value that the function returns. #> #> To use a function in R, you simply call it by its name and supply any necessary arguments: #> #> ``` #> function_name(argument1, argument2, ...) #> ``` #> #> R has a large number of built-in functions that perform a wide variety of tasks. For example, the `sum()` function adds up all the values of a given vector, while the `mean()` function calculates the average. #> #> In addition to using pre-defined functions in R, you can also create your own custom functions based on your specific needs. By combining multiple functions and operations in a single custom function, you can create powerful tools for data analysis and modeling. askgpt("How do you make a histogram with ggplot2?") #> To make a histogram with ggplot2, follow these steps: #> #> 1. Load the ggplot2 library using the `library()` function. #> ``` #> library(ggplot2) #> ``` #> #> 2. Prepare your data. Create a vector or data frame that contains the values you want to plot. #> #> 3. Create a ggplot object using the `ggplot()` function. Pass in the name of the data frame as an argument. #> #> ``` #> ggplot(data = your_data_frame) #> ``` #> #> 4. Add a histogram layer to the plot using the `geom_histogram()` function. Pass in the name of the column you want to use for your histogram as the `mapping` argument. #> #> ``` #> ggplot(data = your_data_frame, #> mapping = aes(x = your_column_name)) + #> geom_histogram() #> ``` #> #> 5. Customize the plot as desired using various ggplot2 functions, such as `labs()` for axis labels and titles, `theme()` for plot themes, and `scale_x_continuous()` and `scale_y_continuous()` for adjusting the axis limits and tick marks. #> #> ``` #> ggplot(data = your_data_frame, #> mapping = aes(x = your_column_name)) + #> geom_histogram() + #> labs(x = "X axis label", #> y = "Y axis label", #> title = "Histogram Title") + #> theme_bw() + #> scale_x_continuous(limits = c(0, 100), #> breaks = seq(0, 100, 10), #> expand = c(0, 0)) + #> scale_y_continuous(limits = c(0, 20), #> breaks = seq(0, 20, 2), #> expand = c(0, 0)) #> ``` #> #> 6. Use the `ggsave()` function to save the plot to a file. #> #> ``` #> ggsave(file = "path/to/save/file.png", width = 6, height = 4, dpi = 300) #> ``` #> #> Note: Replace `your_data_frame` and `your_column_name` with the actual names of your data frame and column, respectively. Adjust the axis limits and tick marks according to your needs. To make setting things up as easily as possible, the above lines will prompt you to log into your OpenAI account and generate an API key that is automatically saved for the future once entered into RStudio. The chat also remembers the previous conversation, so you can always ask it to elaborate or explain something differently. askgpt("I don't understand what you mean. Can you explain this for beginners?") #> Sure, let's break down the steps to create a histogram using ggplot2 in R for beginners: #> #> 1. First, you need to load the ggplot2 package in your R session. You can do this by running the following command: #> #> ``` #> library(ggplot2) #> ``` #> #> 2. Next, you need to import or create a data frame that contains the data you want to plot. For example, let's create a vector of random numbers using the `rnorm()` function: #> #> ``` #> my_data ``` #> #> This creates a vector of 1000 normal-distributed random numbers with a mean of 10 and a standard deviation of 2. #> #> 3. Now, you can create a basic ggplot object using the `ggplot()` function, passing in the name of the data frame as an argument: #> #> ``` #> my_plot ``` #> #> 4. Then, you can add a histogram layer on top of the ggplot object using the `geom_histogram()` function: #> #> ``` #> my_plot ``` #> #> Here, `binwidth` is an argument that specifies the size of each histogram bin - we've set it to 0.5, but you can adjust it depending on your data. #> #> 5. Finally, you can customize the histogram by adding axis labels, a title, changing the bin width, etc. Here's an example: #> #> ``` #> my_plot geom_histogram(binwidth = 0.5, fill = "blue", #> alpha = 0.5, colour = "black") + #> labs(title = "My Histogram", x = "Values", y = "Frequency") #> ``` #> #> In this example, we've added axis labels and a title to the plot, set the bin width to 0.5, filled the histogram bars with blue and made them semi-transparent with `alpha`, and set the border color to black. #> #> 6. You can then display the plot using `print(my_plot)` or simply `my_plot`. #> #> ``` #> print(my_plot) #> ``` #> #> 7. If you want to save the plot to your computer, you can use the `ggsave()` function: #> #> ``` #> ggsave("my_histogram.png", my_plot) #> ``` #> #> Here, we're saving the histogram as a PNG file named "my_histogram.png". You can specify the path where you want to save the file, and adjust the height and width using the `width` and `height` arguments. #> #> Hope this helps! Error Explanation One thing that endlessly frustrated me when I first learned R were the sometimes rather cryptic error messages. askgpt solved this problem by logging your errors and sending them to the OpenAI API when prompted. This works by default for tidyverse errors, but you need to enable logging first for other error messages: log_init() mean[1] askgpt("What is wrong with my last command?") #> The error message "object of type 'closure' is not subsettable" occurs when you try to subset or extract a portion of an R function or a closure object, which is not allowed. #> #> For example, if you try to index a function by using the `[ ]` operator, the error message will appear. This is because functions are not indexable or subsettable objects in R. #> #> Here's an example code that produces this error: #> #> ```r #> # defining a function #> myFun x^2 #> } #> #> # trying to subset the function with index #> myFun[1:3] #> ``` #> #> When you run this code, you'll get the error message: #> #> ``` #> Error in myFun[1:3] : object of type 'closure' is not subsettable #> ``` #> #> The error message is telling you that you can't subset the `myFun` function since it is not a data object with indexable elements. #> #> To fix this error, you need to make sure that you are not trying to subset or extract a portion of a function or closure object. Instead, you should use the function or closure as it was intended to be used. If you want to extract some value or output from the function, you can assign it to a variable or use it as an argument in another function call. “What is wrong with my last command?” in this case is a special trigger that sends your last error message and the code that produced it. "help!" is a short alias and does the same thing. Addin for Teaching The package also comes with several RStudio addins that solve some common functions for leaning or teaching R and for developing packages. The biggest one is the Tutorialise adding. Let’s say, you have the code for a tutorial ready and a general plan on how to proceed. Now the final step is to make this into a class with explanations for the code and some examples. Highlight the code and select Tutorialise Code from the Addins menu: Other Addins At the moment, there are four more addins. 2 targeted at people learning R, two for R developers: Explain Code sends the highlighted code to the API and returns the answer in the Console Annotate Code adds comments to the highlighted code directly in the R script Document Code documents functions using roxygen2 syntax Write Test creates a testthat style unit test for a highlighted function Configuration You can configure how askgpt sends API requests by using options that start with askgpt_*. For example, to use a different model to use in askgpt() use options(askgpt_chat_model = "gpt-3.5-turbo-0301"). If you use the completions instead of the chat API (chat = FALSE in askgpt()) use options(askgpt_completions_model = "text-curie-001"). It does not matter if the API parameter is listed in the function or not. All are used. See the complete list here and here. The most important setting, however, is askgpt_config. This can be used to configure the chat using plain English: options(askgpt_config = "I'm 8 years old, please explain things easily") askgpt("What is an R function?") #> #> ── Answer ────────────────────────────────────────────────────────────────────── #> An R function is like giving your friend a set of instructions to perform a #> particular task. In R programming, a function is a set of instructions or steps #> that is given a name, and when you call that name, the function will perform #> those instructions. A function can take information or inputs, do something #> with those inputs (like adding or subtracting), and then give the result back #> as output. #> #> For example, think about giving your friend the instructions to make a peanut #> butter sandwich. The instructions might be: #> #> 1. Take two slices of bread 2. Spread peanut butter on one slice 3. Spread #> jelly on the other slice 4. Put the two slices together #> #> In R, a function might take a number (like 5) and add 1 to it, and then return #> the result (which would be 6). #> #> Functions in R are used to make code easier to use, understand, and reuse. They #> can also help programmers write complex and efficient programs. Technical Details on the Conversation History One more rather technical detail about the package is that the conversation history is not kept locally (I mean OpenAI is definitly storing your requests somewhere, but it is not used inside the conversation). Rather, the questions and answers are stored in the R environment. You can access it using the function prompt_history() and response_history(): prompt_history() #> [1] "Can you explain how functions work in R?" #> [2] "How do you make a histogram with ggplot2?" #> [3] "I don't understand what you mean. Can you explain this for beginners?" #> [4] "explain why this R code does not work:\nNULL\n\"object of type 'closure' is not subsettable\"" response_history() #> [1] "Yes, of course! \n\nFunctions in R are like self-contained units of code that perform a specific task. They are used to create reusable code to avoid writing the same task again and again. In R, we use pre-defined inbuilt functions or we create our own functions as per our requirement. \n\nHere's how a simple function works in R:\n\n```r\n# Creating a function:\nmy_function


Scientists' Perspectives on the Potential for Generative AI in their Fields

arXiv.org Artificial Intelligence

Generative AI models, including large language models and multimodal models that include text and other media, are on the cusp of transforming many aspects of modern life, including entertainment, education, civic life, the arts, and a range of professions. There is potential for Generative AI to have a substantive impact on the methods and pace of discovery for a range of scientific disciplines. We interviewed twenty scientists from a range of fields (including the physical, life, and social sciences) to gain insight into whether or how Generative AI technologies might add value to the practice of their respective disciplines, including not only ways in which AI might accelerate scientific discovery (i.e., research), but also other aspects of their profession, including the education of future scholars and the communication of scientific findings. In addition to identifying opportunities for Generative AI to augment scientists' current practices, we also asked participants to reflect on concerns about AI. These findings can help guide the responsible development of models and interfaces for scientific education, inquiry, and communication.


In-situ Model Downloading to Realize Versatile Edge AI in 6G Mobile Networks

arXiv.org Artificial Intelligence

The sixth-generation (6G) mobile networks are expected to feature the ubiquitous deployment of machine learning and AI algorithms at the network edge. With rapid advancements in edge AI, the time has come to realize intelligence downloading onto edge devices (e.g., smartphones and sensors). To materialize this version, we propose a novel technology in this article, called in-situ model downloading, that aims to achieve transparent and real-time replacement of on-device AI models by downloading from an AI library in the network. Its distinctive feature is the adaptation of downloading to time-varying situations (e.g., application, location, and time), devices' heterogeneous storage-and-computing capacities, and channel states. A key component of the presented framework is a set of techniques that dynamically compress a downloaded model at the depth-level, parameter-level, or bit-level to support adaptive model downloading. We further propose a virtualized 6G network architecture customized for deploying in-situ model downloading with the key feature of a three-tier (edge, local, and central) AI library. Furthermore, experiments are conducted to quantify 6G connectivity requirements and research opportunities pertaining to the proposed technology are discussed.


When Crowd Meets Persona: Creating a Large-Scale Open-Domain Persona Dialogue Corpus

arXiv.org Artificial Intelligence

Building a natural language dataset requires caution since word semantics is vulnerable to subtle text change or the definition of the annotated concept. Such a tendency can be seen in generative tasks like question-answering and dialogue generation and also in tasks that create a categorization-based corpus, like topic classification or sentiment analysis. Open-domain conversations involve two or more crowdworkers freely conversing about any topic, and collecting such data is particularly difficult for two reasons: 1) the dataset should be ``crafted" rather than ``obtained" due to privacy concerns, and 2) paid creation of such dialogues may differ from how crowdworkers behave in real-world settings. In this study, we tackle these issues when creating a large-scale open-domain persona dialogue corpus, where persona implies that the conversation is performed by several actors with a fixed persona and user-side workers from an unspecified crowd.


Accelerating Wireless Federated Learning via Nesterov's Momentum and Distributed Principle Component Analysis

arXiv.org Artificial Intelligence

A wireless federated learning system is investigated by allowing a server and workers to exchange uncoded information via orthogonal wireless channels. Since the workers frequently upload local gradients to the server via bandwidth-limited channels, the uplink transmission from the workers to the server becomes a communication bottleneck. Therefore, a one-shot distributed principle component analysis (PCA) is leveraged to reduce the dimension of uploaded gradients such that the communication bottleneck is relieved. A PCA-based wireless federated learning (PCA-WFL) algorithm and its accelerated version (i.e., PCA-AWFL) are proposed based on the low-dimensional gradients and the Nesterov's momentum. For the non-convex loss functions, a finite-time analysis is performed to quantify the impacts of system hyper-parameters on the convergence of the PCA-WFL and PCA-AWFL algorithms. The PCA-AWFL algorithm is theoretically certified to converge faster than the PCA-WFL algorithm. Besides, the convergence rates of PCA-WFL and PCA-AWFL algorithms quantitatively reveal the linear speedup with respect to the number of workers over the vanilla gradient descent algorithm. Numerical results are used to demonstrate the improved convergence rates of the proposed PCA-WFL and PCA-AWFL algorithms over the benchmarks.


Masked Vision-language Transformer in Fashion - Machine Intelligence Research

#artificialintelligence

Work was done while Ge-Peng Ji was a research intern at Alibaba Group. The authors declared that they have no conflicts of interest in this work. We declare that we do not have any commercial or associative interest that represents a conflict of interest in connection with the work submitted. Ge-Peng Ji received the M. Sc. degree in communication and information systems from Wuhan University, China in 2021. He is currently a Ph.D. degree candidate at Australian National University, supervised by Professor Nick Barnes, majoring in engineering and computer science.